-
Notifications
You must be signed in to change notification settings - Fork 7
Web services API
Frederic Bardin edited this page Oct 17, 2020
·
2 revisions
PhpMyHue has some simple web services API available.
'Simple' means that they are simply built with url+query string and json for data.
The available services API are the following :
- url : <phpmyhue>/hueapi_cmd.php
- parameters :
- action : hue bridge object to target (ie: lights, lights/<id>/state, groups, ...)
- cmdjs : command content to send to hue bridge in json format (see offcial api documentation for details)
- method : Optional - http method to use to interact with hue rest interface, default: put (=modify)
ie. : <phpmyhue>/hueapi_cmd.php?action=lights/1/state&cmdjs={"on":true}
turns on light with id 1
- url : <phpmyhue>/main.php?rt=runeffect
- parameters :
- effect : name of effect file to launch (without the .xml extension)
- debug : Optional - if set to true, launch effect in trace mode, default: false
ie. : <phpmyhue>/main.php?rt=runeffect&effect=garland launch effect script 'garland.xml'
Remark : effect file names are case sensitive depending on your web server operating system.