Page 1 of 1

Set clock of z wave device

Posted: Thursday 13 May 2021 7:53
by sailmich
Rpi3/domoticz beta/Zwave stick
Hello, I have two devices MH7H WH up and running. The devices displays also date and time. Unfortunately is the clock very inaccurate after a while. When in ozwcp selecting the device under information Set Date/Time and submit, the device will get the actual real time. I tried to analysed the network traffic but couldn't get a http command for use in dzvents. Is there a possibility for a script in dzvents?
Any help appreciated!

Re: Set clock of z wave device

Posted: Thursday 13 May 2021 9:10
by mgugu
May be a hint: I got a similar problem with a Qubino temperature sensor which was not automatically updated. It was possible to update manually via the refresh command in ozwcp/information.
Chrome dev tool shows that the issued command is:

Code: Select all

http://<domoticzIP>:8080/ozwcp/refreshpost.html with:
method : POST
data : fun=racp&node=<nodeID>
Content-Type': 'application/x-www-form-urlencoded'
That you can reproduce via curl:

Code: Select all

curl -d "fun=racp&node=<nodeID>" -X POST "http://<domoticzIP>:8080/ozwcp/refreshpost.html"
I made a dzvents script to generate this command periodically.
This worked, but only for a few hours...
I found that to remake it working I had to manually open before the hardware page at http://<domoticzIP>:8080/#/Hardware/<hwid>
I tried to automate that but it did not work.
I thought about an authentication problem so I included cookies management in the process: Not better.
In fact the hardware page has to be opened in a real browser, may be that linked javascript initialize something, don't know.
Finally the solution I found is to use a virtual browser (definitely not elegant !). I used Selenium with nodejs but you can find it with Python.
It worked

Re: Set clock of z wave device

Posted: Friday 14 May 2021 7:25
by sailmich
Thanks for your answer. The time is not that important when I know that I can't trust the clock I just ignore it. I will stay with wrong time as long as I don't get an easy solution.
Cheers