In this tutorial, we’ll walk you through the process step by step.
WHAT CAN I DO?
- turnOn (no arguments)
 - turnOff (no arguments)
 - setValue (1 argument - the overall brightness of the LEDs)
 - setColor (4 arguments - the intensity of Red, Green, Blue & White, all are 0-255 You must specify all 4. If you don’t use white, just send 0.)
 - setB (1 argument - the individual intensity of Blue 0-255)
 - setG (1 argument - the individual intensity of Green 0-255)
 - setR (1 argument - the individual intensity of Red 0-255)
 - setW (1 argument - the individual intensity of White 0-255)
 - startProgram (1 argument - the colour programme to run)
 
WHAT WILL I NEED?
You will also need your IP address. I will use 192.168.81.1 for my examples. Again, please change these to suit your setup.
LET’S GO!
<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


