/ZAutomation/api/v1/devices not reflecting true device state

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
mjm
Posts: 4
Joined: 13 Jun 2014 11:31

/ZAutomation/api/v1/devices not reflecting true device state

Post by mjm »

I'm currently running v1.7.1 and I'm trying to use the REST API to set and read some Duwi switches. This works with commands like

Code: Select all

http://razberry.local:8083/ZAutomation/api/v1/devices/ZWayVDev_2:0:37/command/on
.
I can query the status of the switches with:

Code: Select all

http://razberry.local:8083/ZAutomation/api/v1/devices
. So far so good.
The problem is that when I use the manual on/off switches on the Duwi switches the old on/off status is reported, not the actual status.
How can I force an update?

TIA

Marcel
SolarFlor
Posts: 261
Joined: 22 Mar 2014 15:23

Re: /ZAutomation/api/v1/devices not reflecting true device s

Post by SolarFlor »

mjm wrote: How can I force an update?
I had a similar problem with the switch AEON MES. The problem was that the device was not reporting the status to the controller. I have solved the issue (thanks to sdh) by setting the parameter 80 to 2.Maybe a similar setting is needed in your case as well


viewtopic.php?f=3422&t=20462
mjm
Posts: 4
Joined: 13 Jun 2014 11:31

Re: /ZAutomation/api/v1/devices not reflecting true device s

Post by mjm »

Thanks for the suggestion. Unfortunately where in the UI I would set the magical parameter 80 (which seems to be vendor specific?).
Is the blue UI supposed to auto update the switch state in the UI? In my case it doesn't; I have to press update. Weird, I seem to remember that updates were automatic in the past. I'm not sure.

Isn't there a software command to have the Razberry update it's values?
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: /ZAutomation/api/v1/devices not reflecting true device s

Post by PoltoS »

The UI (both) update the value once it get it. It get it only
1) if s/w sends a Get (once you press Update or Set button) or
2) if the device sends it unsolicited. Parameter 80 in Aeon changed it. It is manufacturer specific.
mjm
Posts: 4
Joined: 13 Jun 2014 11:31

Re: /ZAutomation/api/v1/devices not reflecting true device s

Post by mjm »

OK, thx. But what is the best way to do a 'get''?
Obviously commands like the following don't:

Code: Select all

http://razberry.local:8083/ZAutomation/api/v1/devices
http://razberry.local:8083/ZAutomation/api/v1/devices/ZWayVDev_2:0:37
http://razberry.local:8083/ZAutomation/api/v1/devices/ZWayVDev_2:0:37/command/on
http://razberry.local:8083/ZAutomation/api/v1/devices/ZWayVDev_2:0:37/command/status
Post Reply