Dummy items: to send the "reinitialise" command to a ZWave device and "network sync"

Hello all,

I’m working on migrating at home from the old z-way binding to the z-wave one, and so also from OH2.2 to 2.4.

In doing so, a number of Qubino dimmers, and a rgbw dimmer are behaving in unexpected ways once they receive commands.

I have restriced some of those unwanted behaviours through rules, however the one that’s proving to be more of a headache is the RGBW dimmer, which after an apparently random amount of time starts mixing up the color control and white channels and skipping between values while dimming.

This behaviour disappears(or can be reined in with rules) after i send a reinitialise command from habmin - but reaching habmin isn’t always handy.

I would like to place a dummy item in simple ui (through sitemaps) to trigger a rule that sends the reinitialise action to the device. I am fully aware that is a bandage type solution, yet i’m sure, while the database widens that would come in handy for many new devices even in the future .

Also a network sync available action to use in rules would be nice.

Did i miss them -are they available?

What unexpected ways? Chances are, the Command Polling interval is shorter than the time it takes for the device to actually change to the level in the command. If so, increase the Command Polling interval, or disable it if your devices report their states on their own. It would be much easier to help if you’d state what the issues are, rather than asking for ways to implement a solution that may not be what you need.

Having to repeatedly reinitialize the devce definitely sounds like a bandage. You could be losing associations, which was addressed after 2.4, but I’m guessing without more of an explanation of the actual issue. This should be possible though, using the REST API.

By ‘network sync’, do you mean the daily heal? Healing every device frequently will slow your network down, and if nothing has moved, dies, or been replaced, it is unecessary. If you’ve only just upgraded, give the network a a few heals to settle, as previous versions of the binding did not have the heal functionality.

I could go into details about what the unexpected behaviours are, and i will do so, in another post dedicated to that, after i finish at least getting my network running decenlty after moving away from OH2.2 +Z-way Binding

Increasing the polling interval won’t make the switch item linked to the dimmer thing go OFF when the dimmer item(linked as well) goes to 0 or ON when it goes above 0. but again, this is OFF TOPIC. And i don’ìt recall stating anywhere about not wanting to contribute with a topic dedicated to that, simply, my time is limited too, and my top priority is getting my home back up and running. once that is done, i can try contributing in other ways.

My intention isn’t ‘not helping the community’, but rather, i’m asking for something that i feel could be benefical for many.

In an ideal world we are all programmers and can devote unlimited time to OH and can help the developers leverage our knowledge at an astounding pace.
In practice, as for me:this isn’t my job(by which i mean, i’m not a programmer by trade nor i have any schooling in that, so there is little to leverage), my time is limited as any adults’ time and there are (+hopefully always will be) a plethora of new z-wave devices coming to market that won’t be always possible to have fully integrated by hour 0 of them becoming available, noone has the magic wand, so sometimes a bandage could be helpful.

The 2 bandages that i talk about are available in habimn

image

image

Coming from Z-way, i guess the network sync would be what in there is the routing reorganisation, where as reinitialising the device seems to redo the interview and call for NIF.
They shouldn’t be detrimental in any way to the network, but i could be wrong.

I completely get that those 2 functions shouldn’t be directly available to the end user who doesn’t know how OH works,like my family, but they use mostly voice commands, hardly ever go into HABPanel, and completely disregard the simpleUI, which i use mostly to display dummy items and calculated values for debugging purposes, and 2 clickable buttons to represent the 2 bandages above without me having to go into habmin, would fit in nicely.

That is why i’m asking whether there are corresponding actions available that can be called upon within a rule…

The UIs are using the REST API to communicate with OH, so everything that a UI can do, you can do in rules. If you use the new rule engine with JSR223, you can also access the Java classes in your rules.

‘Synchronize the network’ is used to sync the network e.g. with a secondary controller, so it doesn’t appear to be what you are trying to do. To have all devices report their neighbors to the controller, you need to do a network heal, which occurs daily (or disabled),and is configured in the controller Thing. A heal will slow down your network, especially if you have a lot of devices.

‘Reinitialize the device’ wipes the cached info that OH has learned about a device, and then reinterrogates the device by going through the initialization process again. This can take hours/days/never for a battery powered device (depends on wakeup interval).

1 Like

TY :slight_smile:

Unfortunately i’m only gradually becoming accustomed with rules DSL and Xtend, which is already making my lack of java knowledge painfully clear (underlying logic preparation and flow diagrams aside), so i did not venture into JSR223, which i’m guessing will be another step to get deeper into the rabbithole, particularly after OH 3.0 (and wil require me learning python)

But for now:
putting a rest call in a script file and then calling it thorugh a rule in rules DSL syntax - Actions | openHAB
or a
Actions | openHAB
in line of principle should work, right?

I’ve been researching the rest api page… Having located the thing UID, i dont’ know how to extrapolate what rest call’s body corresponds toa z-wave device reinitialisation to use the rest api page to construct the coorect curl call.
I guess the corresponding command is connected to image ,

Looking at the logs, when i start the device reinitialisation the first 2 things that appear are:

2019-03-29 12:03:03.252 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:eed28d9d:node4' has been updated.
2019-03-29 12:03:37.288 [hingStatusInfoChangedEvent] - 'zwave:device:eed28d9d:node4' changed from ONLINE to ONLINE: Node initialising: EMPTYNODE

Any pointers?
also reading through the forum i couldn’t locate any info … or maybe i just didn’t realise i was loooking at the solution…

Use your browser’s development tools (usually F12) to view the calls being made when selecting reinitialize device. Then use those in RESTDOCS to test it, and it will also provide the curl statement…

curl -X PUT --header "Content-Type: application/json" --header "Accept: application/json" -d "{action_reinit:	true}" "https://<your_OH_server>:8443/rest/things/<your_Thing_UID>/config"

There are some examples of using the REST API in a DSL rule here…

1 Like