LightwaveRF Binding Updated

squeaky bum time over :stuck_out_tongue_closed_eyes:

Mostly over. It seems to have borked a few other things including my mqtt location tracking but at least the basics are back

My system takes about 10 minutes to reload everything after clearing the cache (on a 2ghz Celeron NAS with 16gb ram), maybe a little patience.
I have everything in text files for this reason.

Okay, back in the land of the living now.
The energy monitor still needs a couple of multipliers sorting.
I’ve posted my log on Git to illustrate. The issue’s closed and I don’t know how to reopen it but have a look anyway

@Fixer so rssi*10 and power /10

Can you check your other items as my power on my sockets seems to be correct

Here’s the display from my Sitemap of the original, script-derived, power stuff. Some of it is calculated so ignore those, but Mains Power and Mains Energy is coming direct from the energy monitor

The RSSI is in a different place in the Sitemap:

The log I posted in Git shows the difference between the values from the script and the binding, but I suppose it depends on what units you want it to display in. As long as you state what you’re providing then people will know to convert it themselves

@Fixer Have just put a new version on git to correct power and rssi, give that a try

Can I just drop it in, or do I need to shutdown / restart / clear user and cache (nooooooooo
)

Just drop it in

It was only because of a major rewrite cache had to be cleared. Think the overall code is pretty sound now, was a very very steep learning curve.
Got a lot of error checking and conditional elements to add in still by the overall foundation I’m pretty happy with now - after 4 hours today pulling my hair out :joy:

You’ll get a lot of warnings with that interim build I just put up where I’m trying to get this rgb right

Dropping it in has broken it.
Had to restart OpenHAB and now your binding isn’t showing up in the list anymore and my LightwaveRF Account thing is Uninitialized with nowhere to enter the account credentials.

Hmm

Take it out. Give it a sec and drop it back in

No, it’s toast now. The Lightwave Account thing and the Energy Monitor thing are stuck in ‘Deleting’ state and still won’t delete even after a restart. Looks like I’m going to have to remove the binding, restart, then put it back in and set it up again

Strange, will it not let you force remove if you click on delete again

Close, but no cigar :wink:
I wish my house would only draw a couple of watts with the washer and dryer both on

So I went the wrong way yeah

Give me 5 I’ll let you know when I’ve put another up

The number’s right. Just the unit (W) should say KW

Yeah it’s going to be Watts, not kw, as too big a unit for a small thing drawing on a plug socket
You can format how you want though on panels etc with regex (only the energy monitor that’s going to use a number that big)

so if you havnt looked at the readme yet

each device has its channel names listed under the device properties.
the account thing also lists all configurable items under its properties.

you can define things file like this(model codes in readme):

Bridge lightwaverf:lightwaverfaccount:benfleet "Lightwave Account" [ username="emailaddress", password="xxxxxxxx"] 
{

h21 	LightwaveHub	"Link Plus"				          [ sdId="1" ]
s22 	KitchenSocket1 	"Kitchen Alexa & Toaster"		  [ sdId="2" ]
s22 	KitchenSocket2 	"Kitchen Spare & Kettle"		  [ sdId="3" ]
s22 	KitchenSocket3 	"Kitchen TV & TV Light"			  [ sdId="4" ]
s22 	KitchenSocket4 	"Kitchen Breakfast Bar"			  [ sdId="5" ]
s22 	Socket1 	    "Tree Top & Bottom"			      [ sdId="6" ]
s22 	Socket2 	    "Tree Middle & Red Lights"		  [ sdId="7" ]

s22 	Socket3 	    "Reindeer & Stars"			      [ sdId="9" ]
s22 	Socket4 	    "Father xmas & Iscicle"			  [ sdId="10" ]
s22 	GeorgesSocket1 	"George TV & Lamp"			      [ sdId="11" ]
s22 	KitchenSocket5 	"Kitchen Microwave & Cupboard"    [ sdId="12" ]
s22 	LoungeSocket1 	"Lounge Chair"				      [ sdId="13" ]
s22 	LoungeSocket2 	"Lounge Stereo & Nintendo Switch" [ sdId="14" ]
s22 	LoungeSocket3 	"Lounge Network Switch & TV"	  [ sdId="15" ]

}

and items like this:

Switch	KitchenAlexa_switch			"Kitchen Alexa switch"      		 <switch>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:1#switch" }
Number	KitchenAlexa_power			"Kitchen Alexa power [%.1f W]" 		 <energy>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:1#power" }
Number	KitchenAlexa_energy			"Kitchen Alexa energy [%.2f kWh]"    <energy>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:1#energy" }
Number	KitchenAlexa_voltage		"Kitchen Alexa voltage [%.1f V]"     <energy>		(Lightwave_Sockets)	                { channel="lightwaverf:s22:benfleet:KitchenSocket1:1#voltage" }

Switch	Toaster_switch			    "Toaster switch"	               	 <switch>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:2#switch" }
Number	Toaster_power				"Toaster power [%.1f W]"			 <energy>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:2#power" }
Number	Toaster_energy			    "Toaster energy [%.2f kWh]"			 <energy>		(Lightwave_Sockets)					{ channel="lightwaverf:s22:benfleet:KitchenSocket1:2#energy" }