LightwaveRF Binding Updated

Gave it a quick try, I was worried because this is the only log output I got:

2019-05-10 17:58:07.608 [ome.event.ItemCommandEvent] - Item ‘Authentication_Switch’ received command OFF
2019-05-10 17:58:07.613 [vent.ItemStateChangedEvent] - Authentication_Switch changed from ON to OFF
2019-05-10 17:58:15.491 [INFO ] [eclipse.smarthome.model.script.Exec1] - rm: cannot remove ‘/etc/openhab2/rules/LightWave_Rules_Device_Refresh.rules’: No such file or directory
2019-05-10 17:58:15.546 [INFO ] [eclipse.smarthome.model.script.Exec2] - rm: cannot remove ‘/etc/openhab2/rules/LightWave_Rules_Device_Switch.rules’: No such file or directory
2019-05-10 17:58:15.600 [INFO ] [eclipse.smarthome.model.script.Exec3] - rm: cannot remove ‘/etc/openhab2/items/LightWave_Items_Devices.items’: No such file or directory
2019-05-10 17:58:15.666 [INFO ] [eclipse.smarthome.model.script.Exec4] -
2019-05-10 17:58:15.722 [INFO ] [eclipse.smarthome.model.script.Exec5] -
2019-05-10 17:58:15.778 [INFO ] [eclipse.smarthome.model.script.Exec6] -
2019-05-10 17:58:15.795 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘LightWave_Items_Authentication.items’
2019-05-10 17:58:15.834 [INFO ] [eclipse.smarthome.model.script.Exec8] -
2019-05-10 17:58:15.886 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘LightWave_Items_Devices.items’
2019-05-10 17:58:16.849 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘LightWave_Items_Authentication.items’
2019-05-10 17:58:17.265 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘LightWave_Items_Devices.items’

But, on checking, I’ve now got a LightWave_Items_Devices.items file which looks like it has items in it for pretty much all my stuff. I haven’t had a chance to play with those items yet and I won’t until Saturday morning but it’s looking hopeful

Great stuff
I’ve nearly finished the coding for all the rules to update the status’s and post updates back to lightwave. Hopefully a fully working solution by the end of the weekend.
And yeah I took a lot of the logging out once I got it working

FYI this is what it created:

String Lightwave_LinkPlus_currentTime
String Lightwave_LinkPlus_buttonPress
String Lightwave_LinkPlus_time
String Lightwave_LinkPlus_date
String Lightwave_LinkPlus_monthArray
String Lightwave_LinkPlus_weekdayArray
String Lightwave_LinkPlus_timeZone
String Lightwave_LinkPlus_locationLongitude
String Lightwave_LinkPlus_locationLatitude
String Lightwave_LinkPlus_duskTime
String Lightwave_LinkPlus_dawnTime
Number Lightwave_LinkPlus_rgbColor
String Lightwave_LinkPlus_day
String Lightwave_LinkPlus_month
String Lightwave_LinkPlus_year
String Lightwave_LinkPlus_weekday
Switch Lightwave_Internet_switch
String Lightwave_Internet_outletInUse
Switch Lightwave_Internet_protection
Number Lightwave_Internet_power
Number Lightwave_Internet_energy
Switch Lightwave_Internet_identify
Switch Lightwave_Internet_reset
Switch Lightwave_Internet_upgrade
Switch Lightwave_Internet_diagnostics
String Lightwave_Internet_periodOfBroadcast
Number Lightwave_Internet_rgbColor
Number Lightwave_Internet_voltage
Switch Lightwave_TVSocket_switch
String Lightwave_TVSocket_outletInUse
Switch Lightwave_TVSocket_protection
Number Lightwave_TVSocket_power
Number Lightwave_TVSocket_energy
Switch Lightwave_GreenLamp_switch
Switch Lightwave_GreenLamp_protection
Switch Lightwave_LavaLamp_switch
Switch Lightwave_LavaLamp_protection
Switch Lightwave_OutsideLights_switch
Switch Lightwave_OutsideLights_protection
Switch Lightwave_Twigs_switch
Switch Lightwave_Twigs_protection
Switch Lightwave_WindowLights_switch
Switch Lightwave_WindowLights_protection
Switch Lightwave_HallLights_switch
String Lightwave_HallLights_dimLevel
String Lightwave_HallLights_dimSetup
Switch Lightwave_HallLights_protection
Number Lightwave_HallLights_power
Number Lightwave_HallLights_energy
Switch Lightwave_HallLights_identify
Switch Lightwave_HallLights_reset
Switch Lightwave_HallLights_upgrade
Switch Lightwave_HallLights_diagnostics
String Lightwave_HallLights_periodOfBroadcast
Number Lightwave_HallLights_rgbColor
String Lightwave_HallLights_bulbSetup
Switch Lightwave_LandingLights2_switch
String Lightwave_LandingLights2_dimLevel
String Lightwave_LandingLights2_dimSetup
Switch Lightwave_LandingLights2_protection
Number Lightwave_LandingLights2_power
Number Lightwave_LandingLights2_energy
String Lightwave_LandingLights2_bulbSetup
Switch Lightwave_LandingLights1_switch
String Lightwave_LandingLights1_dimLevel
String Lightwave_LandingLights1_dimSetup
Switch Lightwave_LandingLights1_protection
Number Lightwave_LandingLights1_power
Number Lightwave_LandingLights1_energy
Switch Lightwave_LandingLights1_identify
Switch Lightwave_LandingLights1_reset
Switch Lightwave_LandingLights1_upgrade
Switch Lightwave_LandingLights1_diagnostics
String Lightwave_LandingLights1_periodOfBroadcast
Number Lightwave_LandingLights1_rgbColor
String Lightwave_LandingLights1_bulbSetup
Switch Lightwave_BathroomLights_switch
String Lightwave_BathroomLights_dimLevel
String Lightwave_BathroomLights_dimSetup
Switch Lightwave_BathroomLights_protection
Number Lightwave_BathroomLights_power
Number Lightwave_BathroomLights_energy
String Lightwave_BathroomLights_bulbSetup
Switch Lightwave_BedroomLight_identify
Switch Lightwave_BedroomLight_reset
Switch Lightwave_BedroomLight_upgrade
Switch Lightwave_BedroomLight_diagnostics
String Lightwave_BedroomLight_periodOfBroadcast
Number Lightwave_BedroomLight_rgbColor
Switch Lightwave_BedroomLight_switch
String Lightwave_BedroomLight_dimLevel
String Lightwave_BedroomLight_dimSetup
Switch Lightwave_BedroomLight_protection
Number Lightwave_BedroomLight_power
Number Lightwave_BedroomLight_energy
String Lightwave_BedroomLight_bulbSetup
Switch Lightwave_MorningRoomLight_identify
Switch Lightwave_MorningRoomLight_reset
Switch Lightwave_MorningRoomLight_upgrade
Switch Lightwave_MorningRoomLight_diagnostics
String Lightwave_MorningRoomLight_periodOfBroadcast
Number Lightwave_MorningRoomLight_rgbColor
Switch Lightwave_MorningRoomLight_switch
String Lightwave_MorningRoomLight_dimLevel
String Lightwave_MorningRoomLight_dimSetup
Switch Lightwave_MorningRoomLight_protection
Number Lightwave_MorningRoomLight_power
Number Lightwave_MorningRoomLight_energy
String Lightwave_MorningRoomLight_bulbSetup
Switch Lightwave_ReadingLamp_switch
Switch Lightwave_ReadingLamp_protection
Switch Lightwave_GraciesStar_switch
Switch Lightwave_GraciesStar_protection
Switch Lightwave_GreenhouseLight_switch
Switch Lightwave_GreenhouseLight_protection
Switch Lightwave_Pump_switch
Switch Lightwave_Pump_protection
Switch Lightwave_GardenLights_switch
Switch Lightwave_GardenLights_protection

try this, should have everything in there although not nicely formatted yet. be patient takes a while to load and you’ll get couple of script null errors towards the end where i haven’t ironed out all the bugs yet.
as always, don’t forget to put user/pass back in

Lightwave_Setup_2019-05-11_0912.rules.txt (21.9 KB)

Few things I have just noticed which are to fix,

  • parsed the energy and power as integers instead of decimals

  • Energy and power names missing suffixes

  • Dim parameters passed as wrong types (I think I haven’t got so going off yours)

This should fix the first 2, could you let me know any info you have for ,dim level, dim setup, bulb setup - dim level should be ok but need to see values, don’t know what the other types are… switches… arrays…
Havnt tested tho

Lightwave_Setup_2019-05-11_1141.rules.txt (22.0 KB)

I’ll try to test this evening. If not, Sunday for sure

1 Like

Looking positive.
It seems to be polling the LinkPlus every ten seconds or so and returning values for lots of things.

You asked for output to see how some of the values are being reported so here’s the log:

2019-05-12 21:28:21.734 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from NULL to 1557692880
2019-05-12 21:28:21.742 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692880 to 1557692882
2019-05-12 21:28:21.749 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_buttonPress changed from NULL to 0
2019-05-12 21:28:21.754 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from NULL to 77283
2019-05-12 21:28:21.775 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_date changed from NULL to 8271116
2019-05-12 21:28:21.780 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_monthArray changed from NULL to 0
2019-05-12 21:28:21.797 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_weekdayArray changed from NULL to 64
2019-05-12 21:28:21.801 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_timeZone changed from NULL to 3600
2019-05-12 21:28:21.807 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77283 to 77280
2019-05-12 21:28:21.809 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_locationLongitude changed from NULL to -2276021
2019-05-12 21:28:21.816 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_locationLatitude changed from NULL to 53549252
2019-05-12 21:28:21.819 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_duskTime changed from NULL to 75450
2019-05-12 21:28:21.825 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_dawnTime changed from NULL to 18805
2019-05-12 21:28:21.832 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_rgbColor changed from NULL to 768
2019-05-12 21:28:21.843 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_day changed from NULL to 12
2019-05-12 21:28:21.880 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_month changed from NULL to 5
2019-05-12 21:28:21.890 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_year changed from NULL to 2019
2019-05-12 21:28:21.901 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_weekday changed from NULL to 7
2019-05-12 21:28:21.917 [vent.ItemStateChangedEvent] - Lightwave_Internet_switch changed from NULL to ON
2019-05-12 21:28:21.928 [vent.ItemStateChangedEvent] - Lightwave_Internet_outletInUse changed from NULL to 1
2019-05-12 21:28:21.942 [vent.ItemStateChangedEvent] - Lightwave_Internet_protection changed from NULL to OFF
2019-05-12 21:28:21.954 [vent.ItemStateChangedEvent] - Lightwave_Internet_power changed from NULL to 30.0
2019-05-12 21:28:21.957 [vent.ItemStateChangedEvent] - Lightwave_Internet_Power_Cost changed from NULL to 0.0039
2019-05-12 21:28:22.047 [vent.ItemStateChangedEvent] - Lightwave_Internet_energy changed from NULL to 213.739
2019-05-12 21:28:22.067 [vent.ItemStateChangedEvent] - Lightwave_Internet_Energy_Cost changed from NULL to 27.78607
2019-05-12 21:28:22.071 [vent.ItemStateChangedEvent] - Lightwave_Internet_identify changed from NULL to OFF
2019-05-12 21:28:22.134 [vent.ItemStateChangedEvent] - Lightwave_Internet_reset changed from NULL to OFF
2019-05-12 21:28:22.146 [vent.ItemStateChangedEvent] - Lightwave_Internet_upgrade changed from NULL to OFF
2019-05-12 21:28:22.171 [vent.ItemStateChangedEvent] - Lightwave_Internet_diagnostics changed from NULL to 40
2019-05-12 21:28:22.191 [vent.ItemStateChangedEvent] - Lightwave_Internet_periodOfBroadcast changed from NULL to 16
2019-05-12 21:28:22.216 [vent.ItemStateChangedEvent] - Lightwave_Internet_rgbColor changed from NULL to 16711680
2019-05-12 21:28:22.230 [vent.ItemStateChangedEvent] - Lightwave_Internet_voltage changed from NULL to 2465
2019-05-12 21:28:22.270 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_switch changed from NULL to OFF
2019-05-12 21:28:22.311 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_outletInUse changed from NULL to 1
2019-05-12 21:28:22.346 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_protection changed from NULL to OFF
2019-05-12 21:28:22.351 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_power changed from NULL to 0.0
2019-05-12 21:28:22.366 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:22.370 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_energy changed from NULL to 121.143
2019-05-12 21:28:22.381 [vent.ItemStateChangedEvent] - Lightwave_TVSocket_Energy_Cost changed from NULL to 15.74859
2019-05-12 21:28:22.386 [vent.ItemStateChangedEvent] - Lightwave_GreenLamp_switch changed from NULL to ON
2019-05-12 21:28:22.403 [vent.ItemStateChangedEvent] - Lightwave_GreenLamp_protection changed from NULL to OFF
2019-05-12 21:28:22.408 [vent.ItemStateChangedEvent] - Lightwave_LavaLamp_switch changed from NULL to ON
2019-05-12 21:28:22.423 [vent.ItemStateChangedEvent] - Lightwave_LavaLamp_protection changed from NULL to OFF
2019-05-12 21:28:22.455 [vent.ItemStateChangedEvent] - Lightwave_OutsideLights_switch changed from NULL to ON
2019-05-12 21:28:22.492 [vent.ItemStateChangedEvent] - Lightwave_OutsideLights_protection changed from NULL to OFF
2019-05-12 21:28:22.509 [vent.ItemStateChangedEvent] - Lightwave_Twigs_switch changed from NULL to ON
2019-05-12 21:28:22.531 [vent.ItemStateChangedEvent] - Lightwave_Twigs_protection changed from NULL to OFF
2019-05-12 21:28:22.552 [vent.ItemStateChangedEvent] - Lightwave_WindowLights_switch changed from NULL to ON
2019-05-12 21:28:22.557 [vent.ItemStateChangedEvent] - Lightwave_WindowLights_protection changed from NULL to OFF
2019-05-12 21:28:22.568 [vent.ItemStateChangedEvent] - Lightwave_HallLights_switch changed from NULL to ON
2019-05-12 21:28:22.573 [vent.ItemStateChangedEvent] - Lightwave_HallLights_dimLevel changed from NULL to 100
2019-05-12 21:28:22.598 [vent.ItemStateChangedEvent] - Lightwave_HallLights_dimSetup changed from NULL to 108183552
2019-05-12 21:28:22.618 [vent.ItemStateChangedEvent] - Lightwave_HallLights_protection changed from NULL to OFF
2019-05-12 21:28:22.631 [vent.ItemStateChangedEvent] - Lightwave_HallLights_power changed from NULL to 0.0
2019-05-12 21:28:22.652 [vent.ItemStateChangedEvent] - Lightwave_HallLights_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:22.687 [vent.ItemStateChangedEvent] - Lightwave_HallLights_energy changed from NULL to 3.341
2019-05-12 21:28:22.698 [vent.ItemStateChangedEvent] - Lightwave_HallLights_Energy_Cost changed from NULL to 0.43433
2019-05-12 21:28:22.733 [vent.ItemStateChangedEvent] - Lightwave_HallLights_identify changed from NULL to OFF
2019-05-12 21:28:22.750 [vent.ItemStateChangedEvent] - Lightwave_HallLights_reset changed from NULL to OFF
2019-05-12 21:28:22.776 [vent.ItemStateChangedEvent] - Lightwave_HallLights_upgrade changed from NULL to OFF
2019-05-12 21:28:22.818 [vent.ItemStateChangedEvent] - Lightwave_HallLights_diagnostics changed from NULL to 31
2019-05-12 21:28:22.835 [vent.ItemStateChangedEvent] - Lightwave_HallLights_periodOfBroadcast changed from NULL to 16
2019-05-12 21:28:22.843 [vent.ItemStateChangedEvent] - Lightwave_HallLights_rgbColor changed from NULL to 1
2019-05-12 21:28:22.865 [vent.ItemStateChangedEvent] - Lightwave_HallLights_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:22.898 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_switch changed from NULL to ON
2019-05-12 21:28:22.920 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_dimLevel changed from NULL to 100
2019-05-12 21:28:22.938 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_dimSetup changed from NULL to 635174912
2019-05-12 21:28:22.955 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_protection changed from NULL to OFF
2019-05-12 21:28:22.969 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_power changed from NULL to 0.0
2019-05-12 21:28:22.999 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:23.026 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_energy changed from NULL to 0.0
2019-05-12 21:28:23.029 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_Energy_Cost changed from NULL to 0.000
2019-05-12 21:28:23.032 [vent.ItemStateChangedEvent] - Lightwave_LandingLights2_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:23.042 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_switch changed from NULL to ON
2019-05-12 21:28:23.084 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_dimLevel changed from NULL to 100
2019-05-12 21:28:23.091 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_dimSetup changed from NULL to 110510080
2019-05-12 21:28:23.097 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_protection changed from NULL to OFF
2019-05-12 21:28:23.143 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_power changed from NULL to 28.0
2019-05-12 21:28:23.152 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_Power_Cost changed from NULL to 0.00364
2019-05-12 21:28:23.164 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_energy changed from NULL to 1.694
2019-05-12 21:28:23.174 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_Energy_Cost changed from NULL to 0.22022
2019-05-12 21:28:23.178 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_identify changed from NULL to OFF
2019-05-12 21:28:23.184 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_reset changed from NULL to OFF
2019-05-12 21:28:23.188 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_upgrade changed from NULL to OFF
2019-05-12 21:28:23.236 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_diagnostics changed from NULL to 29
2019-05-12 21:28:23.251 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_periodOfBroadcast changed from NULL to 16
2019-05-12 21:28:23.268 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_rgbColor changed from NULL to 1
2019-05-12 21:28:23.318 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:23.329 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_switch changed from NULL to OFF
2019-05-12 21:28:23.336 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_dimLevel changed from NULL to 100
2019-05-12 21:28:23.345 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_dimSetup changed from NULL to 139264000
2019-05-12 21:28:23.361 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_protection changed from NULL to OFF
2019-05-12 21:28:23.369 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_power changed from NULL to 0.0
2019-05-12 21:28:23.380 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:23.383 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_energy changed from NULL to 0.988
2019-05-12 21:28:23.387 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_Energy_Cost changed from NULL to 0.12844
2019-05-12 21:28:23.389 [vent.ItemStateChangedEvent] - Lightwave_BathroomLights_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:23.391 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_identify changed from NULL to OFF
2019-05-12 21:28:23.394 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_reset changed from NULL to OFF
2019-05-12 21:28:23.397 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_upgrade changed from NULL to OFF
2019-05-12 21:28:23.399 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_diagnostics changed from NULL to 30
2019-05-12 21:28:23.401 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_periodOfBroadcast changed from NULL to 16
2019-05-12 21:28:23.404 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_rgbColor changed from NULL to 1
2019-05-12 21:28:23.406 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_switch changed from NULL to OFF
2019-05-12 21:28:23.409 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_dimLevel changed from NULL to 100
2019-05-12 21:28:23.411 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_dimSetup changed from NULL to 150732800
2019-05-12 21:28:23.414 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_protection changed from NULL to OFF
2019-05-12 21:28:23.417 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_power changed from NULL to 0.0
2019-05-12 21:28:23.419 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:23.421 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_energy changed from NULL to 1.133
2019-05-12 21:28:23.424 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_Energy_Cost changed from NULL to 0.14729
2019-05-12 21:28:23.426 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:23.429 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_identify changed from NULL to OFF
2019-05-12 21:28:23.431 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_reset changed from NULL to OFF
2019-05-12 21:28:23.434 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_upgrade changed from NULL to OFF
2019-05-12 21:28:23.436 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_diagnostics changed from NULL to 28
2019-05-12 21:28:23.438 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_periodOfBroadcast changed from NULL to 16
2019-05-12 21:28:23.440 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_rgbColor changed from NULL to 1
2019-05-12 21:28:23.443 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_switch changed from NULL to OFF
2019-05-12 21:28:23.445 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_dimLevel changed from NULL to 100
2019-05-12 21:28:23.447 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_dimSetup changed from NULL to 123731968
2019-05-12 21:28:23.450 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_protection changed from NULL to OFF
2019-05-12 21:28:23.453 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_power changed from NULL to 0.0
2019-05-12 21:28:23.455 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_Power_Cost changed from NULL to 0.000
2019-05-12 21:28:23.458 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_energy changed from NULL to 0.246
2019-05-12 21:28:23.460 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_Energy_Cost changed from NULL to 0.03198
2019-05-12 21:28:23.463 [vent.ItemStateChangedEvent] - Lightwave_MorningRoomLight_bulbSetup changed from NULL to 10486272
2019-05-12 21:28:23.465 [vent.ItemStateChangedEvent] - Lightwave_ReadingLamp_switch changed from NULL to ON
2019-05-12 21:28:23.467 [vent.ItemStateChangedEvent] - Lightwave_ReadingLamp_protection changed from NULL to OFF
2019-05-12 21:28:23.470 [vent.ItemStateChangedEvent] - Lightwave_GraciesStar_switch changed from NULL to OFF
2019-05-12 21:28:23.472 [vent.ItemStateChangedEvent] - Lightwave_GraciesStar_protection changed from NULL to OFF
2019-05-12 21:28:23.475 [vent.ItemStateChangedEvent] - Lightwave_GreenhouseLight_switch changed from NULL to OFF
2019-05-12 21:28:23.478 [vent.ItemStateChangedEvent] - Lightwave_GreenhouseLight_protection changed from NULL to OFF
2019-05-12 21:28:23.480 [vent.ItemStateChangedEvent] - Lightwave_Pump_switch changed from NULL to ON
2019-05-12 21:28:23.483 [vent.ItemStateChangedEvent] - Lightwave_Pump_protection changed from NULL to OFF
2019-05-12 21:28:23.485 [vent.ItemStateChangedEvent] - Lightwave_GardenLights_switch changed from NULL to ON
2019-05-12 21:28:23.488 [vent.ItemStateChangedEvent] - Lightwave_GardenLights_protection changed from NULL to OFF
2019-05-12 21:28:25.232 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘LightWave_Rules_Device_Refresh.rules’
2019-05-12 21:28:27.236 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule ‘LightWave Structure’: An error occurred during the script execution: null
2019-05-12 21:28:31.305 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692882 to 1557692906
2019-05-12 21:28:31.333 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77280 to 77306
2019-05-12 21:29:04.626 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘LightWave_Rules_Device_Switch.rules’
2019-05-12 21:29:08.772 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692906 to 1557692944
2019-05-12 21:29:08.792 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77306 to 77344
2019-05-12 21:29:09.125 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_energy changed from 1.694 to 1.695
2019-05-12 21:29:09.129 [vent.ItemStateChangedEvent] - Lightwave_LandingLights1_Energy_Cost changed from 0.22022 to 0.22035
2019-05-12 21:29:12.744 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692944 to 1557692948
2019-05-12 21:29:12.766 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77344 to 77348
2019-05-12 21:29:16.760 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692948 to 1557692952
2019-05-12 21:29:16.774 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77348 to 77352
2019-05-12 21:29:21.622 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692952 to 1557692956
2019-05-12 21:29:21.633 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77352 to 77356
2019-05-12 21:29:25.608 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692956 to 1557692961
2019-05-12 21:29:25.624 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77356 to 77361
2019-05-12 21:29:25.863 [vent.ItemStateChangedEvent] - Lightwave_HallLights_energy changed from 3.341 to 3.342
2019-05-12 21:29:25.870 [vent.ItemStateChangedEvent] - Lightwave_HallLights_Energy_Cost changed from 0.43433 to 0.43446
2019-05-12 21:29:34.312 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692961 to 1557692969
2019-05-12 21:29:34.330 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77361 to 77369
2019-05-12 21:29:44.258 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692969 to 1557692979
2019-05-12 21:29:44.268 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77369 to 77379
2019-05-12 21:29:54.440 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692979 to 1557692989
2019-05-12 21:29:54.462 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77379 to 77389
2019-05-12 21:30:05.197 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692989 to 1557692999
2019-05-12 21:30:05.211 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77389 to 77400
2019-05-12 21:30:14.361 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557692999 to 1557693009
2019-05-12 21:30:14.377 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77400 to 77409
2019-05-12 21:30:24.292 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_currentTime changed from 1557693009 to 1557693019
2019-05-12 21:30:24.305 [vent.ItemStateChangedEvent] - Lightwave_LinkPlus_time changed from 77409 to 77419

I’ll let it run for now and see how it holds up

1 Like

Good stuff. Glad it’s working. There’s a few bits I’ll change slightly. Main thing I need to know is the bits I put above. But for now you have a working solution. Mines been solid for 48 hrs now.
Be a little patient if you switch something on/off. If it’s between polls then you may see it change back state for 10 seconds but it will rectify itself on the next poll.
Add the bits (switches) in habpanel etc and have a test. Should all respond ok, just watch the reset switch (don’t want you to have to set it all up again).
You can set your electricity cost in the rule file created - currently set at 13p per kWh
You can also play with the refresh timing, in the refresh rule just amend the 0/10, which is 10 seconds to whatever interval, didn’t wanna push it too hard to start with

I’ll try to do some research tomorrow evening and get that info for you

Okay got some info on dimlevel etc.

Dimlevel seems to be an integer between 0 and 100, corresponding to the dimmer percentage (as set by Alexa etc when you say ‘dim the light to 50 percent’).

Dimsetup and Bulbsetup are a bit more of a mystery. I have a single-gang Gen 2 dimmer in the Morning Room controlling a single 6W LED bayonet GLS style bulb. Dimsetup returns 123731968 and BulbSetup is 10486272. What those mean in practice, anyone’s guess. I think they are what gets defined when you change the calibration settings for the dimmer in the LWRF app.

For one of my sockets I also pulled up Voltage = 2438 so a divide by 10 needed there, however Power=30 (watts) so no division needed, and Energy=214.482 which by cross-checking with the app is the cumulative energy in KwH since the last measurement reset, again no division needed.

A few more observations:

When I look in the .items file everything’s been put into the GroundSockets group or one of it’s derivitives - including all my dimmers! So perhaps we need to check the device type when it enumerates them and assign the group based on that.

Also it’s lovingly created items for power consumption etc for each of my my Gen 1 items. I’m sure this is because the API has ‘placeholders’ for all the possible values regardless of the generation (easier for the API developers) but all of those will always return zero or undefined because Gen 1 doesn’t support two-way comms or power consumption. I’m only mentioning this because we now have a number of OpenHAB items for all of these that willl never be of any actual use.

On a similar tack, I wonder if we’re over-complicating by trying to deal with stuff like BulbSetup and LinkPlusTime etc. While cool to know, these don’t have much real-world use when what we really want to be polling for is the on/off status, dim level etc and the power for Gen 2 devices. Not trying to criticise the comprehensive and hard work you’re putting in here, just wondering aloud if a more pared-back approach might reduce the load on the Pi and the amount of logging activity (For example, I’m logging two entries for the latest time off the LinkPlus every ten seconds, day and night).

However, all that aside, it works and it works pretty well. Well done - major achievement. Where would you like to take it from here?

EDIT:
What I’ll do tomorrow is pull a complete set of the values returned for each type of device that I have so you can correlate them with the structure. Hopefully that’ll give you something more solid to work with than my late-night ramblings.

Cheers for the feedback.
Does the dimming work btw as I have only switches?

  • I’m aware of the voltage division needed.

  • I wanted to add everything as it’s only on that initial discovery we can add stuff easily, people can then choose to remove the items they don’t want like the link plus time etc from the generated files (and put them somewhere safe in case they want to add back

  • The groups were a work in progress but I got sidetracked making the discovery better, I’ll work on these more in the coming weeks, everything is in that group as that’s the only thing I have :smile:

  • I’ll have a look to see if I can easily identify gen1/gen2 and remove the unneeded placeholders

On another note (I won’t post up until I’ve made progress with the above also since we are working):

  • I’ve modified the refresh rule slightly to lighten the load on the system and I’ve got the execution time of the rule down to 3 seconds on my rpi model 3

  • I’m also working on the most annoying thing for me… turning a switch off/on but then the switch changing back state for a few seconds while the rules catch up

I’m glad we have a working solution for now though, even though it’s not a fully fledged binding and is far from perfect.
As long as it’s appreciated and at least one person gets use from it I’ll continue to try and improve it, although probably at a slower pace as I’ve put a lot of time into it and I’m tired and need some sleep :rofl:

I’ve emailed tech support for some info on bulb setup etc.
Also, the time/long/lat etc can also be used for geofencing in openhab if required by some, products may not necessarily be on the same site as the openhab install but connected by site to site vpn like I have some devices at my office, therefore the openhab long/lat wouldn’t work in this situation so may be useful.
I’ll also convert the two dates into human readable(currently seconds from 00:00 and the other is a datetime value).

Now I’ve got my head around the system and also learnt a little more about openhab from this I’ll have a look at modifying the existing lightwave binding to add all this. At least I’ll have some basic foundation then to learn the backend side of things. Just wish I had a little more skill set in this area instead of being self taught.

One last thing… the gen1’s that it created power/energy for… can you look in the items file and see if it’s just the cost and not the actual kWh/w. The costs are not part of the api, I generated them myself which is why there is also an electricity cost variable (much the same as the app does), I think I may have created then for everything that has a switch type though, can’t remember off hand

Can you also check, in your items file I added a suffix to the item name to specify if it’s readonly, can you look at the bulbsetup/dimsetup to see if these are readonly

I’ll have to answer in stages, but here’s the first. Yes, the DimLevel works fine:

2019-05-14 10:33:04.991 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_switch changed from OFF to ON
2019-05-14 10:33:04.998 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_dimLevel changed from 100 to 55
2019-05-14 10:33:05.005 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_power changed from 0.0 to 2.0
2019-05-14 10:33:05.008 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_Power_Cost changed from 0.000 to 0.00026
2019-05-14 10:33:14.663 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_power changed from 2.0 to 18.0
2019-05-14 10:33:14.675 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_Power_Cost changed from 0.00026 to 0.00234
2019-05-14 10:34:04.585 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_switch changed from ON to OFF
2019-05-14 10:34:04.602 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_power changed from 18.0 to 0.0
2019-05-14 10:34:04.607 [vent.ItemStateChangedEvent] - Lightwave_BedroomLight_Power_Cost changed from 0.00234 to 0.000

That’s a single-gang Gen2 dimmer being driven from OpenHAB

Here is the .items file that gets created for a Gen 2 dimmer:

Switch Lightwave_BedroomLight_identify “Bedroom Light identify” (GroupGroundSocketsOther)
Switch Lightwave_BedroomLight_reset “Bedroom Light reset” (GroupGroundSocketsOther)
Switch Lightwave_BedroomLight_upgrade “Bedroom Light upgrade” (GroupGroundSocketsOther)
Number Lightwave_BedroomLight_diagnostics "Bedroom Light diagnostics "
String Lightwave_BedroomLight_periodOfBroadcast "Bedroom Light periodOfBroadcast "
Number Lightwave_BedroomLight_rgbColor "Bedroom Light rgbColor "
Switch Lightwave_BedroomLight_switch “Bedroom Light” (GroupGroundSockets)
Dimmer Lightwave_BedroomLight_dimLevel “Bedroom Light dimLevel” (GroupGroundLights)
String Lightwave_BedroomLight_dimSetup "Bedroom Light dimSetup "
Switch Lightwave_BedroomLight_protection “Bedroom Light protection” (GroupGroundSocketsOther)
Number Lightwave_BedroomLight_power “Bedroom Light power [%.1f W] (Read Only)” (GroupGroundSocketsPower)
Number Lightwave_BedroomLight_energy “Bedroom Light energy [%.2f kWh] (Read Only)” (GroupGroundSocketsEnergy)
String Lightwave_BedroomLight_bulbSetup "Bedroom Light bulbSetup "
Number Lightwave_BedroomLight_Power_Cost “Bedroom Light Power Cost [%.3f]” (GroupGroundSocketsPowerCost)
Number Lightwave_BedroomLight_Energy_Cost “Bedroom Light Energy Cost [%.2f]” (GroupGroundSocketsEnergyCost)

Here’s the Structure for the Gen 2 dimmer:

{“deviceId”:“5a6a3fbfc211836b17f98f26-28-3157328472+0”,“name”:“Bedroom Light”,“productCode”:“L21”,“featureSets”:[{“featureSetId”:“5a6a3fbfc211836b17f98f26-5b59e7cd6955591b24a9d698”,“name”:“Bedroom Light”,“features”:[{“featureId”:“5a6a3fbfc211836b17f98f26-88-3157328472+0”,“type”:“identify”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-89-3157328472+0”,“type”:“reset”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-90-3157328472+0”,“type”:“upgrade”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-91-3157328472+0”,“type”:“diagnostics”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-92-3157328472+0”,“type”:“periodOfBroadcast”,“writable”:true},
{“featureId”:“5a6a3fbfc211836b17f98f26-93-3157328472+0”,“type”:“rgbColor”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-94-3157328472+0”,“type”:“switch”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-95-3157328472+0”,“type”:“dimLevel”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-96-3157328472+0”,“type”:“dimSetup”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-97-3157328472+0”,“type”:“protection”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-98-3157328472+0”,“type”:“power”,“writable”:false},{“featureId”:“5a6a3fbfc211836b17f98f26-99-3157328472+0”,“type”:“energy”,“writable”:false},{“featureId”:“5a6a3fbfc211836b17f98f26-121-3157328472+0”,“type”:“bulbSetup”,“writable”:true}]}],“product”:“L21”,“device”:“dimmer”,“desc”:“Smart Dimmer”,“type”:“lwrfTwoWay_v2”,“cat”:“Lighting”,“gen”:2},

Here’s the .items for a Gen 1 Plug-In Socket Switch:

Switch Lightwave_LavaLamp_switch “Lava Lamp” (GroupGroundSockets)
Switch Lightwave_LavaLamp_protection “Lava Lamp protection” (GroupGroundSocketsOther)
Number Lightwave_LavaLamp_Power_Cost “Lava Lamp Power Cost [%.3f]” (GroupGroundSocketsPowerCost)
Number Lightwave_LavaLamp_Energy_Cost “Lava Lamp Energy Cost [%.2f]” (GroupGroundSocketsEnergyCost)

And here’s the Structure for it:

{“deviceId”:“5a6a3fbfc211836b17f98f26-14-3157328472+0”,“name”:“Out3”,“productCode”:“LW320”,“featureSets”:[{“featureSetId”:“5a6a3fbfc211836b17f98f26-5a8c99a8b6fce426e56237b9”,“name”:“Lava Lamp”,“features”:[{“featureId”:“5a6a3fbfc211836b17f98f26-46-3157328472+0”,“type”:“switch”,“writable”:true},{“featureId”:“5a6a3fbfc211836b17f98f26-47-3157328472+0”,“type”:“protection”,“writable”:true}]}],“product”:“LW320”,“device”:“socket”,“desc”:“Plug-In Socket”,“type”:“lwrfOneWay_v1”,“cat”:“Power”,“gen”:1},

From the Structure you can get the LWRF Product Code, the device type, the category (power or lighting) and the Gen 1 or 2 simply by pulling the right fields out of the JSON. You can do that with JSONPATH as you’re already doing, or with a regular expression. I’ve messed with both approaches and have some examples if you need.

I didn’t bother with the Gen 2 sockets as you’ve got those, but I can if you ask.

I’ve got both types of Gen 1 plug-in socket and they both look exactly the same in the structure and items file. Also I have a Gen 1 three-way relay but that shows up in the structure as three Gen1 plug-in sockets because that’s basically what the innards are. So the structure and items for that also read exactly as for the Lava Lamp (yes, I’m sad, I do have a lava lamp and I quite like it).

Thanks for that.
Its as I thought for the gen1’s: it’s just my own implementation for costs that’s been added, I just need to filter this in the original code - you can just delete the lines from your items file and also the rules file to save having to run the setup again.
Based on that I don’t think we need to determine whether an item is a gen1 or 2.

I had a little look at the bulb and dim setup yesterday but couldn’t find anything relating to them. I’ll wait for the developers to come back to me on them (lightwave have emailed me back and passed it on).

Oh and you can probably lower the refresh time to 5 seconds without any error, I’m running every 4 at present and looks all ok.

I’ll try the faster refresh. I wonder how frequent we can go before Lightwave get sick of us :wink:
I’ll delete the unused power items and I’m also going to comment out the LinkPlus time etc to reduce the load a bit.
Also I’m going to pull the DimSetup and BulbSetup for several dimmers that I know are set up different. Still no idea what the values mean but it might add a couple more pieces to the jigsaw.

If you put it down to fire every second you’ll see how long the rule takes to complete if you leave one of the time items active.
And I had it running every 3 seconds for a day and didn’t get banned

Before I get onto all the stuff I said in my previous update I would do (!), here’s a little something else from my .items file:

//LandingLights2
Switch Lightwave_LandingLights2_switch “Landing Lights 2” (GroupGroundSockets)
Dimmer Lightwave_LandingLights2_dimLevel “Landing Lights 2 dimLevel” (GroupGroundLights)
String Lightwave_LandingLights2_dimSetup "Landing Lights 2 dimSetup "
Switch Lightwave_LandingLights2_protection “Landing Lights 2 protection” (GroupGroundSocketsOther)
Number Lightwave_LandingLights2_power “Landing Lights 2 power [%.1f W] (Read Only)” (GroupGroundSocketsPower)
Number Lightwave_LandingLights2_energy “Landing Lights 2 energy [%.2f kWh] (Read Only)” (GroupGroundSocketsEnergy)
String Lightwave_LandingLights2_bulbSetup "Landing Lights 2 bulbSetup "
Number Lightwave_LandingLights2_Power_Cost “Landing Lights 2 Power Cost [%.3f]” (GroupGroundSocketsPowerCost)
Number Lightwave_LandingLights2_Energy_Cost “Landing Lights 2 Energy Cost [%.2f]” (GroupGroundSocketsEnergyCost)

//LandingLights1
Switch Lightwave_LandingLights1_switch “Landing Lights 1” (GroupGroundSockets)
Dimmer Lightwave_LandingLights1_dimLevel “Landing Lights 1 dimLevel” (GroupGroundLights)
String Lightwave_LandingLights1_dimSetup "Landing Lights 1 dimSetup "
Switch Lightwave_LandingLights1_protection “Landing Lights 1 protection” (GroupGroundSocketsOther)
Number Lightwave_LandingLights1_power “Landing Lights 1 power [%.1f W] (Read Only)” (GroupGroundSocketsPower)
Number Lightwave_LandingLights1_energy “Landing Lights 1 energy [%.2f kWh] (Read Only)” (GroupGroundSocketsEnergy)
Switch Lightwave_LandingLights1_identify “Landing Lights 1 identify” (GroupGroundSocketsOther)
Switch Lightwave_LandingLights1_reset “Landing Lights 1 reset” (GroupGroundSocketsOther)
Switch Lightwave_LandingLights1_upgrade “Landing Lights 1 upgrade” (GroupGroundSocketsOther)
Number Lightwave_LandingLights1_diagnostics "Landing Lights 1 diagnostics "
String Lightwave_LandingLights1_periodOfBroadcast "Landing Lights 1 periodOfBroadcast "
Number Lightwave_LandingLights1_rgbColor "Landing Lights 1 rgbColor "
String Lightwave_LandingLights1_bulbSetup "Landing Lights 1 bulbSetup "
Number Lightwave_LandingLights1_Power_Cost “Landing Lights 1 Power Cost [%.3f]” (GroupGroundSocketsPowerCost)
Number Lightwave_LandingLights1_Energy_Cost “Landing Lights 1 Energy Cost [%.2f]” (GroupGroundSocketsEnergyCost)

//BathroomLights
Switch Lightwave_BathroomLights_switch “Bathroom Lights” (GroupGroundSockets)
… and so on

Going through the .items file I realised it’s a massive help if you section it up using a comment line that shows the name as I’ve done above. I’m pretty sure you’re already extracting and using the name so hopefully this should be easy. Maybe even with a blank line before each comment as well as I’ve done.

The other difference here is that LandingLights 1 and 2 are linked for 2-way switching/dimming in the LWRF app. LandingLights1 is the master, and LandingLights2 as the slave has a few items that get missed off because they are now a pair. Might be unimportant in the long run, but at least you’ve got an example of how a 2-way setup looks in the API

I did have that all done and I will re add, got lost when I re wrote the refresh rule