Modul für Netgear Arlo-Kameras (Python-Version)

Begonnen von maluk, 07 Mai 2018, 20:40:06

Vorheriges Thema - Nächstes Thema

maluk

Ich habe das Modul jetzt auf einem Raspberry 2 bei mir installiert und kann das Problem nachvollziehen. Lösung gibt es heute keine mehr, aber Nachvollziehbarkeit ist ja das Wichtigste beim Fehlersuchen  :)

maluk

Ich habe das Problem gefunden - auf dem Raspberry muss sseclient aktualisiert werden:

sudo pip install --upgrade sseclient

Ich hatte bei mir vorher noch cffi aktualisiert, aber das hatte keine Auswirkung. Daher bitte nur ausführen, falls der obige Upgrade alleine nicht hilft:

sudo apt-get update
sudo apt-get install libffi-dev
sudo pip install --upgrade cffi

choetzu

danke. ich habe es gemäss deiner Anleitung gemacht.

bei mir kommt es weiterhin zu den Fehlermeldungen:

Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12eb0>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75f12dd0>> ignored
Raspi3, EnOcean, Zwave, Homematic

Vampy20

#18
sseclient aktualisiert, leider immer noch keine Readings vorhanden :-(

ich habe mal versucht mittels Logausgaben zu debuggen:


sub Arlo_Python($$) {
.......
  my ($err, $data) = HttpUtils_BlockingGet({
    url => "http://localhost:$port/$subtype?device=$name&cmd=$command&basestationId=$basestationId&cameraId=$cameraId",
    timeout => 15, noshutdown => 1});
  Log3 $name, 3, "Vampy: Komme hier vorbei";

  if ($err) {
    Log3 $name, 2, "Error occured when calling Arlo daemon: $err";
  } elsif ($data) {
    Log3 $name, 3, "Vampy: Hier nicht mehr";
.......


Evtl. hilft das weiter
FHEM 5.7 auf RPi 2 (Raspbian 4.4.13+, Perl v5.20.2), HM-CFG-USB, HM-SEC-RHS, HM-ES-PMSw1-Pl, HM-LC-Bl1PBU-FM, HM-SEC-SD-2, co2mini, Philips Hue, MySensors, DashButton

maluk

@Vampy20: wichtig sind die Ausgaben aus /tmp/arlo.log. Auf jeden Fall muss dort der Loglevel auf DEBUG stehen, damit man alle Aktivitäten erkennen kann. Die Rückmeldungen kommen nicht bei den Aufrufen von FHEM, sondern asynchron über SSE. Wenn SSE funktioniert, kann es auch noch am Zurückschreiben nach FHEM liegen. Ist bei dir Telnet in FHEM aktiviert? Falls ja, verwendest du ein Passwort?

maluk

@choetzu: bitte prüfe mal, ob dem FHEM-Logfiles Arlo-Fehlermeldungen findest. Falls nicht bitte mal in der Datei /usr/local/lib/python2.7/dist-packages/Arlo.py in Zeile 58 pass durch raise ersetzen. Danach stopServer und startServer ausführen und die beiden Logfiles prüfen (/tmp/arlo.log und FHEM-Log). Eigentlich müsste es dann eine Fehlermeldung geben, weil es ja offensichtlich Probleme beim Aufbau des EventStream gibt.

Ich hätte nicht gedacht, dass Python solche Probleme verursacht :(

Vampy20

Telnet ist eingerichtet (ohne Pwd  :o)

Im Arlo.log ist nichts anderes zu sehen als das was ich gestern schon gepostet habe.
FHEM 5.7 auf RPi 2 (Raspbian 4.4.13+, Perl v5.20.2), HM-CFG-USB, HM-SEC-RHS, HM-ES-PMSw1-Pl, HM-LC-Bl1PBU-FM, HM-SEC-SD-2, co2mini, Philips Hue, MySensors, DashButton

Vampy20

#22
Ich glaube wir kommen der Sache näher. Nachdem ich dein ersten Post noch einmal durchgelesen habe, habe ich ein Pwd für Telnet eingerichtet. Jetzt habe ich im Arlo.log Einträge wie diesen

2018-05-09 22:06:09,530 INFO: Send command to FHEM: set myArloCloud readings 4N7***F on 67 2
2018-05-09 22:06:09,534 WARNING: [Errno 32] Broken pipe
FHEM 5.7 auf RPi 2 (Raspbian 4.4.13+, Perl v5.20.2), HM-CFG-USB, HM-SEC-RHS, HM-ES-PMSw1-Pl, HM-LC-Bl1PBU-FM, HM-SEC-SD-2, co2mini, Philips Hue, MySensors, DashButton

phil82

Hallo maluk,

erstmal Danke für dein Modul. Sowas kann ich gut gebrauchen.
Ich hab mir vor zwei Wochen ein recht einfaches Skript mit dem Python-Arlo-Modul und dem Python-Fhem-Modul gebaut. Allerdings nur ein recht einfaches Python Sktipt, dass auf Bewegungen reagiert und die URLs an Dummy-Devices meldet. Das Skript lauft bei mir unter Python3.

Da dein Skipt auf dem ersten Blick recht viel versprechend aussieht, habe ich es direkt ausprobiert. Ich scheitere aktuell aber an dem Autocreate für die Kameras. Das Autocreate für die Basisstation (also set arloAccount autocreate) hat funktioniert und die Basisstation wird angelegt.

Bei "set arloBasis autocreate" bekommt ich aber folgende Fehler im Fhem-Log:

127.0.0.1 - - [09/May/2018 22:17:06] "GET /BASESTATION?device=sysArloBasis&cmd=autocreate&basestationId=48xxxxxxxxxxx7F&cameraId= HTTP/1.0" 200 -
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "FHEM/49_Arlo.py", line 274, in do_GET
    self.wfile.write(response.strip())
  File "/usr/lib/python2.7/socket.py", line 320, in write
    data = str(data) # XXX Should really reject non-string non-buffers
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 29: ordinal not in range(128)


Bei "set arloBasis updateReading" bekomme ich folgenden Fehler im Fhem-Log:

127.0.0.1 - - [09/May/2018 22:17:52] "GET /BASESTATION?device=sysArloBasis&cmd=updateReadings&basestationId=48xxxxxxxxxxx7F&cameraId= HTTP/1.0" 200 -
2018.05.09 22:17:53 1: ERROR: empty name in readingsBeginUpdate
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBeginUpdate           called by ./FHEM/49_Arlo.pm (300)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,batteryLevel,93) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (301)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,signalStrength,4) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (302)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,state,on) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (303)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: ERROR: empty name in readingsBeginUpdate
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBeginUpdate           called by ./FHEM/49_Arlo.pm (300)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,batteryLevel,79) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (301)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,signalStrength,3) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (302)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,state,on) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (303)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: ERROR: empty name in readingsBeginUpdate
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBeginUpdate           called by ./FHEM/49_Arlo.pm (300)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,batteryLevel,96) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (301)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,signalStrength,3) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (302)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)
2018.05.09 22:17:53 1: readingsUpdate(,state,on) missed to call readingsBeginUpdate first.
2018.05.09 22:17:53 1: stacktrace:
2018.05.09 22:17:53 1:     main::readingsBulkUpdate            called by ./FHEM/49_Arlo.pm (303)
2018.05.09 22:17:53 1:     main::Arlo_Camera_Readings          called by ./FHEM/49_Arlo.pm (127)
2018.05.09 22:17:53 1:     main::Arlo_Set                      called by fhem.pl (3545)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (1781)
2018.05.09 22:17:53 1:     main::DoSet                         called by fhem.pl (1813)
2018.05.09 22:17:53 1:     main::CommandSet                    called by fhem.pl (1194)
2018.05.09 22:17:53 1:     main::AnalyzeCommand                called by fhem.pl (1044)
2018.05.09 22:17:53 1:     main::AnalyzeCommandChain           called by ./FHEM/98_telnet.pm (241)
2018.05.09 22:17:53 1:     main::telnet_Read                   called by fhem.pl (3550)
2018.05.09 22:17:53 1:     main::CallFn                        called by fhem.pl (708)


/tmp/arlo.log sieht harmlos aus:

2018-05-09 22:16:40,670 INFO: Start event handler
2018-05-09 22:16:40,678 INFO: Started arlo http server on port 8001
2018-05-09 22:17:36,162 INFO: Send command to FHEM: set sysArlo reading 48xxxxxxxxxxx7F state armed
2018-05-09 22:17:36,782 INFO: Send command to FHEM: set sysArlo readings 4Nxxxxxxxxxxx9E on 93 4
2018-05-09 22:17:36,783 INFO: Send command to FHEM: set sysArlo readings 4NxxxxxxxxxxxF6 on 79 3
2018-05-09 22:17:36,784 INFO: Send command to FHEM: set sysArlo readings 4NxxxxxxxxxxxE7 on 96 3
2018-05-09 22:17:53,009 INFO: Send command to FHEM: set sysArlo reading 48E5787BA0B7F state armed
2018-05-09 22:17:53,575 INFO: Send command to FHEM: set sysArlo readings 4Nxxxxxxxxxxx9E on 93 4
2018-05-09 22:17:53,576 INFO: Send command to FHEM: set sysArlo readings 4NxxxxxxxxxxxF6 on 79 3
2018-05-09 22:17:53,576 INFO: Send command to FHEM: set sysArlo readings 4NxxxxxxxxxxxE7 on 96 3


Hast du irgendeine Idee?

Ich hatte im übrigen ebenfalls einige Probleme mit Installtion und hab mir zwischenzeitlich irgendwie die Python-Installtion zerschossen. Das lag aber eher an der Fehlersucher nach dem oben genannten Problem.

Gruß
Philipp

maluk

Hallo phil82,

ich vermute mal, dass du in deinen Kamera-Namen Sonderzeichen/Umlaute verwendet hast. Falls ja, bitte mal temporär Kamera umbenennen.

Die Perl-Fehler in FHEM sind dann Folgefehler, da er versucht Kameras zu aktualisieren, die nicht vorhanden sind. Das kann man natürlich fehlertoleranter programmieren und das werde ich auch nachholen.

maluk

@Vampy20: es müsste eigentlich auch ohne Passwort gehen. Vorher kamen die FHEM-Befehle nie im arlo.log, oder? Nehme dein Passwort nochmal raus und prüfe, ob dann immer noch "Broken pipe" kommt. Ich habe jetzt meine Raspberry-Installation auch wieder kaputt gemacht - cffi und sseclient deinstalliert und neu installiert, seither funktioniert es bei mir auch nicht mehr richtig.

Ich suche noch nach dem eigentlichen Fehler, der sich aber in dem Arlo-Modul befindet, das ich auch nur eingebunden habe. Es gibt bestimmte Konstellationen, wann das Modul nicht regulär startet. Das Problem scheint aber nur auf dem Raspberry aufzutreten.

choetzu

Zitat von: maluk am 09 Mai 2018, 21:22:23
@choetzu: bitte prüfe mal, ob dem FHEM-Logfiles Arlo-Fehlermeldungen findest. Falls nicht bitte mal in der Datei /usr/local/lib/python2.7/dist-packages/Arlo.py in Zeile 58 pass durch raise ersetzen. Danach stopServer und startServer ausführen und die beiden Logfiles prüfen (/tmp/arlo.log und FHEM-Log). Eigentlich müsste es dann eine Fehlermeldung geben, weil es ja offensichtlich Probleme beim Aufbau des EventStream gibt.

Ich hätte nicht gedacht, dass Python solche Probleme verursacht :(

Hallo, meine Fehlermeldungen sind aush dem FHEM-Logfile. Es sind tausende. Ich habe dann Schluss wieder deinstalliert. Folgende Meldung kam auch noch ganz am Schluss.

Exception AttributeError127.0.0.1 - - [09/May/2018 08:13:41] "GET /SHUTDOWN HTTP/1.0" 200 -
: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75ed6810>> ignored
Exception AttributeError: "'EventStream' object has no attribute 'event_stream_thread'" in <bound method EventStream.__del__ of <Arlo.EventStream object at 0x75ed6250>> ignored



Ich habe pass durch raise ersetzt und danach im /tmp/arlo.log geschaut. Gleiche Situation:

2018-05-09 23:17:29,821 INFO: Start event handler
2018-05-09 23:17:29,822 WARNING: __init__() got an unexpected keyword argument 'session'
2018-05-09 23:17:29,824 INFO: Started arlo http server on port 8001
2018-05-09 23:17:29,824 WARNING: __init__() got an unexpected keyword argument 'session'
2018-05-09 23:17:29,826 WARNING: __init__() got an unexpected keyword argument 'session'
2018-05-09 23:17:29,827 WARNING: __init__() got an unexpected keyword argument 'session'
2018-05-09 23:17:29,829 WARNING: __init__() got an unexpected keyword argument 'session'
2018-05-09 23:17:29,830 WARNING: __init__() got an unexpected keyword argument 'session'
.....usw
Raspi3, EnOcean, Zwave, Homematic

choetzu

da ich nicht wusste wie genau ich stopServer/startServer mache (FHEM? Phyton?) hab ich einfach einen Restart vom Raspi gemacht.

Raspi3, EnOcean, Zwave, Homematic

phil82

#28
Zitat von: maluk am 09 Mai 2018, 22:47:18
Hallo phil82,

ich vermute mal, dass du in deinen Kamera-Namen Sonderzeichen/Umlaute verwendet hast. Falls ja, bitte mal temporär Kamera umbenennen.

Die Perl-Fehler in FHEM sind dann Folgefehler, da er versucht Kameras zu aktualisieren, die nicht vorhanden sind. Das kann man natürlich fehlertoleranter programmieren und das werde ich auch nachholen.

@maluk:
Ja genau das war das Problem. Die eine Kamera hieß "Haustür". Jetzt "Haustuer".
Bei mir läuft das Modul dann erstmal soweit. Snapshot und Aufnahmen haben erstmal funktioniert. Weitere Tests laufen.

@choetzu:
Das Problem mit dem "EventStream" liegt vermutlich an irgendeinem "sseclient"-Pythonmodul. Wenn bei mit "sseclient-py" installiert ist, dann bekomme ich genau diese Fehlermeldungen von dir. Gleiches Problem hatte auch Vampy20.
Schau mal mit
sudo pip list
nach, welche Python-Modele installiert sind.
Bei mit ist es:
  arlo (1.1.3)
  certifi (2018.4.16)
  cffi (1.11.5)
  chardet (3.0.4)
  cryptography (1.7.1)
  enum34 (1.1.6)
  fhem (0.5.1)
  idna (2.6)
  ipaddress (1.0.17)
  keyring (10.1)
  keyrings.alt (1.3)
  monotonic (1.5)
  pip (9.0.1)
  ply (3.9)
  pyasn1 (0.1.9)
  pycparser (2.18)
  pycrypto (2.6.1)
  pygobject (3.22.0)
  pyOpenSSL (16.2.0)
  PySocks (1.6.8)
  pyxdg (0.25)
  requests (2.18.4)
  SecretStorage (2.3.1)
  setuptools (33.1.1)
  six (1.11.0)
  sseclient (0.0.19)
  urllib3 (1.22)
  wheel (0.29.0)
Die in Fett sind vermutlich die relevanten.
Siehe auch https://github.com/jeffreydwalter/arlo unter Note2

phil82

Hallo zusammen,

ich hab jetzt etwas weiter geteset und den Debug-Modus eingeschaltet.

Aktuell habe ich folgendes Problem:
Wenn kein Telnet-Passwort vergeben wird, dann funktioniert die Verbindung zu Fhem nicht richtig.
Das liegt meiner Meinung daran, dass fhemPassword = None (Zeile 320) gesetzt wird und der Verbindungsaufbau in "fhemConnection(self)" mit None erfolgt. Damit scheint das Fhem-Modul nicht zurecht zu kommen und hängt sich auf.
Das hat zur Folge, dass die Camera-Reading nicht gesetzt werden, keine Bewegungserkennung erfolgt und ein "updateReading" nicht "ankommt". Ich glaub sogar, dass dieser Arlo-Event-Stream nicht mehr verarbeitet wird, da nur ein Event im Log-File steht.
Ich hab bei mir einfach fhemPassword = "" gesetzt, dann funktioniert der Aufbau.