Hello to eveybody
I have created a new dummy device as binary switch and i use it as a trigger for scene ...
How can i check state status of this device from exteranl software like Node js?
From a browser i can see this:
http://myip:8083/ZAutomation/api/v1/dev ... yDevice_44
i get this:
{"data":{"creationTime":1459165644,"creatorId":44,"deviceType":"switchBinary","h":-1669838495,"hasHistory":false,"id":"DummyDevice_44","location":0,"metrics":{"level":"off","title":"Abilita allerta"},"permanently_hidden":false,"probeType":"","tags":[],"visibility":true,"updateTime":1459455031},"code":200,"message":"200 OK","error":null}
I want query level on/off from an external program.
How can i do it?
Thank you
rumcooler
Question about virtual/dummy devices
Re: Question about virtual/dummy devices
One solution is to use the OpenRemoteHelpers App. That provides a simplified (but also limited access):
"off"
To get an overview of all accessible metrics use the call without the metric specifier
{"level":"off","title":"Dummy Device"}
To set your dummy device use SetMetrics as follows:
NOTE: The SetMetrics is not available in the standard distribution. You must upgrade OpenRemoteHelpers from the App store
Code: Select all
http://myip:8083/OpenRemote/metrics/DummyDevice_44/level/
To get an overview of all accessible metrics use the call without the metric specifier
Code: Select all
http://myip:8083/OpenRemote/metrics/DummyDevice_44/
To set your dummy device use SetMetrics as follows:
Code: Select all
http://myip:8083/OpenRemote/SetMetrics/DummyDevice_44/level/on
Re: Question about virtual/dummy devices
Thank you for your reply.
This is perfect for my application.
Another question: i write this code: http://myip:8083/.../mydevice/alarm.bind(function() ...)
This is ok, but remove bind it's possible whitout restart z-way service?
There is something like unbind function?
It's possible inject the code for bind function automatically after every restart?
Bye
Rumcooler
This is perfect for my application.
Another question: i write this code: http://myip:8083/.../mydevice/alarm.bind(function() ...)
This is ok, but remove bind it's possible whitout restart z-way service?
There is something like unbind function?
It's possible inject the code for bind function automatically after every restart?
Bye
Rumcooler