49_SSCam: Fragen, Hinweise, Neuigkeiten und mehr rund um dieses Modul

Begonnen von DS_Starter, 14 Dezember 2015, 16:19:08

Vorheriges Thema - Nächstes Thema

DS_Starter

Hi  Marvin,

ZitatKann es sein, dass die Events nicht bei jedem Snap, sondern nach dem generieren aller Snaps erzeugt werden soll?
Ja genau. Allerdings hängt es weniger vom Sollen ab. Es ist so dass nach einem snap nichts weiter zurück kommt als ein error oder bei Erfolg die id. Erst wenn die gesamte Anzahl der snaps ausgeführt wurde, erfolgt eine Abfrage an die API um die Werte für filename, Zeit etc. für alle durchgeführten snaps liefern zu lassen. Daraus werden dann die Events generiert bzw. Readings gesetzt. Das ist einfach eine Zeitfrage, da es sonst passieren kann dass der Snapabstand weit weg von dem gewünschten Maß ist.
Wenn du verbose 4 einstellist, siehst du den Ablauf deutlich. Kannst die Ausgabe ja mal posten.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

marvin78

Das ist Log in verbose 4 für 4 snapshots alle 2 Sekunden:

2019.01.15 14:37:46 4: HaustuerCam - ####################################################
2019.01.15 14:37:46 4: HaustuerCam - ###    start cam operation Snap         
2019.01.15 14:37:46 4: HaustuerCam - ####################################################
2019.01.15 14:37:46 4: HaustuerCam - --- Begin Function SSCam_getapisites nonblocking ---
2019.01.15 14:37:46 4: HaustuerCam - API hashvalues already set - ignore get apisites
2019.01.15 14:37:46 4: HaustuerCam - --- Begin Function SSCam_getcamid nonblocking ---
2019.01.15 14:37:46 4: HaustuerCam - CAMID already set - ignore get camid
2019.01.15 14:37:46 4: HaustuerCam - --- Begin Function Snap nonblocking ---
2019.01.15 14:37:46 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:46 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&dsId="0"&method="TakeSnapshot"&version="1"&camId="3"&blSave="true"&_sid="OCi8Dbv97CNjg1810ODN064100"
2019.01.15 14:37:46 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:46 4: HaustuerCam - SSCam_refresh - caller: "n.a.", callerroom: "n.a.", detail: "n.a.", pload: 0, forcePageRefresh: 0
2019.01.15 14:37:46 3: HaustuerCam - Snapshot of Camera HaustuerCam has been done successfully
2019.01.15 14:37:46 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:48 4: HaustuerCam - ####################################################
2019.01.15 14:37:48 4: HaustuerCam - ###    start cam operation Snap         
2019.01.15 14:37:48 4: HaustuerCam - ####################################################
2019.01.15 14:37:48 4: HaustuerCam - --- Begin Function SSCam_getapisites nonblocking ---
2019.01.15 14:37:48 4: HaustuerCam - API hashvalues already set - ignore get apisites
2019.01.15 14:37:48 4: HaustuerCam - --- Begin Function SSCam_getcamid nonblocking ---
2019.01.15 14:37:48 4: HaustuerCam - CAMID already set - ignore get camid
2019.01.15 14:37:48 4: HaustuerCam - --- Begin Function Snap nonblocking ---
2019.01.15 14:37:48 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:48 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&dsId="0"&method="TakeSnapshot"&version="1"&camId="3"&blSave="true"&_sid="OCi8Dbv97CNjg1810ODN064100"
2019.01.15 14:37:48 4: HaustuerCam - SSCam_refresh - caller: "n.a.", callerroom: "n.a.", detail: "n.a.", pload: 0, forcePageRefresh: 0
2019.01.15 14:37:48 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:48 3: HaustuerCam - Snapshot of Camera HaustuerCam has been done successfully
2019.01.15 14:37:50 4: HaustuerCam - ####################################################
2019.01.15 14:37:50 4: HaustuerCam - ###    start cam operation Snap         
2019.01.15 14:37:50 4: HaustuerCam - ####################################################
2019.01.15 14:37:50 4: HaustuerCam - --- Begin Function SSCam_getapisites nonblocking ---
2019.01.15 14:37:50 4: HaustuerCam - API hashvalues already set - ignore get apisites
2019.01.15 14:37:50 4: HaustuerCam - --- Begin Function SSCam_getcamid nonblocking ---
2019.01.15 14:37:50 4: HaustuerCam - CAMID already set - ignore get camid
2019.01.15 14:37:50 4: HaustuerCam - --- Begin Function Snap nonblocking ---
2019.01.15 14:37:50 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:50 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&dsId="0"&method="TakeSnapshot"&version="1"&camId="3"&blSave="true"&_sid="OCi8Dbv97CNjg1810ODN064100"
2019.01.15 14:37:50 4: HaustuerCam - SSCam_refresh - caller: "n.a.", callerroom: "n.a.", detail: "n.a.", pload: 0, forcePageRefresh: 0
2019.01.15 14:37:50 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:50 3: HaustuerCam - Snapshot of Camera HaustuerCam has been done successfully
2019.01.15 14:37:52 4: HaustuerCam - ####################################################
2019.01.15 14:37:52 4: HaustuerCam - ###    start cam operation Snap         
2019.01.15 14:37:52 4: HaustuerCam - ####################################################
2019.01.15 14:37:52 4: HaustuerCam - --- Begin Function SSCam_getapisites nonblocking ---
2019.01.15 14:37:52 4: HaustuerCam - API hashvalues already set - ignore get apisites
2019.01.15 14:37:52 4: HaustuerCam - --- Begin Function SSCam_getcamid nonblocking ---
2019.01.15 14:37:52 4: HaustuerCam - CAMID already set - ignore get camid
2019.01.15 14:37:52 4: HaustuerCam - --- Begin Function Snap nonblocking ---
2019.01.15 14:37:52 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:52 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&dsId="0"&method="TakeSnapshot"&version="1"&camId="3"&blSave="true"&_sid="OCi8Dbv97CNjg1810ODN064100"
2019.01.15 14:37:52 4: HaustuerCam - SSCam_refresh - caller: "n.a.", callerroom: "n.a.", detail: "n.a.", pload: 0, forcePageRefresh: 0
2019.01.15 14:37:52 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:52 3: HaustuerCam - Snapshot of Camera HaustuerCam has been done successfully
2019.01.15 14:37:53 4: HaustuerCam - ####################################################
2019.01.15 14:37:53 4: HaustuerCam - ###    start cam operation getsnapinfo         
2019.01.15 14:37:53 4: HaustuerCam - ####################################################
2019.01.15 14:37:53 4: HaustuerCam - --- Begin Function SSCam_getapisites nonblocking ---
2019.01.15 14:37:53 4: HaustuerCam - API hashvalues already set - ignore get apisites
2019.01.15 14:37:53 4: HaustuerCam - --- Begin Function SSCam_getcamid nonblocking ---
2019.01.15 14:37:53 4: HaustuerCam - CAMID already set - ignore get camid
2019.01.15 14:37:53 4: HaustuerCam - --- Begin Function getsnapinfo nonblocking ---
2019.01.15 14:37:53 4: HaustuerCam - Call getsnapinfo with params: Image numbers => 4, Image size => 0, Id => 526
2019.01.15 14:37:53 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&method="List"&version="1"&idList="526"&imgSize="0"&limit="4"&_sid="OCi8Dbv97CNjg1810ODN064100"
2019.01.15 14:37:53 4: HaustuerCam - Snapinfos of camera HaustuerCam retrieved
2019.01.15 14:37:53 4: HaustuerCam - Snap [0]: ID => 526, File => HaustuerCam-20190115-1437525735.jpg, Created => 15.01.2019 / 14:37:52
2019.01.15 14:37:53 4: HaustuerCam - SSCam_FWsummaryFn called - FW_wname: WEB, device: HaustuerCam, room: , attributes: 
2019.01.15 14:37:53 4: HaustuerCam - SSCam_refresh - caller: "n.a.", callerroom: "n.a.", detail: "n.a.", pload: 0, forcePageRefresh: 0

DS_Starter

Ich sehe das Problem Marvin.

2019.01.15 14:37:53 4: HaustuerCam - Call getsnapinfo with params: Image numbers => 4, Image size => 0, Id => 526
2019.01.15 14:37:53 4: HaustuerCam - Call-Out now: http://10.1.3.7:5000/webapi/entry.cgi?api="SYNO.SurveillanceStation.SnapShot"&method="List"&version="1"&idList="526"&imgSize="0"&limit="4"&_sid="OCi8Dbv97CNjg1810ODN064100"


Bei dir wird die Info zur konkreten id 526 angefordert. Das limit 4, was eigentlich die vier abzurufenden snap infos bewirkt, ist in diesem Fall wirkungslos. Weshalb das bei dir so ist kann ich noch nicht sagen. Da schaue ich heute Abend mal genauer.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

marvin78

Die 526 ist auch meine LastSnapId. Aber das war sicher klar.

DS_Starter

Ja das ist klar. Aber die Abfrage müsste etwas anders aufgebaut sein. Was bei mir auch so ist. Deswegen komme ich grad ins Grübeln.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

marvin78

Wenn ich etwas mehr Zeit hätte, würde ich dich gerne beim Grübeln unterstützen aber leider hatte ich noch nicht die Gelegenheit, mir deinen Code überhaupt einmal anzuschauen :(

DS_Starter

Alles gut, habe die Ursache gefunden  :)
Ja die Abhängigkeiten werden immer komplexer. Ich werde es heute Abend fixen. Muss ganz vorsichtig ändern um keine Abhängigkeiten in Steuerketten zu zerstören.
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Hallo Marvin,

habe den Snapabruf im Modul korrigiert, getestet und eingecheckt. Wenn du es schon ausprobieren möchtest bitte aus dem SVN ziehen.

Grüße,
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

eldrik

Hallo Heiko,

ich habe jetzt die Version 8.5.0 aus dem Contrib bezüglich snapCams ausprobiert.

Wenn ich im SVS Device nach der Konfiguration den Befehl

set DS1 snapCams 4 4 CAM:"Stellplatz, Haustuer"

eingebe passiert nichts, einzig 1x erscheint der folgende FHEM Logeintrag

2019.01.16 09:33:45.783 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/49_SSCam.pm line 2196.

Bei weiteren Versuchen erscheint dieser erst wieder nach einem FHEM Restart.

Anbei ein List des Device:

nternals:
   CAMNAME    SVS
   COMPATIBILITY 8.2
   CREDENTIALS Set
   DEF        SVS 10.0.81.70 5000 http
   MODEL      SVS
   NAME       DS1
   NR         1563
   OPMODE     getsvslog
   PROTOCOL   http
   SERVERADDR 10.0.81.70
   SERVERPORT 5000
   SMTPCREDENTIALS Set
   STATE      initialized
   TYPE       SSCam
   VERSION    8.5.0
   HELPER:
     ACTIVE     off
     APIAUDIOSTM SYNO.SurveillanceStation.AudioStream
     APIAUDIOSTMMAXVER 2
     APIAUDIOSTMPATH SurveillanceStation/audioStreaming.cgi
     APIAUTH    SYNO.API.Auth
     APIAUTHMAXVER 6
     APIAUTHPATH auth.cgi
     APICAM     SYNO.SurveillanceStation.Camera
     APICAMEVENT SYNO.SurveillanceStation.Camera.Event
     APICAMEVENTMAXVER 1
     APICAMEVENTPATH entry.cgi
     APICAMMAXVER 9
     APICAMPATH entry.cgi
     APIEVENT   SYNO.SurveillanceStation.Event
     APIEVENTMAXVER 5
     APIEVENTPATH entry.cgi
     APIEXTEVT  SYNO.SurveillanceStation.ExternalEvent
     APIEXTEVTMAXVER 1
     APIEXTEVTPATH entry.cgi
     APIEXTREC  SYNO.SurveillanceStation.ExternalRecording
     APIEXTRECMAXVER 3
     APIEXTRECPATH entry.cgi
     APIHM      SYNO.SurveillanceStation.HomeMode
     APIHMMAXVER 1
     APIHMPATH  entry.cgi
     APIINFO    SYNO.API.Info
     APILOG     SYNO.SurveillanceStation.Log
     APILOGMAXVER 3
     APILOGPATH entry.cgi
     APIPARSET  1
     APIPRESET  SYNO.SurveillanceStation.PTZ.Preset
     APIPRESETMAXVER 1
     APIPRESETPATH entry.cgi
     APIPTZ     SYNO.SurveillanceStation.PTZ
     APIPTZMAXVER 5
     APIPTZPATH entry.cgi
     APIREC     SYNO.SurveillanceStation.Recording
     APIRECMAXVER 6
     APIRECPATH entry.cgi
     APISNAPSHOT SYNO.SurveillanceStation.SnapShot
     APISTM     SYNO.SurveillanceStation.Stream
     APISTMMAXVER 1
     APISTMPATH entry.cgi
     APISVSINFO SYNO.SurveillanceStation.Info
     APISVSINFOMAXVER 6
     APISVSINFOPATH entry.cgi
     APITAKESNAPMAXVER 1
     APITAKESNAPPATH entry.cgi
     APIVIDEOSTM SYNO.SurveillanceStation.VideoStreaming
     APIVIDEOSTMMAXVER 1
     APIVIDEOSTMPATH entry.cgi
     APIVIDEOSTMS SYNO.SurveillanceStation.VideoStream
     APIVIDEOSTMSMAXVER 1
     APIVIDEOSTMSPATH SurveillanceStation/videoStreaming.cgi
     CREDENTIALS \[WzdY5?d6Z|iJ;zmEU~j]8x
     HLSSTREAM  inactive
     LOGINRETRIES 0
     OLDPTZHOME
     OLDVALPOLL 0
     OLDVALPOLLNOLOGGING 0
     RECTIME_DEF 15
     SID        yxwTkH8HRIUDA1480M7N961304
     SMTPCREDENTIALS ][}qfom{RJZx`KLqjz8o_Zrjf`Gl^]i|PUNxPHO7Vm:WJzAB
     SNAPLIMIT  0
     TOTALCNT   0
     ALLSNAPREF:
     SVSVERSION:
       BUILD      5766
       MAJOR      8
       MINOR      2
       SMALL      2
   READINGS:
     2019-01-16 09:43:50   Error           none
     2019-01-16 09:43:50   Errorcode       none
     2019-01-16 09:43:49   HomeModeState   off
     2019-01-16 09:43:50   LastLogEntry    2019-01-16 09:15:28 - Information - Settings of [Manual Record] for camera [Stellplatz] were changed to [Stop].
     2019-01-16 09:43:48   PollState       Inactive
     2019-01-16 09:43:50   SVSlicenseNumber 5
     2019-01-16 09:43:50   SVSuserPriv     Admin
     2019-01-16 09:43:50   SVSversion      8.2.2-5766
     2019-01-16 09:43:50   compstate       true
     2019-01-16 09:43:48   state           initialized
Attributes:
   debugactivetoken 1
   smtpDebug  1
   smtpFrom   user1@eldrik.de
   smtpHost   10.0.81.68
   smtpTo     user2@eldrik.de
   snapEmailTxt subject => Hoftoroeffnung, body => Das Hoftor wurde geoeffnet
   verbose    4
   webCmd     homeMode
   webCmdLabel HomeMode


Eine Idee was ich vergessen haben könnte?

Greetz
Eldrik

marvin78

Zitat von: DS_Starter am 15 Januar 2019, 18:56:37
Hallo Marvin,

habe den Snapabruf im Modul korrigiert, getestet und eingecheckt. Wenn du es schon ausprobieren möchtest bitte aus dem SVN ziehen.

Grüße,
Heiko

Danke. Getestet und das klappt! Schnell und gut :)

DS_Starter

Hi eldrik,

sind denn Stellplatz, Haustuer die Fhem Devicenamen ?
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

eldrik

Zitat von: DS_Starter am 16 Januar 2019, 10:06:59
Hi eldrik,

sind denn Stellplatz, Haustuer die Fhem Devicenamen ?

An die Variante hatte ich bereits gedacht aber ich habe in der Tat die Namen benutzt wie sie in der DS definiert sind.

Abgeändert auf

set DS1 snapCams 4 4 CAM:"syno_surveillance_station_stellplatz, syno_surveillance_station_haustuer"

Leider keine Änderung.

Edit: ich habe das dicke UND überlesen bei snapEmailTxt für die Camera Devices, jetzt verlangt er nach dem Mime Modul es geht weiter!

Greetz
Eldrik

DS_Starter

#1347
Ja genau UND  :)

Habe gerade probiert

4 4 CAM:"CamHE1,SSCam.Terrasse"

Klappt einwandfrei. Wenn das Attr snapEmailTxt in den Cam-Devices nicht gesetzt ist, wird nur der/die snaps bei jeder Cam ausgeführt aber von der betroffenen Cam eben kein Email Bild versendet.

Um die Warnung kümmere ich mich ...
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

eldrik

Zitat von: DS_Starter am 16 Januar 2019, 10:29:36
Ja genau UND  :)

Habe gerade probiert

4 4 CAM:"CamHE1,SSCam.Terrasse"

Klappt einwandfrei. Wenn das Attr snapEmailTxt in den Cam-Devices nicht gesetzt ist, wird nur der/die snaps bei jeder Cam ausgeführt aber von der betroffenen Cam eben kein Email Bild versendet.

Um die Warnung kümmere ich mich ...

Hi,

so es funktioniert aus meiner Sicht alles :)

Bei meiner Haustürkamera habe ich festgestellt, dass diese scheinbar recht träge reagiert, da hier zwar der Dateiname des Snaps unterschiedlich ist aber bei der Snaphostfrequenz von < 8 Sekunden Bilder mit dem gleichen Zeitstempel im Bild vorhanden sind.

Stelle meine eigene Funktion jetzt auf die SVS Variante um.

Vielen Dank!

Greetz
Eldrik

DS_Starter

Danke für duie Rückinfo. Werde noch die ganze Doku und Commandref ergänzen. Checkin wird dann in Richtung kommendes WE sein.

Grüße
Heiko
ESXi@NUC+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter