I'm having real trouble finding enough information to do this. Can someone help please?
This is my device description
Code: Select all
{
"creationTime": 1473888157,
"creatorId": 1,
"deviceType": "doorlock",
"h": 1078450102,
"hasHistory": true,
"id": "ZWayVDev_zway_2-0-98",
"location": 1,
"metrics": {
"level": "close",
"icon": "door",
"title": "Yale Door Lock (2.0)"
},
"permanently_hidden": false,
"probeType": "",
"tags": [],
"visibility": true,
"updateTime": 1547802239
},
Code: Select all
zway.devices[2].instances[0].metrics.level.bind(function () {
debugPrint("Doorlock level is '" + this.value + "'");
try {
system("python /home/pi/Desktop/network_send.py");
return;
} catch (err) {
debugPrint("Failed to execute script system call: " + err);
}
});
firstly how do I see the results of debugPrint?
secondly have I done the bind correctly?
thanks for any help!