LightwaveRF Binding Updated

Ditto, when I bought it I thought I could use v1 binding… damn

All good as it’s pushed me to learn java which I need for my portal/app development for my company. (Well C#/MVC/.net, but they look very similar)

Sure they’ll be some little niggles along the road but fundamentals are there now

Be good if someone can push the amount of items to fetch at once and get the ‘structure not found’ etc so I can devise the best way to handle the errors

Any idea (without hiding) how you can stop the things being discovered when you’ve created them via .thins?

That’s one of my pet hates and on my list to look at down the line. Literally every binding I have does it when using text files and changing the name from the discovered name

I was just typing that I don’t see that with all bindings, but realised I had in fact set some to ignored, so that was why.

Yeah, I agree, that’s really annoying behavior, especially as it takes it out the list automatically, but comes back after a rescan

Have you got any: discovery result blah blah in your logs still…
Put them up as they appear if you have so I can see

It’s ok ran a scan…

2020-02-10 22:58:27.388 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:2' has been added.
2020-02-10 22:58:27.389 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:3' has been added.
2020-02-10 22:58:27.391 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:4' has been added.
2020-02-10 22:58:27.392 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:5' has been added.
2020-02-10 22:58:27.393 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:12' has been added.
2020-02-10 22:58:27.394 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:11' has been added.
2020-02-10 22:58:27.395 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:6' has been added.
2020-02-10 22:58:27.397 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:7' has been added.
2020-02-10 22:58:27.398 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:9' has been added.
2020-02-10 22:58:27.399 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:10' has been added.
2020-02-10 22:58:27.400 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:13' has been added.
2020-02-10 22:58:27.401 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:14' has been added.
2020-02-10 22:58:27.402 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:s22:benfleet:15' has been added.
2020-02-10 22:58:27.403 [home.event.InboxAddedEvent] - Discovery Result with UID 'lightwaverf:h21:benfleet:1' has been added.
2020-02-10 22:58:28.064 [vent.ItemStateChangedEvent] - Camera2_MotionAlarm changed from ON to OFF

==> /QPKGs/OpenHab/userdata/logs/openhab.log <==
2020-02-10 22:58:27.388 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:2' to inbox.
2020-02-10 22:58:27.389 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:3' to inbox.
2020-02-10 22:58:27.390 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:4' to inbox.
2020-02-10 22:58:27.392 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:5' to inbox.
2020-02-10 22:58:27.393 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:12' to inbox.
2020-02-10 22:58:27.394 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:11' to inbox.
2020-02-10 22:58:27.395 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:6' to inbox.
2020-02-10 22:58:27.396 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:7' to inbox.
2020-02-10 22:58:27.397 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:9' to inbox.
2020-02-10 22:58:27.399 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:10' to inbox.
2020-02-10 22:58:27.400 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:13' to inbox.
2020-02-10 22:58:27.401 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:14' to inbox.
2020-02-10 22:58:27.402 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:s22:benfleet:15' to inbox.
2020-02-10 22:58:27.403 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lightwaverf:h21:benfleet:1' to inbox.

Think I’ve solved it, will test tomorrow.

Just uploaded a new version (1.0.4) that stops discovery of already added devices.

Looks good, nothing coming up now, I’ll remove something from my things file just to test it comes back though :slight_smile:

damn forgot to alter your battery multiplier, give me 5.

Yep, that worked, it doesn’t remove them from the inbox, but if I remove them they don’t come back, unless I remove from my things file, and then it comes back.

Good work!

@xela just uploaded new (1.0.5) - let me know it works (battery level fix)

For any new issues relating to v2 binding please use the new thread from now on
Have submitted a pull request for the binding, lets see how bad my coding skills are :slight_smile:

Unfortunately not, and this came up in the log that looks related

18:35:44.912 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Value must be between 0 and 100
        at org.eclipse.smarthome.core.library.types.PercentType.validateValue(PercentType.java:57) ~[?:?]
        at org.eclipse.smarthome.core.library.types.PercentType.<init>(PercentType.java:42) ~[?:?]
        at org.openhab.binding.lightwaverf.internal.handler.DeviceHandler.updateChannels(DeviceHandler.java:360) ~[?:?]
        at org.openhab.binding.lightwaverf.internal.handler.DeviceHandler.updateChannels(DeviceHandler.java:317) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_232]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_232]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_232]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

Ok, just trying to fix a build problem and I’ll have a look
Use 1.0.4 for now

Got almost the whole house on the binding now. The few devices left in the script polling are hitting Structure Not Found 80% of the time now, probably becuase I’m polling extra stuff in the binding that I didn’t poll for before (rgbColor, identify and protection).
Will the binding output an WARN if it gets a response failure / structure not found back from LWRF? Or is there some other way I can monitor how well it’s doing under the hood?

UPDATE
Yes, I’ve hit the limit. I’ve added another device and now the binding isn’t seeing status updates from the existing ones

if you have left at the default settings you shouldnt get any structure not founds.
default is 5 seconds - 20 items.
so if you have 21-40 items will poll 20,5 second gap, poll 1-20 items, 5 second gap (so 10 second loop)
41-60 items - 15 second loop…
see where this is going?
you can increase though, 30 items was the optimal, there was no speed increase above this.

Just uploaded 1.0.6, should have fixed battery level

How many devices are you polling on the binding?
How many are you polling on the script?
Also I remember you saying you split the script in 2, so are there 2 scripts and the binding running?
Change log level to debug and you’ll see what’s happening under the hood as will give you the json response. Pm them to me

Working!

Will move to new thread now

1 Like

Right I’ve turned off the old script polling altogether and rebooted and the binding is posting item statuses in the log again now.
As of right now I’m polling for 95 items/statuses and to run the whole house I’ve got to add about another 20
Control of things with the binding seems to be responsive, no more than a second from doing something in the sitemap to it happening in the house. Updates are a bit variable though, for example I just turned on a light and the switch mimic updated almost at once but it took 11 seconds for the power consumption value to update. Dimlevel changes can also be a bit hit and miss.