ELV "Door Bird" und FHEM

Begonnen von Thorsten Pferdekaemper, 04 Oktober 2015, 09:41:51

Vorheriges Thema - Nächstes Thema

Sailor

#180
OK, ich habe mal einen Versuch gewagt.

Keine Ahnung ob das was ist oder nicht, aber wenn alles klappt tauchen im Log Einträge mit DoorBird_Read - UDP Client said auf.

Im schlimmsten Fall stürzt euer fhem ab.

Erst Reload
Dann Device neu definieren

oder gleich einen "shutdown restart"

Gruss
    Sailor
******************************
Man wird immer besser...

netbus

#181
Fhem tot


Can't call method "fileno" on an undefined value at ./FHEM/73_DoorBird.pm line 176, <$fh> line 2010.
2019.01.26 22:10:12.977 1: PERL WARNING: Prototype mismatch: sub main::from_json ($) vs ($@) at ./FHEM/73_DoorBird.pm line 46.
2019.01.26 22:10:12.979 1: PERL WARNING: Prototype mismatch: sub main::to_json ($) vs ($@) at ./FHEM/73_DoorBird.pm line 46.
2019.01.26 22:10:12.981 1: PERL WARNING: Prototype mismatch: sub main::decode_json: none vs ($) at ./FHEM/73_DoorBird.pm line 46.
2019.01.26 22:10:12.990 1: PERL WARNING: Subroutine DoorBird_Initialize redefined at ./FHEM/73_DoorBird.pm line 63.
2019.01.26 22:10:12.996 1: PERL WARNING: Subroutine DoorBird_Define redefined at ./FHEM/73_DoorBird.pm line 92.
2019.01.26 22:10:12.999 1: PERL WARNING: Subroutine DoorBird_Undefine redefined at ./FHEM/73_DoorBird.pm line 218.
2019.01.26 22:10:13.003 1: PERL WARNING: Subroutine DoorBird_Attr redefined at ./FHEM/73_DoorBird.pm line 239.
2019.01.26 22:10:13.007 1: PERL WARNING: Subroutine DoorBird_Get redefined at ./FHEM/73_DoorBird.pm line 369.
2019.01.26 22:10:13.010 1: PERL WARNING: Subroutine DoorBird_Set redefined at ./FHEM/73_DoorBird.pm line 465.
2019.01.26 22:10:13.019 1: PERL WARNING: Subroutine DoorBird_FW_detailFn redefined at ./FHEM/73_DoorBird.pm line 673.
2019.01.26 22:10:13.026 1: PERL WARNING: Subroutine DoorBird_Info_Request redefined at ./FHEM/73_DoorBird.pm line 861.
2019.01.26 22:10:13.029 1: PERL WARNING: Subroutine DoorBird_Live_Video redefined at ./FHEM/73_DoorBird.pm line 965.
2019.01.26 22:10:13.032 1: PERL WARNING: Subroutine DoorBird_Live_Audio redefined at ./FHEM/73_DoorBird.pm line 1011.
2019.01.26 22:10:13.035 1: PERL WARNING: Subroutine DoorBird_Image_Request redefined at ./FHEM/73_DoorBird.pm line 1056.
2019.01.26 22:10:13.039 1: PERL WARNING: Subroutine DoorBird_Open_Door redefined at ./FHEM/73_DoorBird.pm line 1114.
2019.01.26 22:10:13.043 1: PERL WARNING: Subroutine DoorBird_Light_On redefined at ./FHEM/73_DoorBird.pm line 1180.
2019.01.26 22:10:13.048 1: PERL WARNING: Subroutine DoorBird_Transmit_Audio redefined at ./FHEM/73_DoorBird.pm line 1245.
2019.01.26 22:10:13.053 1: PERL WARNING: Subroutine DoorBird_History_Request redefined at ./FHEM/73_DoorBird.pm line 1383.
2019.01.26 22:10:13.059 1: PERL WARNING: Subroutine DoorBird_History_Request_Parse redefined at ./FHEM/73_DoorBird.pm line 1476.
2019.01.26 22:10:13.064 1: PERL WARNING: Subroutine DoorBird_List_Favorites redefined at ./FHEM/73_DoorBird.pm line 1604.
2019.01.26 22:10:13.068 1: PERL WARNING: Subroutine DoorBird_List_Schedules redefined at ./FHEM/73_DoorBird.pm line 1685.
2019.01.26 22:10:13.071 1: PERL WARNING: Subroutine DoorBird_Restart redefined at ./FHEM/73_DoorBird.pm line 1787.
2019.01.26 22:10:13.073 1: PERL WARNING: Subroutine DoorBird_credential_encrypt redefined at ./FHEM/73_DoorBird.pm line 1826.
2019.01.26 22:10:13.075 1: PERL WARNING: Subroutine DoorBird_credential_decrypt redefined at ./FHEM/73_DoorBird.pm line 1844.
2019.01.26 22:10:13.077 1: PERL WARNING: Subroutine DoorBird_BlockGet redefined at ./FHEM/73_DoorBird.pm line 1864.
2019.01.26 22:10:13.080 1: PERL WARNING: Subroutine DoorBird_Ping redefined at ./FHEM/73_DoorBird.pm line 1903.
2019.01.26 22:10:13.082 1: PERL WARNING: Subroutine DoorBird_Pong redefined at ./FHEM/73_DoorBird.pm line 1951.
2019.01.26 22:10:44.672 3: myDoorBird : DoorBird - Credentials have been encrypted for further use.

steffen83

Im übrigen habe ich immer noch die Fehlermeldung, dass ich scheinbar wegen meinem https nicht das Modul nutzen kann :-(
Raspberry Pi 3 (Noobs, aktuelle Fhem und Pilight) | FHEMduino | HM-OCCU-SDK | HM-Sec-SCo | HM-Sec-SD-2 | HM-CC-RT-DN | HM-LC-Bl1PBU-FM

Sailor

Hallo Steffen

Zitat von: steffen83 am 28 Januar 2019, 09:21:18
Im übrigen habe ich immer noch die Fehlermeldung, dass ich scheinbar wegen meinem https nicht das Modul nutzen kann :-(

Poste das nochmal... Ich benutze auch https mit Zertifikaten und habe diese Fehlermeldung nicht.

Gruss
    Sailor
******************************
Man wird immer besser...

steffen83

Hallo,

es geht um folgende Fehler
2019.01.28 14:02:04 3: myDoorBird : DoorBird - Credentials have been encrypted for further use.
2019.01.28 14:02:06 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/73_DoorBird.pm line 380.
2019.01.28 14:02:09 1: PERL WARNING: Use of uninitialized value in join or string at ./FHEM/73_DoorBird.pm line 1336.
2019.01.28 14:02:27 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 667.
2019.01.28 14:02:27 1: PERL WARNING: Use of uninitialized value in string ne at ./FHEM/73_DoorBird.pm line 685.
2019.01.28 14:02:27 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 706.
2019.01.28 14:02:27 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 666.
2019.01.28 14:02:27 1: PERL WARNING: Use of uninitialized value in string ne at ./FHEM/73_DoorBird.pm line 671.
2019.01.28 14:03:20 1: PERL WARNING: Use of uninitialized value $FW_wname in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 947.
2019.01.28 14:03:20 1: PERL WARNING: Use of uninitialized value $FW_wname in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 862.


Gruß
Steffen
Raspberry Pi 3 (Noobs, aktuelle Fhem und Pilight) | FHEMduino | HM-OCCU-SDK | HM-Sec-SCo | HM-Sec-SD-2 | HM-CC-RT-DN | HM-LC-Bl1PBU-FM

Sailor

Hallo Steffen

Zitat von: steffen83 am 28 Januar 2019, 14:05:43
es geht um folgende Fehler

Da steht absolut nix drin, dass auf einen Fehler mit https schließen lässt.

Die Warnings kannste ignorieren.
Diese sind noch da, weil ich diese noch nicht abgefangen habe.
Das sind Feinarbeiten, die ich "Poe á poe" erledigen muss.

Und der erste Eintrag betrifft nur dein DoorBird User und DoorBird Password

Gruss
    Sailor


******************************
Man wird immer besser...

steffen83

Okay, dann warte ich noch etwas die Entwicklung ab :-)
Raspberry Pi 3 (Noobs, aktuelle Fhem und Pilight) | FHEMduino | HM-OCCU-SDK | HM-Sec-SCo | HM-Sec-SD-2 | HM-CC-RT-DN | HM-LC-Bl1PBU-FM

CoolTux

Zitat von: Sailor am 26 Januar 2019, 21:13:48
OK, ich habe mal einen Versuch gewagt.

Keine Ahnung ob das was ist oder nicht, aber wenn alles klappt tauchen im Log Einträge mit DoorBird_Read - UDP Client said auf.

Im schlimmsten Fall stürzt euer fhem ab.

Erst Reload
Dann Device neu definieren

oder gleich einen "shutdown restart"

Gruss
    Sailor

Du fängst ein nicht funktionieren des erstellens der Socketverbindung leider immer noch nicht ab. Daher bricht FHEM zusammen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Sailor

Hi CoolTux

Zitat von: CoolTux am 29 Januar 2019, 08:08:50
Du fängst ein nicht funktionieren des erstellens der Socketverbindung leider immer noch nicht ab. Daher bricht FHEM zusammen.

Nennst Du auch einen DoorBird dein Eigen?

Und ja ich weiß, die letzte Version habe ich noch nicht fixen können.
Verpflichtung im Schulelternrat etc...

Ich versuche es heute im Laufe des Abends deinen Code einzuarbeiten...

Gruss
    Sailor
******************************
Man wird immer besser...

CoolTux

Nein leider nicht.

Und was ich Dir geschrieben habe ist halt nur das was ich gesehen haben. Kann passen muss aber nicht. Was das nun genau bedeutet kann ich nicht genau sagen, ob das wirklich Multicast  oder Broadcast Nachrichten sind. Keine Ahnung.
Aber ich würde einfach mal versuchen eine normale Clientsocketverbindung auf zu machen. Und vorallem egal welche Verbindung Du versuchst, wenn es nicht klappt solltest Du mit Fehlermeldung abbrechen lassen, so das nicht versucht wird ein nicht existierendes Objekt als Referenz weiter zu reichen.


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

netbus

Sailor,
ich finde das DoorBird Modul, dass du bis jetzt geschaffen hast als völlig ausreichend.
Was willst du denn noch einbauen?

steffen83

Hätte da schon noch was :-)

Bearbeitung der Events.
Was passiert bei motion, doorbell oder Relais.
Und dass man dies dann noch de/aktivieren könnte.
Raspberry Pi 3 (Noobs, aktuelle Fhem und Pilight) | FHEMduino | HM-OCCU-SDK | HM-Sec-SCo | HM-Sec-SD-2 | HM-CC-RT-DN | HM-LC-Bl1PBU-FM

CoolTux

Habe mal kurz gegoogelt

Zitat
The mobile devices (e.g. smartphone, tablet, smart-home panel) listen for UDP
Broadcast messages within the LAN from the door station. If a valid UDP Broadcast
message (valid: fits to the call-button number) is received from the door station by the
mobile devices, then the mobile devices play a "ding-dong" notification sound and
offer the End-user the possibility to take the call upon user-interaction by e.g.
pressing a button on the mobile devices.

Scheinen also Broadcastmessages zu sein die da über UDP gehen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

https://www.doorbird.com/downloads/api_lan.pdf?rev=0.24

Hier findest auch Informationen zum Aufbau eines Datagrammes und so.
EVENT MONITORING (UDP BROADCASTS)

Ich denke es geht Sailor um das abfangen der Echtzeitevents. Was in meinen Augen Sinn macht. Dann spart man sich etwaiges pollen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

#194
So Thema Broadcast habe ich das hier im Netz gefunden. Hoffe ich bin nicht ganz auf dem Holzweg


$sock = IO::Socket::INET->new(
                          PeerPort  => 6524,
                          PeerAddr  => inet_ntoa(INADDR_BROADCAST),
                          Proto     => udp,   
                          LocalAddr => 'localhost',
                          Broadcast => 1 )
                      or die "Can't bind : $@\n";



$socket = new IO::Socket::INET (
                PeerAddr  => '255.255.255.255',
        PeerPort  =>  '6524',
        Proto     => 'udp',
        Broadcast => 1
  ) or die "ERROR in Socket Creation : $!\n";

Das sollte auch gehen und ist etwas schlichter
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net