OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 911 forks source link

Report status in ZWave #862

Closed jotakar closed 8 years ago

jotakar commented 8 years ago

I use Domoticz and I see that double relays modules are reported as 3 relays: 1 common and one more for every real relay I've observed that when we turn it ON/OFF manually, it sends to controller a signal for the common relay, but this data has no information about which relay has been turned ON or OFF. The bidirectionality is broken. In Domoticz there is a workaround to solve this issue: a script that poll the device when it has been manually switched. This get the status of every relay. So we avoid polling for all the switches in the net. I wonder if it would be posible to add this functionality to ZWave library, so this script will be unnecessary. I mean: when switch module is manually activated, it sends a signal and controller updates satus of the common relay. The new funcionality I refer to is one that make a \ poll of the module in this time and return the status of every relay**. So controller knows which relay has been activated by hand.

I don't know too much about how ZWave works, so I don't know if this suggestion nas no sense or if it must be a function of the controller (Domoticz in this case). Thanks

Fishwaldo commented 8 years ago

Could you post a OZW log snippet when you manually activate a change.

You could use something like: `

`

But I need to look at the log to tell you exactly what to put in the config.

@nechry This just gave me a idea on a workaround for the Multi-instance Issues on Qubino Devices. We might be able to do the same..

nechry commented 8 years ago

I try TriggerRefreshValue with other device and I will also add this behavior on some other device like aeon-labs to force a power refresh immediately after a switch CC, instead of wait for a power report.

@Fishwaldo I will do some tests with 2 relays qubino soon with the TriggerRefreshValue

nechry commented 8 years ago

@Fishwaldo for my knowledge, what is the RequestFlags attribute?

jotakar commented 8 years ago

Ok, I send the OZW debug file. The node with this doublé switch is Node0005 OZW_debug_nodo5.txt Thanks

jotakar commented 8 years ago

Sorry I didn't want close the issue!!!!

Fishwaldo commented 8 years ago

@nechry I dont think we should add this to other devices. I don't like putting "Policy" into OZW and prefer to only keep it as something that fixes bugs etc.

I think refreshing power values should be triggered by the application/user rather than OZW.

Fishwaldo commented 8 years ago

@nechry RequestFlags is dependant upon the CommandClass you are triggering. its basically the first variable passed to the RequestValue method on the CommandClass, which most of the time is not used, but some CC's do use it.

Most of the time its a flag indicating if the value is Static, Dynamic etc. Most times you can leave it at 0

nechry commented 8 years ago

@Fishwaldo Thank you for the explanation and advice. anyway I tested the RefreshTriggerValue with switch and refresh comes too soon, in conclusion, it is unnecessary in this case.

Fishwaldo commented 8 years ago

Please replace the file config/qubino/ZMNHBDx.xml with the attached version and tell us if this works.

ZMNHBDx.xml.zip

nechry commented 8 years ago

Hi @Fishwaldo, I will also try this with the ZMNHBA2, I use the polling to refresh the instance 1 with this is more easy, I think.

rofrantz commented 8 years ago

Hi @nechry is the ZMNHBA2 working for you with the existing config, because I can't control switches if I start with turning on switch 2. Qubino support told that we should see 3 switches: 2 for the real switches + 1 master which should rutn on/off both switches

jotakar commented 8 years ago

Well I’ve used this config file, but I deleted the last line (CommandClass id="96" mapping="endpoints") to get the three switches (two for relays and one for the virtual relay1+relay2).

And …it works!!!!!

Now my controller (Domotiz) shows real status of locally switched relays !!!

I’ll publish this result in Domoticz forum

Thanks

Juan Carlos

De: Justin Hammond [mailto:notifications@github.com] Enviado el: miércoles, 04 de mayo de 2016 6:31 Para: OpenZWave/open-zwave CC: jotakar; State change Asunto: Re: [OpenZWave/open-zwave] Report status in ZWave (#862)

Please replace the file config/qubino/ZMNHBDx.xml with the attached version and tell us if this works.

ZMNHBDx.xml.zip https://github.com/OpenZWave/open-zwave/files/248152/ZMNHBDx.xml.zip

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/OpenZWave/open-zwave/issues/862#issuecomment-216738678 https://github.com/notifications/beacon/ARrYdXTN6BzS88JeVc2sX89P642duO6gks5p-CEggaJpZM4ILMMd.gif

nechry commented 8 years ago

Cool, I did not yet get time for testing but is nice to read.

rofrantz commented 8 years ago

Ok @nechry I will test that config in a couple of hours. In case it works @Fishwaldo, do you think we should update ZMNHBA2 config file so that anyone should benefit from this fix ?

nechry commented 8 years ago

hi all, hi validate with a ZMNHBDx and a old ZMNHBA2 and it's work. I just send this patch internally for massive tests with jeedom users. but we can also apply in ozw

rofrantz commented 8 years ago

so @nechry you're basically saying that in order for my ZMNHBA2 double switch to work I should use that config file that was previously attached and: a) rename the file inside that archive from ZMNHBDx.xml to ZMNHBA2.xml b) remove that last line (CommandClass id="96" mapping="endpoints")

Right ?

Fishwaldo commented 8 years ago

@jotaka: thanks for testing. I'll push it to the official repo shortly.

Fishwaldo commented 8 years ago

@rofrantz: probably not. I'm sure @nechry will post a updated file soon.

nechry commented 8 years ago

@rofrantz no they don't share entire parameter definition and association grp. I will add only the valuetrigger policy on old file and remove the Cc 96 behavior

jotakar commented 8 years ago

I'just discovered that this modification on config file `

` seems to work also in a Philio PAN04 double relay. Perhaps it could be tested for others modules of relays to be include in config files.

Fishwaldo commented 8 years ago

@jotakar Please submit a PullRequest for the devices you have tested with this change and confirmed working. Its really hard to track different devices in issues with other devices.

Fishwaldo commented 8 years ago

Closing this.