Dustin1358 / Raspberry-Pi-Divera-Monitor

Tutorial zur Einrichtung des Divera Monitors auf einem Raspberry Pi mit automatischer Ein/Ausschaltung bei Alarmen und integriertem Bewegungsmelder.
14 stars 8 forks source link

Monitor won't go off when Alarm is archieved #2

Closed djgrizoo closed 3 years ago

djgrizoo commented 3 years ago

https://github.com/Dustin1358/Raspberry-Pi-Divera-Monitor/blob/e2ba7442b0124d78f0d7b8cebfe43606520e00f6/.divera_script_motion.py#L140

djgrizoo commented 3 years ago

Is this line correct? Status of the screensaver is not known at this point

Dustin1358 commented 3 years ago

When the script is started the init_screen_saver() function is called which activates or deactivates the screen saver and also sets the SCREENSAVER_ACTIVE variable. Because the superior if clause already checks if the the screen saver is not active and this is the else case the SCREENSAVER_ACTIVE variable is indeed always true and could be omitted. But it does not change the behaviour of the script when it is part of the if-clause. There was an issue that the monitor did not went off, which occurred with an api change and was fixed two month ago (https://github.com/Dustin1358/Raspberry-Pi-Divera-Monitor/issues/1). If you have this problem you may check if you have the latest version which fixed the issue.

djgrizoo commented 3 years ago

Ok, then I really don't know what my problem is.... Maybe we can get in contact via mail? Das Ganze geht natürlich auch in deutsch :-D

djgrizoo commented 3 years ago

pi@raspberrypi:~ $ ./.divera_script.py Turns screensaver on xscreensaver-command: warning: $DISPLAY is not set: defaulting to ":0.0". xscreensaver-command: activating.

Turn display of Turns screen off Turns screensaver off xscreensaver-command: warning: $DISPLAY is not set: defaulting to ":0.0". xscreensaver-command: deactivating.

opening a connection to the CEC adapter... Turning display on Turns screen on Turns screensaver off xscreensaver-command: warning: $DISPLAY is not set: defaulting to ":0.0". xscreensaver-command: not active: idle timer reset.

opening a connection to the CEC adapter...

Ich habe einen Alarm ausgelöst, nach 3 Minuten (Testzeit) geht der Bildschirmschoner an. Wenn ich den Alarm nun archiviere passiert nichts. Das Script ohne Motion Detection schaltet dann sofort Monitor aus, dieses hier wartet eine Bewegung ab. Wenn nun niemand vor den Monitor tritt bleibt es einfach an... Soll das so sein? (Beispiel Fehlalarm, keiner rückt aus)

Dustin1358 commented 3 years ago

Hallo, erstmal sorry für die späte Antwort. Ich würde als ersten Schritt das Zeitintervall wann der Bildschirmschoner angeht auf das Maximum setzen. Bei dem hier im script erwähnten waren das meine ist 12 Stunden. Den eigentlich sollte der Bildschirmschoner nicht von selbst angehen sondern nur vom script gesteuert werden. Ich bin nicht sicher ob das das Problem schon löst aber das ist denke ich ein erster Ansatzpunkt. Ich sollte aber auch auf jeden Fall im Text ergänzen das die Dauer zum automatischen Einschalten möglichst hoch sein soll.

djgrizoo commented 3 years ago

Hab ich schon so eingestellt inzwischen, das sollte erstmal gehen. Hatte aber auch wenig Zeit die letzten Tage zum Testen. Noch eins, im WIKI steht: Wird das Script mit Bewegungsmelder verwendet muss die Zeile #@xscreensaver -no-splash auskommentiert werden! Müsste es nicht heißen reinkommentiert? Auskommentiert läuft der xscreensaver dienst ja nicht und es kommt zu einer entsprechenden Fehlermeldung.

Dustin1358 commented 3 years ago

Ja das stimmt, ich formuliere es um damit es klarer wird.