NEWS
Kamera Steuerung (PTZ) mit Bewegungsmelder htp
-
Hmm das gibt es schon wieder kleine Probleme
19:44:14.373 info javascript.0 Stop script script.js.Skript_158_neuer
19:44:14.415 info javascript.0 Start javascript script.js.Skript_158_neuer
19:44:14.416 info javascript.0 script.js.Skript_158_neuer: registered 3 subscriptions and 0 schedules
19:45:00.948 info javascript.0 script.js.Skript_158_neuer: mihome.0.devices.sensor_motion_aq2_158d0002e30682.state: true
19:45:00.951 warn javascript.0 at kamera (script.js.Skript_158_neuer:11:7)
19:45:00.952 warn javascript.0 at Object.<anonymous> (script.js.Skript_158_neuer:34:21)
19:47:00.758 info javascript.0 script.js.Skript_158_neuer: mihome.0.devices.sensor_motion_aq2_158d0002e30682.state: false -
Hmm das gibt es schon wieder kleine Probleme
19:44:14.373 info javascript.0 Stop script script.js.Skript_158_neuer
19:44:14.415 info javascript.0 Start javascript script.js.Skript_158_neuer
19:44:14.416 info javascript.0 script.js.Skript_158_neuer: registered 3 subscriptions and 0 schedules
19:45:00.948 info javascript.0 script.js.Skript_158_neuer: mihome.0.devices.sensor_motion_aq2_158d0002e30682.state: true
19:45:00.951 warn javascript.0 at kamera (script.js.Skript_158_neuer:11:7)
19:45:00.952 warn javascript.0 at Object.<anonymous> (script.js.Skript_158_neuer:34:21)
19:47:00.758 info javascript.0 script.js.Skript_158_neuer: mihome.0.devices.sensor_motion_aq2_158d0002e30682.state: false@kasperfunsurfer
Damit ich ich die Zeilennummern in den Warnungen zuordnen kann, muss ich das Skript so sehen, wie es bei Dir läuft. -
const url = 'http://+++++@192.168.2.110:81'; const idMotion = "mihome.0.devices.sensor_motion_aq2_158d000"; const idMotion1 = idMotion + "236b7e6.state"; const idMotion2 = idMotion + "2e922d3.state"; const idMotion3 = idMotion + "2e30682.state"; const idAbwesend = 'hm-rega.950'; var timer = null; function kamera(id, pos) { if(getState(idAbwesend).val && !timer) { request(url + '/param.cgi?cmd=preset&-act=goto&-number=' + pos); timer = setTimeout(function() { request(url + '/CGI-COMMAND/param.cgi?cmd=pushhostalarm'); setState(id, false); timer = null; log('Verzögert: ' + id); }, 10000); // nach 10 s } } on(idMotion1, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 0); }); on(idMotion2, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 0); }); on(idMotion3, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 1); });Der Bewegungsmelder setzt sich auch wieder nicht zurück.....
-
const url = 'http://+++++@192.168.2.110:81'; const idMotion = "mihome.0.devices.sensor_motion_aq2_158d000"; const idMotion1 = idMotion + "236b7e6.state"; const idMotion2 = idMotion + "2e922d3.state"; const idMotion3 = idMotion + "2e30682.state"; const idAbwesend = 'hm-rega.950'; var timer = null; function kamera(id, pos) { if(getState(idAbwesend).val && !timer) { request(url + '/param.cgi?cmd=preset&-act=goto&-number=' + pos); timer = setTimeout(function() { request(url + '/CGI-COMMAND/param.cgi?cmd=pushhostalarm'); setState(id, false); timer = null; log('Verzögert: ' + id); }, 10000); // nach 10 s } } on(idMotion1, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 0); }); on(idMotion2, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 0); }); on(idMotion3, function(dp) { log(dp.id + ': ' + dp.state.val); // eingefügte Log-Zeile if(dp.state.val) kamera(dp.id, 1); });Der Bewegungsmelder setzt sich auch wieder nicht zurück.....
-
@kasperfunsurfe:
const idAbwesend = 'hm-rega.950';
Fehlt da nicht die Instanz-Nummer ?
const idAbwesend = 'hm-rega.0.950';@paul53 ja logisch Sorry mein Fehler. Jetzt passt es. Noch mal vielen vielen DANK...….
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login