Controlling a Fibaro RGBW module with the Home Center API


With our API, it’s possible to send commands to any module within your Fibaro system directly from a web browser or from any 3rd party system that supports HTTP GET commands.
In this tutorial, we’ll walk you through the process step by step.
RGBW Controller

WHAT CAN I DO?


The Fibaro RGBW module has the following actions which might be useful to you (actually there are 4 more, but they are not as commonly used as these):

  • 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?


To call them you need the device ID of your RGBW module. I will use 81 as an example below. Change this to your module’s device ID.
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!


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

WHERE NOW?


For more information on the API, see our support page at The API