LightwaveRF Binding Updated

Just a little update…
I’m well on my way to creating the binding and hopefully will have something for you to all test by the end of next week.

1 Like

@Delid4ve Well done sir. Once you get somewhere would you share the code with me? I’d like to see how it’s done

@Fixer of course, once I’ve got it semi working ill put it on git anyhow.
Need a ‘JAVA For Dummies’ Book right now :slight_smile:
Still getting my head around the language.

@Delid4ve Have a look at
https://www.w3schools.com/ I’ve found it good for Perl, Python and PHP.
Never managed to get my head round Java though, just seems so needlessly complex - why do it in five lines of code when fifteen will do lol

that looks alot better than what ive managed to cobble together! I need to sit down and really try and arrange stuff better!

@Fixer @xela @s73ven @Greigc Nearly there…


2 Likes

@delid4ve fantastic work mate well done

Looking good!
Let us know when you want some help with the testing

Wow, great work

@Fixer not far off, maybe even tomorrow as got a free night tonight
Still a long way to go tho

Got a bit delayed getting my head around lists/arrays/Gson but I’m back on track.

1 Like

@Fixer @xela @Greigc @s73ven
Could anyone that has devices other than sockets and also gen1 stuff, and is running my interim script turn on logging for the structure response and pm me the result.
Should be a json starting with group, then devices, featuresets, features

Need it to integrate into the binding.
Shouldn’t take me long to add it in and we are good to go

Will do, but it will be this evening

@Fixer no problem

2020-01-27 09:09:42.001 [TRACE] [ightwaverf.internal.api.LWConnection] - Response: {"message":"Request rate reached limit"} 

100% a limit

I’ve never managed to hit that, but I do see the structure not found messages which seem to be sent after a timeout on the LV side

@Fixer @xela @s73ven @Greigc
Only sockets integrated at present but have a look see what errors come up, hopefully all good. Give me any feedback (still alot of work to be done)
remove the pdf extension.

org.openhab.binding.lightwaverf-2.5.2-SNAPSHOT.jar.pdf (64.3 KB)

I have put reset/upgrade etc on the main device,
featuresets are what you want for the actual switches etc)

start by adding an account with username and password, then run discovery

I’ll get it all on git once I’ve added the other devices later on

@delid4ve Will PM you my structure shortly

New version:

  • Thermostat integrated
  • Dimmers integrated.
  • Removed FeatureSet prefix (put in for testing)
  • Fixed Api linit being hit and changed polling process

org.openhab.binding.lightwaverf-2.5.2-SNAPSHOT_v1.1.jar.pdf (71.0 KB)

If you added lots of devices prior to this version you will probably have to remove them and re-add as i haven’t added configuration updates in yet

Cool. I’m out rest of today, will try to have a go Wednesday.
As a matter of interest, how did you improve the polling process?

So with the script it was fetching every bit of data in one go, for me that doesnt work and i had to split it in to 2 x scripts due to the amount of devices ({structure not found}) - same goes if i try in the binding.

I initially was polling for each channel individually to test - ({API rate limit exceeded}) once i got over about 6 devices

So it now works as follows:
For each ‘Thing’ the binding does a batch data read for its channels and updates accordingly.
Its quite a heavy process as I have to evaluate the item data against the response but it seems to be working ok. Ive since also changed the code slightly to make it more efficient and I’m still evaluating other ways I can process the data.
At present with 40 devices (double sockets count as 2) I can get the polling to every 18 seconds (just because of the amount of Http requests)
The binding doesn’t have much error checking at present (set to debug or trace if you want to flood your logs)

Like i say, plenty to do still, oh and I havent implemented all updates from openhab --> lightwave yet so don’t be suprised if setting a temperature doesnt work at present. All status changes from lightwave --> openhab should be working though.

Ill be working on more this week and will keep you all updated, if you could do the same the other way.