Can’t work out what dimSetup and bulbSetup do. As switches nothig happens, as strings they are blank and as numbers they return 0.
Don’t know what periodOfBroadcast is for either, it returns no value at all no matter what I do.
The identify feature does indeed work and it’s correct as a switch, if you turn it on the dimmer LED starts flashing somewhat manically in white. I was afraid it wasn’t going to stop either but it did about 10 seconds after I’d switched it off again.
The rgbColor is interesting. It’s probably right as type Color. It gives you a colour chooser with a saturation bar at the bottom. Two observations on this -
When you first open the color chooser that saturation bar is sat at zero even though the LED is full on. Dragging the sat bar up and down changes the brightness of the dimmer LED and thereafter the sat bar reads correctly. Being able to change the brightness of the LED on the dimmer was a fairly recently added extra feature by LWRF that came in an updated version of the app. It’s actually very useful for when the dimmer is in a bedroom etc and you don’t want a honking great red LED glaring at you at night.
The colour chooser as it stands doesn’t work. If I drag over to green the LED on the dimmer flashes for a bit showing that something is being sent to it but it stays blue. If I then drag the sat bar up and down the LED dimmer still works even though the colour hasn’t obeyed. Same for red, yellow etc, something’s being sent to the dimmer but the colour doesn’t respond. I captured what’s actually in the initial ‘blue’ setting in the logs below in case it helps you figure it out
Logs:
2020-02-10 16:52:46.146 [.ItemChannelLinkAddedEvent] - Link ‘Lightwave_MorningRoomLight_dimSetup-lightwaverf:d21:77328298:29:1#dimSetup’ has been added.
2020-02-10 16:52:46.150 [.ItemChannelLinkAddedEvent] - Link ‘Lightwave_MorningRoomLight_bulbSetup-lightwaverf:d21:77328298:29:1#bulbSetup’ has been added.
2020-02-10 16:52:46.154 [.ItemChannelLinkAddedEvent] - Link ‘Lightwave_MorningRoomLight_identify-lightwaverf:d21:77328298:29:1#identify’ has been added.
2020-02-10 16:52:46.157 [.ItemChannelLinkAddedEvent] - Link ‘Lightwave_MorningRoomLight_periodOfBroadcast-lightwaverf:d21:77328298:29:1#periodOfBroadcast’ has been added.
2020-02-10 16:52:46.161 [.ItemChannelLinkAddedEvent] - Link ‘Lightwave_MorningRoomLight_rgbColor-lightwaverf:d21:77328298:29:1#rgbColor’ has been added.
2020-02-10 16:52:47.760 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_dimSetup changed from NULL to 0
2020-02-10 16:52:47.762 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_bulbSetup changed from NULL to 0
2020-02-10 16:52:47.798 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_identify changed from NULL to OFF
2020-02-10 16:52:47.824 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_rgbColor changed from NULL to 261.4379284428615,100.0,0.3921569
Havent tested the remaining stuff like reset and checkForUpgrade etc as I don’t fancy knackering my dimmer just when it’s going dark!
UPDATE
Here you can see the colour value changing and being reported back by the API. So I wonder why the LED isn’t responding? Perhaps the firmware in the dimmer will only accept a set of particular values for the LWRF defined colours? I’ll have to test this theory later
2020-02-10 17:06:26.725 [ome.event.ItemCommandEvent] - Item ‘Lightwave_MorningRoomLight_rgbColor’ received command 4,88,100
2020-02-10 17:06:26.730 [nt.ItemStatePredictedEvent] - Lightwave_MorningRoomLight_rgbColor predicted to become 4,88,100
2020-02-10 17:06:26.748 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_rgbColor changed from 260.3921628465839,98.039215,100.0 to 4,88,100
2020-02-10 17:06:27.002 [ome.event.ItemCommandEvent] - Item ‘Lightwave_MorningRoomLight_rgbColor’ received command 4,88,100
2020-02-10 17:06:27.004 [nt.ItemStatePredictedEvent] - Lightwave_MorningRoomLight_rgbColor predicted to become 4,88,100
Also you need some error handling as the colour chooser seems to allow invalid values to be generated and that throws an exception:
2020-02-10 17:06:29.093 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Hue must be between 0 and 360
at org.eclipse.smarthome.core.library.types.HSBType.validateValue(HSBType.java:105) ~[?:?]
at org.eclipse.smarthome.core.library.types.HSBType.(HSBType.java:97) ~[?:?]
at org.openhab.binding.lightwaverf.internal.handler.DeviceHandler.updateChannels(DeviceHandler.java:377) ~[?:?]
at org.openhab.binding.lightwaverf.internal.handler.DeviceHandler.updateChannels(DeviceHandler.java:323) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_222]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]