Page 1 of 1

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

Posted: 28 Jun 2014 00:56
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

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

Posted: 28 Jun 2014 01:22
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

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

Posted: 28 Jun 2014 18:23
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?

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

Posted: 29 Jun 2014 00:28
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.

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

Posted: 30 Jun 2014 00:04
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