ioBroker.doorbird
ioBroker.doorbird copied to clipboard
Keine Einträge für Snapshot
Hallo zusammen, die Trigger bei Doorbell und Motion funktionieren, es werden aber keine Inhalte in die Datenpunkte snapshot eingetragen, die bleiben bei "[undef]". Im Verzeichnis "/opt/iobroker/iobroker-data" wird eine Bilddatei "doorbird.0.snap.jpg" mit richtigem Inhalt angelegt. DoorBird D1101V, Firmware 0130 ioBroker aktuelle Beta, Java-Script 5.2.13
Danke und Gruß Achim
Selbe Problem habe ich auch, Doorbird D2101FV
Problem besteht nach wie vor auch mit Aktuellstern ioBroker Versionen
Ich habe das selbe Thema mit einer D1101V
Edit: Hmm, keine Ahnung was ich eigentlich erwartet habe.
Folgendes funktioniert: "Can be accessed from web server under http://ip:8082/state/doorbird.0.motion.snapshot"
habe das gleiche Problem mit der DoorBird D1101V-F
Bei mir das selbe bei einer D2101V
Kann ich bestätigen für D1101V. Die File doorbird.0.snap.jpg existiert aktualisiert, aber keine nutzbaren Files für :
- doorbird.0.Doorbell.1.snapshot
- doorbird.0.Motion.snapshot
Auch die URLs:
http://xxxxxx:8082/state/doorbird.0.Doorbell.1.snapshot http://xxxxxx:8082/state/doorbird.0.motion.snapshot
liefern einen 404:
404 Not found. File doorbird.0.motion.snapshot not found
Log gibt keinen Fehler und bestätigt sogar die erfolgreiche Kopie.
das funktioniert schon lange nicht mehr. Ich mach es über ein Script (Klingel und BWM)
Für Klingel
const idklingel = ["doorbird.0.Doorbell.102.trigger"];
var sperre = false; //verhindert das doppeltes Drücken das Script stoppt
var timeout1, timeout2, timeout3, timeout4, timeout5, timeout6, timeout7, timeout8, timeout9, timeout10, timeout11;
var fs = require('fs');
on({id: idklingel, change: "any"}, function (obj) {
if(!sperre) {
sperre = true;
// Speichert das erste Bild bei Klingeln
exec('wget --output-document /tmp/nega1.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
// Nach dem ersten Bild wird nach 2000ms das nächste Bild gespeichert
// timeout1 = setTimeout(function () {
//
// exec('wget --output-document /tmp/nega2.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
//
// }, 2000);
// Nach dem zweiten Bild wird nach 2000ms das nächste Bild gespeichert
// timeout2 = setTimeout(function () {
//
// exec('wget --output-document /tmp/nega3.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
//
// }, 4000);
// Nach dem dritten Bild wird nach 2000ms das nächste Bild gespeichert
// timeout3 = setTimeout(function () {
//
// exec('wget --output-document /tmp/nega4.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
//
// }, 6000);
/*
// Telegram versenden
timeout4 = setTimeout(function(){
sendTo('telegram.0', {text: '/tmp/nega1.jpg', caption: 'Jemand klingelt an der Haustür !!!'});
//log ('__ Klingel-Bild wurde versendet __');
}, 10000);
timeout5 = setTimeout(function(){
sendTo('telegram.0', {text: '/tmp/nega2.jpg', caption: 'Jemand klingelt an der Haustür !!!'});
//log ('__ Klingel-Bild wurde versendet __');
}, 11000);
*/
}
timeout6 = setTimeout(function() {
sperre = false;
}, 5000); //Zeit für Klingelsperre 1.Zeile
// Bilder werden nach vis gespeichert
timeout7 = setTimeout(function () {
const bild1 = fs.readFileSync('/tmp/nega1.jpg');
writeFile('vis.0','/_temp/nega/nega1.jpg', bild1);
// const bild2 = fs.readFileSync('/tmp/nega2.jpg');
//
// writeFile('vis.0','/_temp/nega/nega2.jpg', bild2);
//
// const bild3 = fs.readFileSync('/tmp/nega3.jpg');
//
// writeFile('vis.0','/_temp/nega/nega3.jpg', bild3);
//
// const bild4 = fs.readFileSync('/tmp/nega4.jpg');
//
// writeFile('vis.0','/_temp/nega/nega4.jpg', bild4);
}, 20000);
});
BWM:
const idklingel = ["doorbird.0.Motion.trigger"];
var sperre = false; //verhindert das doppeltes Drücken das Script stoppt
var timeout1, timeout2, timeout3, timeout4, timeout5, timeout6, timeout7, timeout8, timeout9, timeout10, timeout11;
var fs = require('fs');
on({id: idklingel, change: "any"}, function (obj) {
if(!sperre) {
sperre = true;
// Speichert das erste Bild bei Klingeln
exec('wget --output-document /tmp/BWM1.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
// Nach dem ersten Bild wird nach 2000ms das nächste Bild gespeichert
timeout1 = setTimeout(function () {
exec('wget --output-document /tmp/BWM2.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
}, 2000);
// Nach dem zweiten Bild wird nach 2000ms das nächste Bild gespeichert
timeout2 = setTimeout(function () {
exec('wget --output-document /tmp/BWM3.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
}, 4000);
// Nach dem dritten Bild wird nach 2000ms das nächste Bild gespeichert
timeout3 = setTimeout(function () {
exec('wget --output-document /tmp/BWM4.jpg \'http://User:[email protected]/bha-api/image.cgi\'');
}, 6000);
/*
// Telegram versenden
timeout4 = setTimeout(function(){
sendTo('telegram.0', {text: '/tmp/BWM1.jpg', caption: 'Jemand klingelt an der Haustür !!!'});
//log ('__ Klingel-Bild wurde versendet __');
}, 10000);
timeout5 = setTimeout(function(){
sendTo('telegram.0', {text: '/tmp/BWM2.jpg', caption: 'Jemand klingelt an der Haustür !!!'});
//log ('__ Klingel-Bild wurde versendet __');
}, 11000);
*/
}
timeout6 = setTimeout(function() {
sperre = false;
}, 5000); //Zeit für Klingelsperre 1.Zeile
// Bilder werden nach vis gespeichert
timeout7 = setTimeout(function () {
const bild1 = fs.readFileSync('/tmp/BWM1.jpg');
writeFile('vis.0','/_temp/BWM/BWM1.jpg', bild1);
const bild2 = fs.readFileSync('/tmp/BWM2.jpg');
writeFile('vis.0','/_temp/BWM/BWM2.jpg', bild2);
const bild3 = fs.readFileSync('/tmp/BWM3.jpg');
writeFile('vis.0','/_temp/BWM/BWM3.jpg', bild3);
const bild4 = fs.readFileSync('/tmp/BWM4.jpg');
writeFile('vis.0','/_temp/BWM/BWM4.jpg', bild4);
}, 20000);
});
Danke @Negalein,
bei mir klappt es nun doch. Ich versuche meine Findings mal für die Nachwelt zusammen zu fassen:
Wenn die File /opt/iobroker/iobroker-data/doorbird.0.snap.jpg ordentlich aktualisiert wird und das Debug Log keine Fehler wirft, kopiert der Adapter die Datei als Binary in das jeweilige Objekt:
- doorbird.0.Motion.snapshot
- doorbird.0.Doorbell.1.snapshot
Dies kann sich natürlich je nach Installation ändern. (wie z.B. doorbird.1.Doorbell.1.snapshot, etc.)
Unter Port 8082 (Standard) muss/sollte die Adapterinstanz Web laufen:
Über diese lassen sich alle States des Objektbaum abrufen via URL:
http://iobrokerip:8082/state/Objektpfad
So z.B. auch der Status oder die File des gespeicherten Bilder:
http://iobrokerip:8082/state/doorbird.0.Doorbell.1.trigger
http://iobrokerip:8082/state/doorbird.0.Motion.snapshot
http://iobrokerip:8082/state/doorbird.0.Doorbell.1.snapshot
Die Angabe des Objektes ist allerdings case-sensitive. Das war zumindest der Fehler bei mir.
Somit führte http://iobrokerip:8082/state/doorbird.0.motion.snapshot bei mir zu einem 404, http://iobrokerip:8082/state/doorbird.0.Motion.snapshot funktioniert nun aber. (Unterschied: kleines und Großes "M")
Den Pfad hatte ich natürlich copy/paste aus der Beschreibung übernommen: ;)
Daher alle die hier noch Probleme haben, einfach einmal die Existenz und Status der Web-Instanz 8082 prüfen und den Pfad des Objektes in der URL auf Groß/Kleinschreibung überprüfen.
Bei mir klappts nun so wie gewünscht.
Off-Topic:
Kunibert hat im Forum https://forum.iobroker.net/topic/12806/adapter-doorbird-ideensammlung/41 noch einen richtig guten Ansatz ein Video direkt vom Stream über FFMPEG zu erstellen. So kann man sich z.B. direkt ein Video per Telegram senden. Die Lösung funktionierte bei mir auf Anhieb auch.
das funktioniert schon lange nicht mehr. Ich mach es über ein Script (Klingel und BWM)
Für Klingel
const idklingel = ["doorbird.0.Doorbell.102.trigger"]; var sperre = false; //verhindert das doppeltes Drücken das Script stoppt var timeout1, timeout2, timeout3, timeout4, timeout5, timeout6, timeout7, timeout8, timeout9, timeout10, timeout11; var fs = require('fs'); on({id: idklingel, change: "any"}, function (obj) { if(!sperre) { sperre = true; // Speichert das erste Bild bei Klingeln exec('wget --output-document /tmp/nega1.jpg \'http://User:[email protected]/bha-api/image.cgi\''); // Nach dem ersten Bild wird nach 2000ms das nächste Bild gespeichert // timeout1 = setTimeout(function () { // // exec('wget --output-document /tmp/nega2.jpg \'http://User:[email protected]/bha-api/image.cgi\''); // // }, 2000); // Nach dem zweiten Bild wird nach 2000ms das nächste Bild gespeichert // timeout2 = setTimeout(function () { // // exec('wget --output-document /tmp/nega3.jpg \'http://User:[email protected]/bha-api/image.cgi\''); // // }, 4000); // Nach dem dritten Bild wird nach 2000ms das nächste Bild gespeichert // timeout3 = setTimeout(function () { // // exec('wget --output-document /tmp/nega4.jpg \'http://User:[email protected]/bha-api/image.cgi\''); // // }, 6000); /* // Telegram versenden timeout4 = setTimeout(function(){ sendTo('telegram.0', {text: '/tmp/nega1.jpg', caption: 'Jemand klingelt an der Haustür !!!'}); //log ('__ Klingel-Bild wurde versendet __'); }, 10000); timeout5 = setTimeout(function(){ sendTo('telegram.0', {text: '/tmp/nega2.jpg', caption: 'Jemand klingelt an der Haustür !!!'}); //log ('__ Klingel-Bild wurde versendet __'); }, 11000); */ } timeout6 = setTimeout(function() { sperre = false; }, 5000); //Zeit für Klingelsperre 1.Zeile // Bilder werden nach vis gespeichert timeout7 = setTimeout(function () { const bild1 = fs.readFileSync('/tmp/nega1.jpg'); writeFile('vis.0','/_temp/nega/nega1.jpg', bild1); // const bild2 = fs.readFileSync('/tmp/nega2.jpg'); // // writeFile('vis.0','/_temp/nega/nega2.jpg', bild2); // // const bild3 = fs.readFileSync('/tmp/nega3.jpg'); // // writeFile('vis.0','/_temp/nega/nega3.jpg', bild3); // // const bild4 = fs.readFileSync('/tmp/nega4.jpg'); // // writeFile('vis.0','/_temp/nega/nega4.jpg', bild4); }, 20000); });
BWM:
const idklingel = ["doorbird.0.Motion.trigger"]; var sperre = false; //verhindert das doppeltes Drücken das Script stoppt var timeout1, timeout2, timeout3, timeout4, timeout5, timeout6, timeout7, timeout8, timeout9, timeout10, timeout11; var fs = require('fs'); on({id: idklingel, change: "any"}, function (obj) { if(!sperre) { sperre = true; // Speichert das erste Bild bei Klingeln exec('wget --output-document /tmp/BWM1.jpg \'http://User:[email protected]/bha-api/image.cgi\''); // Nach dem ersten Bild wird nach 2000ms das nächste Bild gespeichert timeout1 = setTimeout(function () { exec('wget --output-document /tmp/BWM2.jpg \'http://User:[email protected]/bha-api/image.cgi\''); }, 2000); // Nach dem zweiten Bild wird nach 2000ms das nächste Bild gespeichert timeout2 = setTimeout(function () { exec('wget --output-document /tmp/BWM3.jpg \'http://User:[email protected]/bha-api/image.cgi\''); }, 4000); // Nach dem dritten Bild wird nach 2000ms das nächste Bild gespeichert timeout3 = setTimeout(function () { exec('wget --output-document /tmp/BWM4.jpg \'http://User:[email protected]/bha-api/image.cgi\''); }, 6000); /* // Telegram versenden timeout4 = setTimeout(function(){ sendTo('telegram.0', {text: '/tmp/BWM1.jpg', caption: 'Jemand klingelt an der Haustür !!!'}); //log ('__ Klingel-Bild wurde versendet __'); }, 10000); timeout5 = setTimeout(function(){ sendTo('telegram.0', {text: '/tmp/BWM2.jpg', caption: 'Jemand klingelt an der Haustür !!!'}); //log ('__ Klingel-Bild wurde versendet __'); }, 11000); */ } timeout6 = setTimeout(function() { sperre = false; }, 5000); //Zeit für Klingelsperre 1.Zeile // Bilder werden nach vis gespeichert timeout7 = setTimeout(function () { const bild1 = fs.readFileSync('/tmp/BWM1.jpg'); writeFile('vis.0','/_temp/BWM/BWM1.jpg', bild1); const bild2 = fs.readFileSync('/tmp/BWM2.jpg'); writeFile('vis.0','/_temp/BWM/BWM2.jpg', bild2); const bild3 = fs.readFileSync('/tmp/BWM3.jpg'); writeFile('vis.0','/_temp/BWM/BWM3.jpg', bild3); const bild4 = fs.readFileSync('/tmp/BWM4.jpg'); writeFile('vis.0','/_temp/BWM/BWM4.jpg', bild4); }, 20000); });
Muss das Thema noch einmal aufwühlen. Hab es heute einmal geschafft dein Script zu versuchen. So weit klappt alles, jedoch wird bei einem erneutem "Klingel" kein neues Bild gespeichert.
Muss das Thema noch einmal aufwühlen. Hab es heute einmal geschafft dein Script zu versuchen. So weit klappt alles, jedoch wird bei einem erneutem "Klingel" kein neues Bild gespeichert.
wie schnell hintereinander hast du geklingelt? Timeout für Klingelsperre ist auf 5000 ms.
Muss das Thema noch einmal aufwühlen. Hab es heute einmal geschafft dein Script zu versuchen. So weit klappt alles, jedoch wird bei einem erneutem "Klingel" kein neues Bild gespeichert.
wie schnell hintereinander hast du geklingelt? Timeout für Klingelsperre ist auf 5000 ms.
Da waren locker 10 Minuten Abstand.
Mit v1.0.0 werden die Snapshots neu abgelegt und bei den ioBroker Files zu finden.