-
Notifications
You must be signed in to change notification settings - Fork 0
Roomtrol Daemon and Curl
rchristensen edited this page Oct 7, 2011
·
2 revisions
The HTTP server that is parsing these HTTP requests lives at: [lib/roomtrol/wescontrol_http.rb]
One way to check that the roomtrol daemon is running to curl localhost:1412
$ curl localhost:1412/devices
{"devices":["Extron","dvdplayer","projector",null]}
You can check the value of any state_var
by querying /devices/projector with the vvalue you want to know about. So, for example, if you want to check if the projector's power field is on (true) send a GET HTTP request:
curl -XGET localhost:1412/devices/projector/power
To turn a projector on send a post
request to devices/projector/power
curl -XPOST -d '{"value": true}' localhost:1412/devices/projector/power
To turn a projector off send a post
request to devices/projector/power
curl -XPOST -d '{"value": false}' localhost:1412/devices/projector/power