NEWS
[Frage]Skript zur Steuerung ONVIF Kameras
-
Ick freu ma. Werde ich denn gleich mal testen.
Danke
-
Es geht. DANKE. jetzt kann ich erstmal ein bisschen spielen.
-
Eine Frage habe ich noch zum Part Telegram.
Durch welche Aktion kann ich mir ein Bild zu schicken lassen ?
Die Ptz Funktionen habe ich erstmal durch Node-red realisiert aber wie funktioniert jetzt der Aufruf für sendImage per Telegram?
-
Hallo,
freut mich, dass es klappt.
Die Ptz Funktionen habe ich erstmal durch Node-red realisiert aber wie funktioniert jetzt der Aufruf für sendImage per Telegram? `
Öhömmm :oops: Da habe ich wohl den Aufruf vergessen. Oder vielmehr habe ich vergessen, den Telegram Teil nach dem testen wieder rauszulöschen, denn das Zusenden nach Bewegungsalarm mache ich woanders.Kannst also die Funktionen sendImage() und saveImage() zwischen Zeile 256 und Zeile 315 komplett löschen, wenn du telegram nicht brauchst. Ebenso natürlich dann auch oben in Zeile 43 die Einbindung von fs.
Du kannst dir aber ei weiteres Objekt anlegen und dann zB über eine manuelle Auslösung in VIS ein Bild schicken lassen.
Gruß
Pix
-
Hallo zusammen,
ich weise nochmal darauf hin, dass das Paket node-onvif unbedingt nodejs 4 oder höher voraussetzt. Der Entwickler spricht sogar davon, dass nodejs 4 demnächst schon nicht mehr unterstützt wird.
https://www.npmjs.com/package/node-onvif#dependencies
Wer also plant, demnächst das Skript zu nutzen, aber sein nodejs 4 nicht updaten will, sollte sich noch schnell den jetzigen Stand des Moduls sichern/installieren.
Gruß
Pix
-
Ok. Verstehe. Ich könnte das auch ander machen mit Telegram aber ich dachte wenn es da schon mal drin steht kann man es auch nutzen. Ich Probier mal ein bisschen. Danke
-
Eine weitere Voraussetzung scheint wohl zu sein, dass die ONVIF Implementierung auf der WebCam Screenshots unterstützen muss, was bei mir nicht der Fall ist.
Ich konnte den server.js starten, die WebCam wurde gefunden, leider kein Bild angezeigt.
Die Pfeile im WebUi konnten den Kamerakopf verändern, aber so, wie man das von der Richtung des Pfeils im UI erwartet hätte.
Ich vermute, das Script verwendet auch die Screenshotfunktion, oder?
-
ich habe bei zwei Cameras, die onvif unterstützen probiert, aber leider ohne Erfolg. Discovery findet auch nichts.
javascript.1 2017-11-02 20:52:43.583 info script.js.common.Cam.onvif_wansview: Stopped the discovery process. javascript.1 2017-11-02 20:52:40.587 info script.js.common.Cam.onvif_wansview: registered 15 subscriptions and 0 schedules javascript.1 2017-11-02 20:52:40.580 info script.js.common.Cam.onvif_wansview: Start the discovery process. javascript.1 2017-11-02 20:52:40.568 info Start javascript script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:40.525 info Stop script script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:24.367 info script.js.common.Cam.onvif_wansview: Stopped the discovery process. javascript.1 2017-11-02 20:52:21.367 info script.js.common.Cam.onvif_wansview: registered 15 subscriptions and 0 schedules javascript.1 2017-11-02 20:52:21.364 info script.js.common.Cam.onvif_wansview: Start the discovery process. javascript.1 2017-11-02 20:52:21.353 info Start javascript script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:21.170 info Stop script script.js.common.Cam.onvif_wansview
-
Hallo Marty56,
falls die Links-rechts-Bewegung vertauscht ist, kann das daran liegen, dass meine Kamera kopfüber hängt.
Hallo Lobomau,
das hier ist ein Skript, das ich für meine noname Kamera mit Hilfe der Beispiele auf der Github Seite des Onvif Moduls gebaut habe.
Bitte probiere etwas mehr aus. Ich habe Monate gebraucht.
Gruß
Pix
-
ich habe bei zwei Cameras, die onvif unterstützen probiert, aber leider ohne Erfolg. Discovery findet auch nichts.
javascript.1 2017-11-02 20:52:43.583 info script.js.common.Cam.onvif_wansview: Stopped the discovery process. javascript.1 2017-11-02 20:52:40.587 info script.js.common.Cam.onvif_wansview: registered 15 subscriptions and 0 schedules javascript.1 2017-11-02 20:52:40.580 info script.js.common.Cam.onvif_wansview: Start the discovery process. javascript.1 2017-11-02 20:52:40.568 info Start javascript script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:40.525 info Stop script script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:24.367 info script.js.common.Cam.onvif_wansview: Stopped the discovery process. javascript.1 2017-11-02 20:52:21.367 info script.js.common.Cam.onvif_wansview: registered 15 subscriptions and 0 schedules javascript.1 2017-11-02 20:52:21.364 info script.js.common.Cam.onvif_wansview: Start the discovery process. javascript.1 2017-11-02 20:52:21.353 info Start javascript script.js.common.Cam.onvif_wansview javascript.1 2017-11-02 20:52:21.170 info Stop script script.js.common.Cam.onvif_wansview ```` `
Was auch stimmen muss ist der Port. Ich habe auch mehrere Kameras und bei der einen Kamera hab ich ein Port 10080
-
Was auch stimmen muss ist der Port. Ich habe auch mehrere Kameras und bei der einen Kamera hab ich ein Port 10080 `
Ja, das ist bei meiner wansview w2 das Problem. Ich weiß den port nicht. Nichts gefunden im Handbuch oder google.Bei der FDT 720p kann ich den port wählen, hab 8080 gelassen.
-
@pix:Öhömmm :oops: Da habe ich wohl den Aufruf vergessen. Oder vielmehr habe ich vergessen, den Telegram Teil nach dem testen wieder rauszulöschen, denn das Zusenden nach Bewegungsalarm mache ich woanders. `
Hi Pix,
danke für das Script. Genial! Könntest Du mir vielleicht mitteilen wie Du das Zusenden nach Bewegungsalarm gelöst hast?
vg
Falk
-
Wollte mal kurz ein Feedback abgeben und mich recht herzlich für dein Skript bedanken.
Funktioniert Sehr gut, nachdem man die richtigen Einstellungen eingetragen hat,
Da du ja sogar einen Logmodus eingebaut hast, konnte ich (als ich den gesehen habe) meinen "ProfileToken" auslesen lassen und somit nun auch endlich meine Presets abfahren.
Vielen Vielen Dank.
lauft übrigens bei mir mit Nodejs 8.1.1
Gruß Marcus
-
Ein Super Script!! Vielen Dank dafür.
Bei mir hat es dann nach ein paar Anpassungen funktioniert. Verwende es für eine Hikvision PTZ Cam (DS-2DE3304W-DE).
Stolpersteine im Script:
- Profile Token: heisst bei der Cam nicht MainStream sondern mainStream; hier muss man aber den ProfileToken Namen eingeben: der lautet hier Profile_1
/* 'ProfileToken': 'mainStream', */ /* edited for Hikvision */ 'ProfileToken': 'Profile_1',
Tip für alle die hier Probleme mit der Connection/Werten haben:
Alle notwendigen Infos zu seiner ONVIF Cam kann man sich wunderbar über das Tool 'ONVIF Device Manager' ziehen. Siehe hierzu auch:
https://ipcamtalk.com/threads/port-number-onvif.3775/
` > The default ONVIF port for 2-series Hikvision cameras is 80.The very good Windows open-source tool 'ONVIF Device Manager' from sourceforge.net will tell you lots about the camera that you won't find in other sources.
The 'ONVIF port' is shown in the URI at the bottom of the 'Identification' page. If there is no ':<port number="">' in the URI, it's 80.
The 'RTSP string' is shown at the bottom of the 'Live Video' page.</port> `
- rechts/links move (Zeilen nach 329): das funktionierte mit dem rechts-move nicht; im script waren hier für rechts/links unterschiedliche Arten des Funktionsaufrufs eingesetzt. Bei dem rechts-move blieb der Wert dauerhaft auf 1(true) nach dem Auslösen.
Ich habe nun die Move-Funktionen alle gleich gesetzt (wie es auch bei idLinks war) nach dem Schema:
// rechts /* on({id: idRechts, val: true}, function (obj) { */ /* edited */ on(idRechts, function (obj) {
-
Hallo Pix,
Würdest Du Deine View / Widget vielleicht auch bereitstellen?
Gruss -
-
Hallo,
hier die Widgets:
[{"tpl":"tplHtml","data":{"g_fixed":true,"g_visibility":false,"g_css_font_text":true,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","refreshInterval":"0","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"html":"Kamera | Videoüberwachung","name":"Überschrift","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"89px","top":"21px","z-index":"25","width":"auto","height":"30px","font-size":"25px"},"widgetSet":"basic"},{"tpl":"tplImage","data":{"g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"g_last_change":false,"refreshInterval":"0","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0,"src":"{javascript.0.Xeoma.Kamera.1.IP}","refreshOnWakeUp":false,"refreshOnViewChange":false,"name":"Kamera 1 Stream HTML Widget","visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","stretch":true,"class":"xxx{javascript.0.VIS.Kamera.1.Filter}"},"style":{"left":"94px","top":"113px","width":"400px","height":"280px","z-index":"15"},"widgetSet":"basic"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-arrow-up-4","icon_class_true":"icon-arrow-up-4","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.hoch","label_false":"","label_true":"","name":"Kizi Kamera Steuerung hoch","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"223px","top":"402px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-arrow-left-4","icon_class_true":"icon-arrow-left-4","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.links","label_false":"","label_true":"","name":"Kizi Kamera Steuerung links","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"144px","top":"435px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-arrow-down-4","icon_class_true":"icon-arrow-down-4","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.runter","label_false":"","label_true":"","name":"Kizi Kamera Steuerung runter","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"223px","top":"472px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-arrow-right-4","icon_class_true":"icon-arrow-right-4","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.rechts","label_false":"","label_true":"","name":"Kizi Kamera Steuerung rechts","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"301px","top":"435px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-plus-2","icon_class_true":"icon-plus-2","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.ZoomIn","label_false":"","label_true":"","name":"Kizi Kamera Steuerung Zoom In","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"423px","top":"402px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-minus-2","icon_class_true":"icon-minus-2","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.ZoomOut","label_false":"","label_true":"","name":"Kizi Kamera Steuerung Zoom Out","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"423px","top":"472px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"bg-transparent","icon_class_false":"icon-pause","icon_class_true":"icon-pause","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"true","state_oid":"javascript.0.VIS.Kamera.1.PTZ.Stopp","label_false":"","label_true":"","name":"Kizi Kamera Steuerung Stopp","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"423px","top":"541px","width":"60px","height":"60px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplHtml","data":{"visibility-cond":"<=","visibility-val":"3","refreshInterval":"0","html":"{javascript.0.VIS.Kamera.1.PTZ.gotoPreset;}\n","name":"Position WZ Kamera Preset","visibility-oid":"javascript.0.VIS.Kamera.1.PTZ.gotoPreset","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"visibility-groups-action":"hide","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"347px","top":"544px","width":"46px","height":"42px","z-index":"20","color":"rgba(250,250,250,1)","text-align":"center","font-family":"Futura","font-size":"30px","border-width":"1px","border-style":"none"},"widgetSet":"basic"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"ribbed-cobalt","icon_class_false":"","icon_class_true":"icon-camera-2","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"3","state_oid":"javascript.0.VIS.Kamera.1.PTZ.gotoPreset","label_false":"3","label_true":"","name":"Kizi Kamera Preset Preset 2","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"icon_false":"/vis.0/iPad/img/webcam/cam1_3.jpg","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"264px","top":"539px","width":"70px","height":"70px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"ribbed-cobalt","icon_class_false":"","icon_class_true":"icon-camera-2","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"2","state_oid":"javascript.0.VIS.Kamera.1.PTZ.gotoPreset","label_false":"2","label_true":"","name":"Kizi Kamera Preset Preset 2","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"icon_false":"/vis.0/iPad/img/webcam/cam1_2.jpg","icon_width":"","icon_height":"","icon_top":"","icon_left":"","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"183px","top":"538px","width":"70px","height":"70px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplMetroTileState","data":{"visibility-cond":"==","visibility-val":1,"hover":false,"transform":true,"bg_class_false":"bg-transparent","bg_class_true":"ribbed-cobalt","icon_class_false":"","icon_class_true":"icon-camera-2","icon_badge_false":"","icon_badge_true":"","badge_bg_class_false":"","badge_bg_class_true":"","brand_bg_class_false":"","brand_bg_class_true":"","value":"1","state_oid":"javascript.0.VIS.Kamera.1.PTZ.gotoPreset","label_false":"1","label_true":"","name":"Kizi Kamera Preset 1","gestures-offsetX":0,"gestures-offsetY":0,"badge_top":"0","badge_left":"0","visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"icon_false":"/vis.0/iPad/img/webcam/cam1_1.jpg","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"104px","top":"537px","width":"70px","height":"70px","z-index":"10","cursor":"pointer"},"widgetSet":"metro"},{"tpl":"tplValueFloat","data":{"oid":"javascript.0.VIS.Kamera.1.PTZ.Geschwindigkeit","g_fixed":true,"g_visibility":false,"g_css_font_text":true,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","is_comma":false,"is_tdp":false,"factor":"100","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"html_prepend":"Speed (0 - 1): ","html_append_singular":" %","digits":"0","name":"Kizi Kamera Steuerung Geschwindigkeit Anzeige","html_append_plural":" %","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"336px","top":"617px","z-index":"25","color":"rgba(250,250,250,1);","font-size":"12px","width":"141px","text-align":"right"},"widgetSet":"basic"},{"tpl":"tplJquiSlider","data":{"oid":"javascript.0.VIS.Kamera.1.PTZ.Geschwindigkeit","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"oid-2":"","min":"0.1","max":"1","step":"0.1","name":"Kizi Kamera Steuerung Geschwindigkeit Slider","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"336px","top":"638px","z-index":"25","width":"133px","height":"23px"},"widgetSet":"jqui"},{"tpl":"tplValueFloat","data":{"oid":"javascript.0.VIS.Kamera.1.PTZ.Stoppzeit","g_fixed":true,"g_visibility":false,"g_css_font_text":true,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","is_comma":false,"is_tdp":"false","factor":"1","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"html_prepend":"Dauer bis Stopp: ","html_append_singular":" s","digits":"1","name":"Kizi Steuerung Stoppzeit Anzeige","html_append_plural":" s","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"336px","top":"674px","z-index":"25","color":"rgba(250,250,250,1);","font-size":"12px","width":"141px","text-align":"right"},"widgetSet":"basic"},{"tpl":"tplJquiSlider","data":{"oid":"javascript.0.VIS.Kamera.1.PTZ.Stoppzeit","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"oid-2":"","min":"0.5","max":"15","step":"0.5","name":"Kizi Kamera Steuerung Stoppzeit Slider","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"336px","top":"695px","z-index":"25","width":"134px","height":"23px"},"widgetSet":"jqui"},{"tpl":"tplFrame","data":{"visibility-cond":"==","visibility-val":1,"title":"{javascript.0.Xeoma.Kamera.1.Raum}","title_color":"rgba(250,250,250,1)","title_top":"18","title_left":"15","header_height":"0","header_color":"red","title_font":"RobotoCondensed-Regular, Futura","title_back":"","name":"Hintergrund 1","gestures-offsetX":0,"gestures-offsetY":0,"signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"visibility-groups-action":"hide","lc-type":"last-change","lc-is-interval":true,"lc-is-moment":false,"lc-format":"","lc-position-vert":"top","lc-position-horz":"right","lc-offset-vert":0,"lc-offset-horz":0,"lc-font-size":"12px","lc-font-family":"","lc-font-style":"","lc-bkg-color":"","lc-color":"","lc-border-width":"0","lc-border-style":"","lc-border-color":"","lc-border-radius":10,"lc-zindex":0},"style":{"left":"94px","top":"68px","width":"400px","height":"670px","background":"","background-color":"rgba(80,80,80,0.4)","z-index":"5","border-radius":"0 20px 0 0px","border-style":"none","font-size":"14px","font-family":""},"widgetSet":"basic"}]
Gruß
Pix
-
Hallo allerseits, hab mich heute mal mit dem Skript (herzlichen Dank) beschäftigt und Fragen dazu:
IP, User, Passwort trägt man wohl nicht oben im Skript ein, weil auskommentiert .. korrekt? Wohin gehören diese Daten? Das Manager-Tool speichert sie ja offenbar nicht. <erledigt>Muss der Server immer wieder neu gestartet werden .. oder trägt er sich als Autostart ein? Muss er überhaupt gestartet sein um über ioBroker was zu steuern .. oder startet ioBroker (bzw. das Skript) die Dienste bei Bedarf?
Edit: Musste ein paar Zeilen löschen .. offenbar hab ich Onvif falsch verstanden und dachte es wäre ein universelles Kamerasteuerungs Interface .. es geht wohl es allein um Steuerung. Trotzdem wären die beiden obigen Punkte spannend zu wissen.
VG</erledigt>
-
Hallo
ich versuche das Skript bei mir zum Laufen zu bekommen.
Dazu habe ich die IP-Adresse, Passwort usw angepasst
Dann habe ich noch den Pfad wo die Snapshot-Datei abgespeichert werden soll geändert
Das Skript selbst habe ich unter Skript/global abgelegt (die PZT Parameter werden auch erzeugt)
Dort wird es zunächst manuell gestartet (Test)
Leider wird aber keine Snapshot-Datei im angegebenen Pfad erstellt
Was mache ich da verkehrt ?
Ich verwende eine HIKVISION DS-2CD2T42WD-I5 Kamera und die Informationen für die IP-Adresse habe aus dem Onvif Device Manager genommen
Danke schon mal
Andreas
-
Andreas, wie löst Du denn ein Snapshot aus .. ich sehe nur diese Objekte:
const idSpeed = pfad + 'Geschwindigkeit'; const idStoppzeit = pfad + 'Stoppzeit'; const idStopp = pfad + 'Stopp'; const idRechts = pfad + 'rechts'; const idLinks = pfad + 'links'; const idHoch = pfad + 'hoch'; const idRunter = pfad + 'runter'; const idZoomIn = pfad + 'ZoomIn'; const idZoomOut = pfad + 'ZoomOut'; const idGotoPreset = pfad + 'gotoPreset';
-
Dazu gibt es die Funktion saveImage im Skript von pix.
Da müsste eigentlich ein File auf dem Raspberry abgespeichert werden
function saveImage () { // Initialize the OnvifDevice object device.init((error) => { if (error) { log('[ERROR] ' + error.message, 'error'); return; } else { if (logging) log('The OnvifDevice object has been initialized successfully.'); // +++ Get the detailed device information var device_info = device.getInformation(); if (logging) log(JSON.stringify(device_info, null, ' ')); // +++ Get the UDP stream URL var url = device.getUdpStreamUrl(); if (logging) log('UDP-Stream: ' + url); // +++ Get Profile var profile = device.getCurrentProfile(); if (logging) log('Profile: ' + JSON.stringify(profile, null, ' ')); // Viele Infos // für debug: //log('http: ' + profile.stream.http); var cam_info = 'ONVIF Bild' + '\n' + 'Model: ' + device_info.Model + '\n' + 'Firmware: ' + device_info.FirmwareVersion + '\n' + 'Seriennummer: ' + device_info.SerialNumber + '\n' + 'Harware ID: ' + device_info.HardwareId + '\n' + 'RTSP-Stream: ' + url; // +++ Get the data of the snapshot log('fetching the data of the snapshot…'); device.fetchSnapshot((error, res) => { if (error) { log(error.message, 'error'); return; } // Save the data to a file and send via telegram fs.writeFile(dest_path + 'onvif_snapshot.jpg', res.body, function (error) { // Anpassen an die OS X gegebenheiten (oder per Telegram senden) if (error) { log(error.message, 'error'); } else { sendImage(dest_path + 'onvif_snapshot.jpg', cam_info); log('Image sent!'); } }); }); } });
Deine Frage "wie löse ich das aus" ist aber berechtigt und da muss ich heute Abend noch einmal etwas prüfen. Es könnte sein, dass die Funktion beim Aufrufen des Skripts gar nicht ausgelöst wird, sondern dazu muss man einen Trigger setzen. Das checke ich heute Abend.
Leider fehlt so eine Art Bedienungsanleitung wie und was man durchführen muss, das macht es halt ein wenig schwer das alles nachzuvollziehen
Andreas