hh
Size: a a a
hh
hh
АК
hh
hh
A
A
i
A
АК
A
АК
curl -X POST http://192.168.1.38:8937/motion?vhod_ulica
i
A
АК
A
A
A
var timeout;
on({id: "linkeddevices.0.ulica.pir_stolb"/*pir na stolbe*/, change: "any"}, function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
if (getState("linkeddevices.0.ulica.pir_stolb").val == true) {
(function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
exec('curl -X POST http://192.168.1.38:8937/motion?vhod_ulica');
} else {
timeout = setTimeout(function () {
exec('curl -X POST http://192.168.1.38:8937/motion/reset?vhod_ulica');
}, 20000);
}
});
A
ИК