Hallo zusammen,
veilleicht kann hier jemand einem "blutigen Anfänger" in dieser Thematik etwas unter die Arme greifen.
Ich habe ein Synology NAS (214 Play, DSM 6) an dem ich seit kurzem einen CUL betreibe und FHEM (5.7) installiert habe.
Mein Ziel ist, eine FOSCAM Kamera, die mittels Surveillance Station gesteuert wird, über einen FS20 Bewegungsmelder zum starten einer Aufnahme zu bewegen.
Den Part bzgl. des FS20 Bewegungsmelders konnte ich erfolgreich umsetzen, d.h. der Bewegungsmelder ist im FHEM eingebunden und sendet entspechend seine Statusmeldungen beim "Erkennen" einer Bewegung. (Wird im LogFile entsprechend dokumentiert).
Mein Problem habe ich nun allerdings im zweiten Part, wenn es darum geht die Surveillance Station zur Aufnahme zu bewegen.
Als Voraussetzung für das dafür notwendige Modul SSCam habe ich entsprechend JSON installiert und einen User im DSM dafür angelegt.
Danach die Kamera bzw. die Surveillance Station und den zugehörigen User in FHEM konfiguriert.
So weit passt das erstmal alles und ich kann die Kamera auch mit "set <cam> enable" bzw. "set <cam> disable" erfolgreich aktivieren und deaktivieren.
Sämtliche Versuche jedoch die Kamera zu einer Aufnahme zu bewegen scheitern.
"set <cam> on" oder "set <cam> on 60" führen letztlich nur zu folgendem Fehler im Logfile:
ERROR - Operation Start of Camera FCam_I was not successful. Errorcode: 401 - Parameter invalid
Hat jemand eine Idee dazu?
Vielen Dank & viele Grüsse,
Joachim
Hallo Joachim,
welche DSM bzw. SVS-Version hast du denn ?
Seit kurzem habe ich Hinweise von Nutzern bekommen die mit der SVS 7.2 Probleme bekommen haben. Dafür habe ich bereits einen Patch gebaut.
Kannst du bitte einen verbose 4 Log posten ?
Dazu das Attribut verbose auf "4" setzen, die Startfunktion so wie von dir geschrieben ausführen und dann den Loginhalt posten.
Grüße
Heiko
Hallo Heiko,
danke für die promte Antwort.
Hier meine Infos dazu:
DSM:
DSM 6.0.1-7393 Update 1
SVS:
7.2.2-4649
Hier der entsprechende Level-4 Log Auszug (Ich habe lediglich mein svs-User-PW durch "********" ersetzt):
2016.07.03 22:47:19 4: FCam_I - Recording of Camera FCam_I will be started now
2016.07.03 22:47:19 4: FCam_I - --- Begin Function getapisites nonblocking ---
2016.07.03 22:47:19 4: FCam_I - Call-Out now: http://192.168.178.64:5000/webapi/query.cgi?api=SYNO.API.Info&method=Query&version=1&query=SYNO.API.Auth,SYNO.SurveillanceStation.ExternalRecording,SYNO.SurveillanceStation.Camera,SYNO.SurveillanceStation.SnapShot,SYNO.SurveillanceStation.PTZ,SYNO.SurveillanceStation.Info,SYNO.SurveillanceStation.Camera.Event,SYNO.SurveillanceStation.Event,SYNO.SurveillanceStation.VideoStreaming,SYNO.SurveillanceStation.ExternalEvent,SYNO.SurveillanceStation.Streaming
2016.07.03 22:47:20 4: FCam_I - JSON returned: $VAR1 = {
'success' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ),
'data' => {
'SYNO.SurveillanceStation.PTZ' => {
'path' => 'entry.cgi',
'minVersion' => 1,
'requestFormat' => 'JSON',
'maxVersion' => 5
},
'SYNO.SurveillanceStation.SnapShot' => {
'path' => 'entry.cgi',
'minVersion' => 1,
'requestFormat' => 'JSON',
'maxVersion' => 1
},
'SYNO.SurveillanceStation.ExternalEvent' => {
'maxVersion' => 1,
'minVersion' => 1,
'requestFormat' => 'JSON',
'path' => 'entry.cgi'
},
'SYNO.SurveillanceStation.Event' => {
'maxVersion' => 5,
'minVersion' => 1,
'requestFormat' => 'JSON',
'path' => 'entry.cgi'
},
'SYNO.SurveillanceStation.Info' => {
'path' => 'entry.cgi',
'requestFormat' => 'JSON',
'minVersion' => 1,
'maxVersion' => 6
},
'SYNO.API.Auth' => {
'maxVersion' => 6,
'minVersion' => 1,
'path' => 'auth.cgi'
},
'SYNO.SurveillanceStation.Camera' => {
'minVersion' => 1,
'requestFormat' => 'JSON',
'maxVersion' => 8,
'path' => 'entry.cgi'
},
'SYNO.SurveillanceStation.Camera.Event' => {
'minVersion' => 1,
'requestFormat' => 'JSON',
'maxVersion' => 1,
'path' => 'entry.cgi'
},
'SYNO.SurveillanceStation.VideoStreaming' => {
'minVersion' => 1,
'requestFormat' => 'JSON',
'maxVersion' => 1,
'path' => 'entry.cgi'
},
'SYNO.SurveillanceStation.Streaming' => {
'minVersion' => 1,
'maxVersion' => 2,
'path' => 'SurveillanceStation/streaming.cgi'
},
'SYNO.SurveillanceStation.ExternalRecording' => {
'maxVersion' => 3,
'minVersion' => 1,
'requestFormat' => 'JSON',
'path' => 'entry.cgi'
}
}
};
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.API.Auth selected: auth.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.API.Auth selected: 6
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.ExternalRecording selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.ExternalRecording selected: 3
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.Camera selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.Camera: 8
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.SnapShot selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.SnapShot: 1
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.PTZ selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.PTZ: 5
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.Info selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.Info: 6
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.Camera.Event selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.Camera.Event: 1
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.Event selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.Event: 5
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.VideoStreaming selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.VideoStreaming: 1
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.ExternalEvent selected: entry.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.ExternalEvent selected: 1
2016.07.03 22:47:20 4: FCam_I - Path of SYNO.SurveillanceStation.Streaming selected: SurveillanceStation/streaming.cgi
2016.07.03 22:47:20 4: FCam_I - MaxVersion of SYNO.SurveillanceStation.Streaming selected: 2
2016.07.03 22:47:20 4: FCam_I - --- End Function getapisites nonblocking ---
2016.07.03 22:47:20 4: FCam_I - --- Begin Function serverlogin nonblocking ---
2016.07.03 22:47:20 4: FCam_I - Credentials read from RAM: svs_fhem ********
2016.07.03 22:47:20 4: FCam_I - Call-Out now: http://192.168.178.64:5000/webapi/auth.cgi?api=SYNO.API.Auth&version=6&method=Login&account=svs_fhem&passwd=********&format="sid"
2016.07.03 22:47:20 4: FCam_I - Credentials read from RAM: svs_fhem ********
2016.07.03 22:47:20 4: FCam_I - JSON returned: $VAR1 = {
'success' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ),
'data' => {
'is_portal_port' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
'sid' => 'JP7JhiArifjZs1530LTN988101'
}
};
2016.07.03 22:47:20 4: FCam_I - Login of User svs_fhem successful - SID: JP7JhiArifjZs1530LTN988101
2016.07.03 22:47:20 4: FCam_I - --- End Function serverlogin nonblocking ---
2016.07.03 22:47:20 4: FCam_I - --- Begin Function getcamid nonblocking ---
2016.07.03 22:47:20 4: FCam_I - Call-Out now: http://192.168.178.64:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&version=8&method=List&basic=true&streamInfo=true&camStm=true&_sid="JP7JhiArifjZs1530LTN988101"
2016.07.03 22:47:20 4: FCam_I - Detection Camid successful - FCam_I ID: 3
2016.07.03 22:47:20 4: FCam_I - --- End Function getcamid nonblocking ---
2016.07.03 22:47:20 4: FCam_I - --- Begin Function cam: Start nonblocking ---
2016.07.03 22:47:20 4: FCam_I - Call-Out now: http://192.168.178.64:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalRecording&method=Record&version=3&cameraId=3&action=start&_sid="JP7JhiArifjZs1530LTN988101"
2016.07.03 22:47:20 1: FCam_I - ERROR - Operation Start of Camera FCam_I was not successful. Errorcode: 401 - Parameter invalid
2016.07.03 22:47:20 4: FCam_I - --- End Function cam: Start nonblocking with error ---
2016.07.03 22:47:20 4: FCam_I - --- Begin Function logout nonblocking ---
2016.07.03 22:47:20 4: FCam_I - Credentials read from RAM: svs_fhem ********
2016.07.03 22:47:20 4: FCam_I - URL-Call: http://192.168.178.64:5000/webapi/auth.cgi?api=SYNO.API.Auth&version=6&method=Logout&_sid=JP7JhiArifjZs1530LTN988101
2016.07.03 22:47:20 4: FCam_I - JSON returned: $VAR1 = {
'success' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' )
};
2016.07.03 22:47:20 4: FCam_I - Session of User svs_fhem has ended - SID: JP7JhiArifjZs1530LTN988101 has been deleted
2016.07.03 22:47:20 4: FCam_I - --- End Function logout nonblocking ---
Ja das Problem ist mir bekannt.
Habe dafür einen Patch. den kannst du hier runterladen:
https://forum.fhem.de/index.php/topic,45671.msg468464.html#msg468464 (https://forum.fhem.de/index.php/topic,45671.msg468464.html#msg468464)
Das angepasste Modul will ich auch zügig im Reporsitory einchecken damit das Modul per Update zur Verfügung steht.
Bitte gib mir Bescheid ob der Patch auch bei dir zum Ziel führt.
In dem Thread: https://forum.fhem.de/index.php/topic,45671.0.html (https://forum.fhem.de/index.php/topic,45671.0.html) lese ich immer mit.
Grüße
Heiko
Das ist cool!
Funktioniert - Vielen Dank dafür!!!!!
Viele Grüsse,
Joachim
Hallo zusammen,
eine Frage habe ich jetzt doch noch - auch wenn dies nun die "blöde Frage des Tages ist" oder auf die Gefahr hin, dass man mich hier an ein Manual, Wiki oder an bereits gestellte Posts im Forum verweist. Sorry, aber ich kriegs einfach nicht hin...
Ich habe einerseits einen FS20-Bewegungssensor namens "mvSenTerrasse" und ich habe eine Kamera namens "FCam_I", die ich mitttels SSCam Modul konfiguriert habe.
Beides unabhängig voneinander funktionsfähig, d.h. der Sensor meldet bei einer Bewegung im Log File ein "mvSen_Terrasse on-old-for-timer 60" und die Kamera kann ich via "set FCam_I on" inzwischen auch zu einem Recording überreden.
Aber ich krieg einfach das entsprechende "Notify" nicht hin. D.h. wie schaffe ich es, dass bei einer Bewegungserkennung ein Recording der Kamera startet?
Kann mir hier jemand bitte nochmals einen Tipp geben?!
Vielen Dank & Grüsse,
Joachim
Hallo Joachim,
gibt keine blöden Fragen ;)
Ich habe selbst FS20-Melder für diesen Zweck.
Das Notify könnte so aussehen:
define <name> NOTIFY mvSenTerrasse:on.* set FCam_I on
Ein Beispiel von mir:
###############################################################
# Notify Kamera Terrasse
###############################################################
define MelderTER.cam.CamTER.on notify MelderTER:on.* set CamTER on
attr MelderTER.cam.CamTER.on disable 0
attr MelderTER.cam.CamTER.on room Cams
In den Anfängerfragen lese ich aber nur selten mit.
Fragen rund um das Modul am eheseten hier: https://forum.fhem.de/index.php/topic,45671.0.html (https://forum.fhem.de/index.php/topic,45671.0.html)
Probier mal ...
Grüße
Heiko
Hey cool - danke Heiko,
schon wieder so ein prompter Support - und funktioniert.
Danke nochmals!
Grüsse,
Joachim