The Simple Scripting app looks promising but I haven't found much documentation. I'd like to write a very simple script that notifies an external REST API whenever one of several devices change state and trigger events.
I've seen that you can list multiple event triggers but how do I know which device caused the script to run?
Example:
Code: Select all
### ZWayVDev_zway_10-0-37
### ZWayVDev_zway_5-0-37
var vdev_id = ?????
var value = vdev(vdev_id).value();
http.request({method: "GET", async: true, url: "http://some-url?id=vdev_id&value="+value});
TIA,
Gunnar