How do I control FGRGBW-442 RGBW Controller 2

I go to developer tools → API Explorer → select “items” → select POST so send a command.
Then I enter the item name and as a payload I use red=50,level=10 .
The API generates the following curl call:

curl -X POST "http://IP:PORT/rest/items/MyRGBW2Item" -H  "accept: */*" -H  "Content-Type: text/plain" -H  "Authorization: Bearer XXXX" -d "red=50,level=10"

Item definition of the Fibaro RGBW2 item

Color   MyRGBW2Item     "RGB"   {channel = "zwave:device:controller:node44:color_color1",    autoupdate="False"}

If I use “OFF” as a payload it works as expected so it seems openhab is somehow not accepting the string with the multiple values as a valid command.

There is nothing in the openhab.log and I don’t see anything in the zwave.log so unfortunately I can’t provide anything.

So with the new binding version this should work for every color channel?

Thanks. Given there is nothing in the zwave log, my guess is that something in the core is preventing this command from getting through to the binding - otherwise the binding would log the command it receives before it does anything else. Possibly this is to do with your item definition - if this is an RGB type, then probably the core is trying to convert your string to something (either On/Off, a level, or an HSB) and if this fails (as it will) then it is likely throwing this error.

I would suggest a new item that is defined as a StringType and see what that does.

I created the item:

String  MyRGBW2Item     "RGB"   {channel = "zwave:device:controller:node44:color_color1",    autoupdate="False"}

The binding creates the following entries:

2021-10-24 09:21:15.852 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Channel zwave:device:controller:node44:color_color1 linked - polling started.
2021-10-24 09:21:16.881 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Channel zwave:device:controller:node44:color_color1 linked - polling started.
2021-10-24 09:21:59.668 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'MyRGBW2Item' received command red=50,level=10
2021-10-24 09:22:42.391 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'MyRGBW2Item' received command red=50,level=10
2021-10-24 09:23:12.152 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'MyRGBW2Item' received command REFRESH
2021-10-24 09:24:54.121 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'MyRGBW2Item' received command red=50,level=100

The item gets the command but the z-wave binding does not log anything except for these two lines.

Do I need to use an experimental version of the binding?

Ok, so that was your problem then :slight_smile:

You need then to wait for the next version of the binding. At the moment I can’t merge this as CI seems to be broken and until this is resolved and the build and tests succeed I can’t really merge.

1 Like

Has the new implementation already been merged?

I believe it was merged and included in 3.2.0.M5.

I haven’t had success in getting this to work though… probably I’m doing it wrong.

I’m having some weirdness with the zooz rgbw controller and want to create a rule to help overcome

If anyone has some guidance on how to apply this, I’m happy to help verify.

I create a String type item and linked it to the color channel. I tried sending commands like the following to the String item but it didn’t control the light at all

red=0,green=0,blue=0,warm_white=100
1 Like

I turned on zwave logging and am not seeing any logs from the zwave binding after the item receives the command… same as @Spaceman_Spiff. I’m running 3.2.0.M5

@chris - Looking for your feedback. I was able to come up with a solution though possibly not the best solution.

I added new channel type, color_raw to the zwave binding and then added a new channel to the zooz zen31 thing definition using this channel type. I was then able to add a String type item and link it to the new channel and control the light.

I’m happy to open a PR with these changes if it makes sense. Please let me know your thoughts.

1 Like

That sounds exactly right :+1:

The best thing to do is to add this to the database so that it is added to the binding.

Thanks Chris. I created a PR to add the channel type for color_raw. I think this is necessary before I can update devices in the database.

Thanks - that’s now merged.

@jjlauterbach Did you get it working?

I linked a String item to zwave:device:controller:node44:color_raw1 and can send the appropriate commands through the rest api:

[INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RGB_Raw' received command red=255,green=255,level=255

The device however does not turn on and not report an energy change

I did get it working initially. I recently added an additional zen31 controller and I had problems getting that one to work. Not sure if something changed in the more recent versions or if I did something slightly differently. I haven’t had time to really dig into it but from what I could tell, I had the thing/items configured exactly the same way as the others but it doesn’t respond to the raw channel.

@chris Somehow this still doesn’t work. Any idea what’s going on?
I am sending the csv-commands to the color_raw1 channel of a Fibaro RGBW2 dimmer.

*.items file

String  RGBW2_RAW     {channel = "zwave:device:controller:node44:color_raw1",   autoupdate="False"}
Color   RGBW2_Color   {channel = "zwave:device:controller:node44:color_color1", autoupdate="False"}
Number  RGBW2_Power   {channel = "zwave:device:controller:node44:meter_watts1", autoupdate="False"}

If I send normal color commands everything works as expected:

2022-08-30 10:34:19.869 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RGBW2_Color' received command 240,100,100
2022-08-30 10:34:23.693 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Power' changed from NULL to 0
2022-08-30 10:34:23.972 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Color' changed from NULL to 0,0,54
2022-08-30 10:34:25.083 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Color' changed from 0,0,54 to 230,100,100
2022-08-30 10:34:38.720 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RGBW2_Color' received command 240,100,0
2022-08-30 10:34:40.022 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Color' changed from 230,100,100 to 240,100,48
2022-08-30 10:34:41.471 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Color' changed from 240,100,48 to 240,100,0
2022-08-30 10:34:42.542 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGBW2_Color' changed from 240,100,0 to 0,0,0

However sending the raw commands results in no change at all!

2022-08-30 10:34:50.438 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RGBW2_RAW' received command red=100
2022-08-30 10:34:58.528 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RGBW2_RAW' received command red=100,level=100

In the xml are the corresponding entries:

              <supportedColors>
                <colorType>WARM_WHITE</colorType>
                <colorType>RED</colorType>
                <colorType>GREEN</colorType>
                <colorType>BLUE</colorType>
                <colorType>AMBER</colorType>
              </supportedColors>
              <refreshList/>
              <colorMap>
                <entry>
                  <colorType>WARM_WHITE</colorType>
                  <null/>
                </entry>
                <entry>
                  <colorType>RED</colorType>
                  <int>0</int>
                </entry>
                <entry>
                  <colorType>GREEN</colorType>
                  <int>64</int>
                </entry>
                <entry>
                  <colorType>BLUE</colorType>
                  <null/>
                </entry>
                <entry>
                  <colorType>AMBER</colorType>
                  <null/>
                </entry>
              </colorMap>

What am I missing?

What commands are you sending? Please provide a log file - it’s difficult to comment without seeing a log as I don’t know what you are sending, or what is happening in the converter.

Note that I’m about to leave for Africa so will have no internet for the next 2 weeks - I’ll then be in the UK or a couple of weeks before getting home at the end of September so I’ll likely. not get the chance to look too much at this until then.

That’s what I’ve attached. I send the string through the RestAPI.
E.g.

curl -X 'POST' \
  'http://192.168.0.15:8080/rest/items/RGBW2_RAW' \
  -H 'accept: */*' \
  -H 'Content-Type: text/plain' \
  -H 'Authorization: Bearer ....' \
  -d 'RED=100,GREEN=100,BLUE=100'

event.log

Item 'RGBW2_RAW' received command red=100
Item 'RGBW2_RAW' received command red=100,level=100

Sorry - I don’t see any attachment? :confused:

Sorry - I thought you ment the event.log but clearly you ment the zwave.log

2022-08-30 10:34:50.448 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Command received zwave:device:controller:node44:color_raw1 --> red=100 [StringType]
2022-08-30 10:34:50.449 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Command for unknown channel zwave:device:controller:node44:color_raw1 with StringType
2022-08-30 10:34:58.534 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Command received zwave:device:controller:node44:color_raw1 --> red=100,level=100 [StringType]
2022-08-30 10:34:58.534 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Command for unknown channel zwave:device:controller:node44:color_raw1 with StringType
2022-08-30 10:35:11.185 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 14 00 04 00 2C 0E 60 0D 01 01 32 02 21 32 00 00 00 00 00 00 83 
2022-08-30 10:35:11.185 [DEBUG] [nal.protocol.ZWaveTransactionManager] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[4], type=Request[0], dest=44, callback=0, payload=00 2C 0E 60 0D 01 01 32 02 21 32 00 00 00 00 00 00 
2022-08-30 10:35:11.186 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Received msg (0): Message: class=ApplicationCommandHandler[4], type=Request[0], dest=44, callback=0, payload=00 2C 0E 60 0D 01 01 32 02 21 32 00 00 00 00 00 00 
2022-08-30 10:35:11.186 [DEBUG] [nal.protocol.ZWaveTransactionManager] - lastTransaction null
2022-08-30 10:35:11.186 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 44: Application Command Request (ALIVE:DONE)
2022-08-30 10:35:11.186 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 44: resetResendCount initComplete=true isDead=false
2022-08-30 10:35:11.186 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 44: Decapsulating COMMAND_CLASS_MULTI_CHANNEL
2022-08-30 10:35:11.186 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 44: Incoming command class COMMAND_CLASS_METER, endpoint 1
2022-08-30 10:35:11.186 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 44: SECURITY NOT required on COMMAND_CLASS_METER
2022-08-30 10:35:11.186 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 44: Received COMMAND_CLASS_METER V3 METER_REPORT
2022-08-30 10:35:11.187 [DEBUG] [.commandclass.ZWaveMeterCommandClass] - NODE 44: Meter: Type=Electric(1), Scale=W(2), Value=0E+1
2022-08-30 10:35:11.187 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Got an event from Z-Wave network: ZWaveMeterValueEvent
2022-08-30 10:35:11.187 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Got a value event from Z-Wave network, endpoint=1, command class=COMMAND_CLASS_METER, value=0E+1
2022-08-30 10:35:11.187 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Updating channel state zwave:device:controller:node44:meter_watts1 to 0 [DecimalType]
2022-08-30 10:35:11.187 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 44: Commands processed 1.
2022-08-30 10:35:11.187 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 44: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@16fa6c91.

There seems to be an issue with the channel, even though I’ve removed and re-added the thing this week. The channel is also shown in the GUI.

NODE 44: Command received zwave:device:controller:node44:color_raw1 --> red=100,level=100 [StringType]

Yes, the event log is pretty much useless for debugging a binding as it has absolutely no information at all about the binding. The debug log is absolutely required for debugging this.

The issue is with the exporter - I’ve updated it and will try and do an export before I leave tomorrow.

Have you managed to do an update? How could I test if it was successful?