LightwaveRF - New LightwaveRF Binding

Hey Dave,
The guys from Lightwave confirmed that i can add a second LinkPlus to my account, no need to create multiple accounts. I have ordered a second one and once i have it i will test it and let you know

Hi i’m new to OpenHab and am looking to use my LightwaveRf devices with OpenHab and then expand to include Sonoff etc.
When its loaded it appears in the configuration-binding tab not as an addon. I assume this is correct ? I note that the description indicates that Lightwave TRVs and Relays work but when I load the Binding these show up as unknown ?
As I doing something wrong , many thanks

@KOTECH Can you send me the model numbers and supported channels from the devices - if you go into each thing and expand The properties it should all be listed - it may be they are model numbers I haven’t added in.

Send the screenshots over and I’ll get them added ASAP

Hi Dave
Many thanks for your response , hopefully the following is what you need:-
My HUB is GEN2 my devices are all GEN1 at the moment.

The system appears to know what the devices are but show up as unknow device so I cant link them. This is for all my TRVs,Relays and the one double power socket.
I also have the problem with a linked thermostats. When I instruct the Thermostat to increase the set point it increase but after a few seconds it returns to the old value almost as if the command was not successfully sent and its read back the old setpoint.

regards
Kevin

TRVs LW922
DinningTRV (lightwaverf:device:7045c2f2:20) from the inbox
WINDOWTRV (lightwaverf:device:7045c2f2:17)
MainBedRoomTRV (lightwaverf:device:7045c2f2:26
StudyRTV (lightwaverf:device:7045c2f2:2)
WALLTRV (lightwaverf:device:7045c2f2:16)
UrsulaBedRoomTRV (lightwaverf:device:7045c2f2:23)
KitchenTRV (lightwaverf:device:7045c2f2:21)

I then added the Dinning Room TRV to Things so I can send you the properties

DinningTRV

Available Channels Channel 1: temperature,targetTemperature,valveLevel,heatState,batteryLevel,rssi,identify,diagnostics,valveSetup,callForHeat
Category Heating
Channel1 Channel: 1, Name: Dinning Radiator
Channels 1
Description TRV
Device valve
Device ID 5c570421a24ff30925512ccb-20-3157337162+1
Generation 1

RELAYS LW821
I have the following 2 RELAYs which I added to Things.

Available Channels Channel 1: threeWayRelay,identify
Category Power
Channel1 Channel: 1, Name: Lounge Bay Curtains
Channels 1
Description 500W Relay
Device relay
Device ID 5c570421a24ff30925512ccb-34-3157337162+1

My RELAY s which is GEN1

Lounge Window Curtains

Available Channels Channel 1: threeWayRelay,identify
Category Power
Channel1 Channel: 1, Name: Lounge Curtains
Channels 1
Description 500W Relay
Device relay
Device ID 5c570421a24ff30925512ccb-32-3157337162+1
Generation 1

POWER SOCKET LW260

AlexBedRoomSkt2 (Double Socket)

Available Channels Channel 1: switch,protection,identify
Category Power
Channel1 Channel: 1, Name: Alex Bed Room Socket-2
Channels 1
Description One Gang Socket
Device socket
Device ID 5c570421a24ff30925512ccb-30-3157337162+1
Generation 1

I just saw you wanted all Device IDs so here are all TRVs, Many thanks for your assistance.
Kevin

TRV DEVICE IDs

Device ID 5c570421a24ff30925512ccb-17-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:17

Device ID 5c570421a24ff30925512ccb-16-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:16

Device ID 5c570421a24ff30925512ccb-23-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:23

Device ID 5c570421a24ff30925512ccb-2-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:2
Device ID 5c570421a24ff30925512ccb-26-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:26

Device ID 5c570421a24ff30925512ccb-21-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:21

Device ID 5c570421a24ff30925512ccb-22-3157337162+1

From http://localhost:8080/paperui/index.html#/configuration/things/view/lightwaverf:device:7045c2f2:22

@KOTECH I should have time to look at it Monday
Can you send me the log of when you change the stat temperature - just normal event and warning log should be fine no need for debug

@KOTECH try this:

org.openhab.binding.lightwaverf-2.5.2-SNAPSHOT_2.1.jar.txt (62.2 KB)

I’m not sure how the relay is going to be interpreted as the physical device has 2 switch contacts, yet the api only gives a single channel. I have set this up as a number to debug, could you add the channel and then control the relay from the lightwave app and send me the log outputs so i can see what its doing, ie:
1 ON 2 OFF
1 OFF 2 ON
Both OFF
Both ON
(don’t control the relay from openhab yet)

Also the double socket, this only has one channel too which is strange. Can you only control the socket as a whole from the app? it may be similar to the relay so once i have some more info i can probably work it out.

Also just add them by autodiscovery and ui created channels atm.
When added device types should be:
Relay: r13
TRV: t12
Socket : s12

Hi Dave
The Double socket does have two channels, I must have only sent the one, please find properties for both channels below and the TRV after loaded the latest .JAR

Ive done the following
1.Removed all the “Things” that were unknown
2.Downloaded the latest .JAR you provided and renamed my old .JAR so it wont be used.
3. Restarted OpenHab
4. Ran Search in Inbox to find the previously unknown TRVs , Relays and Double Socket.
5. Added the Relay (Curtain shows up as Open/Stop/Close in LightwaveRF App) to things it still shows relays,trv and double socket as unknown so I cant link anything to it and control from openhab.
6. From the Lightwave app I pushed OPEN and CLOSED and STOP to control the relay multiple times. (command STOP less frequently)
7. Filtered out the lightwaverf events and Uploaded the events log.

Many thanks for your efforts.

Double SOCKET Properties

Available Channels Channel 1: switch,protection,identify
Category Power
Channel1 Channel: 1, Name: Alex Bed Room Socket-1
Channels 1
Description One Gang Socket
Device socket
Device ID 5c570421a24ff30925512ccb-29-3157337162+1
Generation 1
Name AlexBedRoomSocket
Product LW260
Product Code LW260
sdId 29
Type lwrfOneWay_v1
Available Channels Channel 1: switch,protection,identify

|—|---|
|Category|Power|
|Channel1|Channel: 1, Name: Alex Bed Room Socket-2|
|Channels|1|
|Description|One Gang Socket|
|Device|socket|
|Device ID|5c570421a24ff30925512ccb-30-3157337162+1|
|Generation|1|
|Name|AlexBedRoomSkt2|
|Product|LW260|
|Product Code|LW260|
|sdId|30|
|Type|lwrfOneWay_v1|

When I edit the Relay Thing

Bridge Selection

Lightwaverf Account - lightwaverf:lightwaverfaccount:7045c2f2
RELAY PROPERTIES

Available Channels Channel 1: threeWayRelay,identify
Category Power
Channel1 Channel: 1, Name: Lounge Curtains
Channels 1
Description 500W Relay
Device relay
Device ID 5c570421a24ff30925512ccb-32-3157337162+1
Generation 1
Name WindowCurtains
Product LW821
Product Code LW821
sdId 32
Type lwrfOneWay_v1

==============EVENTS LOG==============================
events.log (7.4 KB) openhab.log (2.5 KB)

Hi Dave
I looked up the Relay in the LightwaveRF Api it appears you send the following
F( for open
F) for Close
F^ for STOP

Text from API below:-
“Open and Close commands can be sent to the JSJSLW821 (500W relay) only. Dimmer and on/off devices will ignore any open, stop or close commands. The commands are F( for open, F) for close and F^ for stop.”

regards
Kevin

Hi Dave
I think I have found the problem with the target temperature.

This is setup in the Thing with the Dimension “Temperature”

You appear to be sending the unit with the command
2020-04-19 22:12:42.995 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.lightwaverf.internal.handler.DeviceHandler@4d9ee5b6’: For input string: “19.5 °C”
java.lang.NumberFormatException: For input string: “19.5 °C”
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[?:1.8.0_242]
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) ~[?:1.8.0_242]

If I define the target temperature as dimensionless it appears to work.

So I think the problem is that you append the unit ??
regards
Kevin

@KOTECH haven’t forgotten about you but my virgin hub went down and waiting for a replacement, got internet tethering my phone to my MikroTik router but it’s purely for modern warfare atm :stuck_out_tongue_closed_eyes:
Once I get my vpn back up I’ll take a look

Many thanks Dave just to let you know I’ve also setup a Linux box alongside my pc and using your same .jar with the stable openHAB release does show the TRVs,Relays and socket as known and the TRVs are all working as expected. I will collect the requested data for the relays on this Linux box and send you the logs later today.
Regards
Kevin

Any news on the relays Dave ?

Kevin

@KOTECH is it just the relays not working?
What did you use to discover the commands? I’ll try jump on today, sorry been a tad busy.
Also is the temperature issue present you said about above?

Hi delid4ve just to report the version we last discussed ages ago is still working for me like a good 'un. Still happy to test stuff for you if there’s anything new in the works.

1 Like

Hi @delid4ve. Downloaded this binding a few days ago. Brilliant work. Thank you.

I have some gen 1 gear but have migrated it all to RFXcom so that I have local control. I plan to keep it that way and really only need the hub for initial pairing.

I have a question about the energy monitor and you may have the answer. I have to use the hub to get this to poll energy readings for me - I haven’t managed to get the RFXTRX433 to extract this data unfortunately. I previously used a gen 1 link but mine died a week ago and I switched to the newer link plus hub. The issue - I notice that the link plus hub cumulatively measures total energy. This differs from how it was measured with the previous gen 1 hub. This would reset this figure at midnight so that I got a logical daily reading I could extract and log in InfluxDB. Anyhow no major problem - I have a script running in node red (I use this to manage all my disparate IOT devices and run my rules. Additionally it manages my devices via homekit so I can get remote oversight and some notifications) that will calculate the 24 hour usage at midnight and extract this.

My question is around the energy reset button in the binding. It doesn’t appear to work with the energy monitor or at least not for me. Do you know if it only works on the newer gen 2 kit with integrated power readings, e.g. sockets, per chance?

My setup: Openhab 2.5.3 running on a windows laptop as a service in case this is relevant as I know most people run Openhab on a pi or similar lightweight platform. I just had an old laptop that wasn’t used so I repurposed it.

Anyhow great work again. This was a huge amount of work.

@RoscoBosco Hmmm…
I personally haven’t tested the reset energy (due to everything going on atm) and my dev machine is at my office which I’ve shut at present. I don’t know if anyone else has tested and can’t remember if I tested now when I integrated it (sure I would have done)

You can as a workaround though use the app and you can set the reset period To various timeframes if this helps.

I’m taking note of all the bits in this thread and will look into them as soon as pos

Just one thing to check…
When you first put switch in will be null.
Did you change it a few times to on - off -on
Send me the logs.

Hi Dave. Thanks for the reply.

Here is the log. Don’t know it will help!!!

image

I had looked at the app also but there is no reset option listed for the Energy monitor anywhere. Not even as an automation. Only notifications for certain defined parameters seem to be allowed. Perhaps being such an old piece of kit it doesn’t work. Perhaps @Fixer can help. He seems to possess one of these devices and might point me in the right direction. Thanks again.

I have a monitor now, I’ll have a play with the API see what I can get it to do

Edit: Seems the only writable attribute is the identify:

{
“deviceId”: “5df8b6728522075debd21ad8-8-3157346060+1”,
“name”: “Monitor”,
“productCode”: “LW600”,
“featureSets”: [
{
“featureSetId”: “5df8b6728522075debd21ad8-5eda48a59dfa5f6942218193”,
“name”: “Monitor”,
“features”: [
{
“featureId”: “5df8b6728522075debd21ad8-99-3157346060+1”,
“type”: “power”,
“writable”: false
},
{
“featureId”: “5df8b6728522075debd21ad8-100-3157346060+1”,
“type”: “energy”,
“writable”: false
},
{
“featureId”: “5df8b6728522075debd21ad8-101-3157346060+1”,
“type”: “rssi”,
“writable”: false
},
{
“featureId”: “5df8b6728522075debd21ad8-102-3157346060+1”,
“type”: “identify”,
“writable”: true
}
]
}
],
“product”: “LW600”,
“device”: “Energy Monitor”,
“desc”: “Energy Monitor”,
“type”: “lwrfTwoWay_v1”,
“cat”: “Sensor”,
“gen”: 1
},