The actual call is always in the same format no matter what device you are controlling:
<HC_IP>/api/callAction?deviceID=<ID>&name=<ACTION>[&arg1=<VALUE1>[&arg2=<VALUE2>]]
Turn it on
So to turn on the RGBW module (with the action “turnOn”):
http://192.168.81.1/api/callAction?deviceID=81&name=turnOn
you may need to authenticate. To do this try:
http://admin:[email protected]/api/callAction?deviceID=81&name=turnOn
But it will depend on your device and the method it uses to authenticate.
Change the colour
To change the colour of the RGBW module (with the action “setColor” – note the spelling):
http://192.168.81.1/api/callAction?deviceID=81&name=setColor&arg1=100&arg2=200&arg3=50&arg4=0
This will make a pale greeny-blue colour with Red on 100, Green 200 and Blue 50. The values are between 0 and 255 with 255 being the most intense and 0 being off.
If you have a white channel on your RGBW you can of course use the white arg4 value too. In fact, you need to have it anyway, or it won’t work!
Start a colour programme
To start one of the colour changing programs (in this example, program 4) we will use the “startProgram” action:
http://192.168.81.1/api/callAction?deviceID=81&name=startProgram&arg1=4