ELV "Door Bird" und FHEM

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

Vorheriges Thema - Nächstes Thema

Frank_Huber

Bekomme weiterhin:
DoorBird : DoorBird_Get - This option is not implemented yet. Choose RAW or JSON

Log:
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Initialize redefined at ./FHEM/73_DoorBird.pm line 60.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Define redefined at ./FHEM/73_DoorBird.pm line 84.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Undefine redefined at ./FHEM/73_DoorBird.pm line 178.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Attr redefined at ./FHEM/73_DoorBird.pm line 195.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Get redefined at ./FHEM/73_DoorBird.pm line 256.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_Set redefined at ./FHEM/73_DoorBird.pm line 358.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine credential_encrypt redefined at ./FHEM/73_DoorBird.pm line 390.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine credential_decrypt redefined at ./FHEM/73_DoorBird.pm line 408.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_NonBlockGet redefined at ./FHEM/73_DoorBird.pm line 429.
2019.01.14 09:46:04 1: PERL WARNING: Subroutine DoorBird_BlockGet redefined at ./FHEM/73_DoorBird.pm line 471.
2019.01.14 09:46:09 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 09:46:09 5: DoorBird : DoorBird_Get - command                            : ?
2019.01.14 09:46:09 1: PERL WARNING: Use of uninitialized value $option in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 272.
2019.01.14 09:46:09 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 09:46:09 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/73_DoorBird.pm line 278.
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - command                            : Info_Request
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - usage                              : Unknown argument $service, choose one of Info_Request:noArg
2019.01.14 09:46:15 5: DoorBird : DoorBird_BlockingGet - CommandURL                 : http://192.168.999.999/bha-api/info.cgi?httpuser=xxxxx&http-password=yyyyy
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 09:46:15 5: DoorBird : DoorBird_Get - Info_Request - data                : <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>401 - Unauthorized</title>
</head>
<body>
  <h1>401 - Unauthorized</h1>
</body>
</html>

2019.01.14 09:46:15 1: PERL WARNING: Use of uninitialized value $option in pattern match (m//) at ./FHEM/73_DoorBird.pm line 310.
2019.01.14 09:46:15 1: PERL WARNING: Use of uninitialized value $option in pattern match (m//) at ./FHEM/73_DoorBird.pm line 314.

netbus

#106
@Sailor:
Du musst
"?httpuser=". $username auf
"?http-user=". $username ändern.
Dann sieht der Output so aus:

2019.01.14 10:27:44.499 5: myDoorBird : DoorBird_Get - name                               : myDoorBird
2019.01.14 10:27:44.500 5: myDoorBird : DoorBird_Get - command                            : Info_Request
2019.01.14 10:27:44.500 5: myDoorBird : DoorBird_Get - option                             : RAW
2019.01.14 10:27:44.501 5: myDoorBird : DoorBird_Get - usage                              : Unknown argument $service, choose one of Info_Request:,RAW,JSON
2019.01.14 10:27:44.504 5: myDoorBird : DoorBird_BlockingGet - CommandURL                 : http://192.168.1.28/bha-api/info.cgi?http-user=xxxx&http-password=xxxx
2019.01.14 10:27:44.525 5: myDoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 10:27:44.525 5: myDoorBird : DoorBird_Get - Info_Request - data                : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000116","BUILD_NUMBER": "15450338","WIFI_MAC_ADDR": "1CCAE312345","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D102"}]}}
2019.01.14 10:27:51.519 5: myDoorBird : DoorBird_Get - name                               : myDoorBird
2019.01.14 10:27:51.520 5: myDoorBird : DoorBird_Get - command                            : Info_Request
2019.01.14 10:27:51.520 5: myDoorBird : DoorBird_Get - option                             : JSON
2019.01.14 10:27:51.520 5: myDoorBird : DoorBird_Get - usage                              : Unknown argument $service, choose one of Info_Request:,RAW,JSON
2019.01.14 10:27:51.523 5: myDoorBird : DoorBird_BlockingGet - CommandURL                 : http://192.168.1.28/bha-api/info.cgi?http-user=xxxxx&http-password=xxxxx
2019.01.14 10:27:51.548 5: myDoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 10:27:51.549 5: myDoorBird : DoorBird_Get - Info_Request - data                : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000116","BUILD_NUMBER": "15450338","WIFI_MAC_ADDR": "1CCAE312345","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D102"}]}}

steffen83

nur mal so am Rande, mein DB ist gerade abgeschmiert und ich bin auf der Arbeit :-(
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

Frank_Huber

Zitat von: netbus am 14 Januar 2019, 10:29:12
@Sailor:
Du musst
"?httpuser=". $username auf
"?http-user=". $username ändern.

*lach* den Fehler hab ich auch gemacht beim anlegen der IP-Cam.
Den Bindestrich liest man im pdf gerne als Zeilentrenner...

Mein Output jetzt:
2019.01.14 10:53:06 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 10:53:06 5: DoorBird : DoorBird_Get - command                            : ?
2019.01.14 10:53:06 1: PERL WARNING: Use of uninitialized value $option in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 272.
2019.01.14 10:53:06 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 10:53:06 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/73_DoorBird.pm line 278.
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - command                            : Info_Request
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - usage                              : Unknown argument $service, choose one of Info_Request:noArg
2019.01.14 10:53:08 5: DoorBird : DoorBird_BlockingGet - CommandURL                 : http://192.168.999.999/bha-api/info.cgi?http-user=xxxxxxxx&http-password=zzzzzzz
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 10:53:08 5: DoorBird : DoorBird_Get - Info_Request - data                : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000116","BUILD_NUMBER": "15450338","WIFI_MAC_ADDR": "112233445566F","RELAYS":["1","2"],"DEVICE-TYPE": "DoorBird D2101V"}]}}
2019.01.14 10:53:08 1: PERL WARNING: Use of uninitialized value $option in pattern match (m//) at ./FHEM/73_DoorBird.pm line 310.
2019.01.14 10:53:08 1: PERL WARNING: Use of uninitialized value $option in pattern match (m//) at ./FHEM/73_DoorBird.pm line 314.

Sailor

Hi netbus

Zitat von: netbus am 14 Januar 2019, 10:29:12
Du musst
"?httpuser=". $username auf
"?http-user=". $username ändern.
Danke, geändert

Zitat von: netbus am 14 Januar 2019, 10:29:12

2019.01.14 10:27:51.548 5: myDoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 10:27:51.549 5: myDoorBird : DoorBird_Get - Info_Request - data                : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000116","BUILD_NUMBER": "15450338","WIFI_MAC_ADDR": "1CCAE312345","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D102"}]}}


Darauf habe ich gehofft!
Können die anderen das mit netbus Version bestätigen?

Mit dem Ergebnis muss ich jetzt erstmal tüfteln die hashes auseinander zu dividieren...

Gruß
    Sailor
******************************
Man wird immer besser...

steffen83

Ich kann ebenfalls folgendes Bestätigen:

JSON:
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - name : myDoorBird
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - command : Info_Request
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - option : JSON
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - usage : Unknown argument $service, choose one of Info_Request:,RAW,JSON
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_BlockingGet - CommandURL : http://192.168.0.6/bha-api/info.cgi?http-user=xxx&http-password=xxx
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - Info_Request - err :
2019.01.14 13:10:38 5 : myDoorBird : DoorBird_Get - Info_Request - data : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000115","BUILD_NUMBER": "15421161","WIFI_MAC_ADDR": "xxxx","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D101S"}]}}

RAW:
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - name : myDoorBird
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - command : Info_Request
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - option : RAW
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - usage : Unknown argument $service, choose one of Info_Request:,RAW,JSON
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_BlockingGet - CommandURL : http://192.168.0.6/bha-api/info.cgi?http-user=xxx&http-password=xxx
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - Info_Request - err :
2019.01.14 13:11:50 5 : myDoorBird : DoorBird_Get - Info_Request - data : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000115","BUILD_NUMBER": "15421161","WIFI_MAC_ADDR": "xxx","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D101S"}]}}
2019-01-14 13:11:53 ESPEasy ESP_Schuppen Count: 0.00
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

#111
So nächste Runde

Bitte mal auf verbose 5 den get Befehl ohne Optionen aufrufen.

Ich hoffe es tauchen dann die ersten Readings auf.  ;D

Vorsicht! Fehler werden nur begrenzt abgefangen. Daher bitte nur mit ssh-Zugang zu dem fhem-Server ausprobieren, um fhem ggf. neu starten zu können.

@Frank_Huber: Magst Du deine 73_DoorBird.pm - Version aus deinem Beitrag löschen?

Langsam kommt Fahrt auf...

Gruß
    Sailor

PS: Das Log-File nicht vergessen zu posten...  ;)
******************************
Man wird immer besser...

Frank_Huber

Zitat von: Sailor am 14 Januar 2019, 14:39:44
@Frank_Huber: Magst Du deine 73_DoorBird.pm - Version aus deinem Beitrag löschen?

Pssssst, das war nicht ich. :-)

Frank_Huber

#113
Ein Popup kommt nach dem get:
ZitatReadings have been updated!
Press F5 to refresh Browser.

dannach List:

Internals:
   DEF        192.168.999.999 crypt:9999 crypt:9999
   NAME       DoorBird
   NR         92
   RevisonAPI 0.24
   STATE      define
   TYPE       DoorBird
   READINGS:
     2019-01-14 14:44:25   BUILD_NUMBER    15450338
     2019-01-14 14:44:25   DEVICE-TYPE     DoorBird D2101V
     2019-01-14 14:44:25   FIRMWARE        000116
     2019-01-14 14:44:25   Relay_1         1
     2019-01-14 14:44:25   Relay_2         2
     2019-01-14 14:44:25   WIFI_MAC_ADDR   112233445566
   helper:
     PollingTimeout 5
     RelayAdresses 2
     URL        192.168.999.999
Attributes:
   room       TEST
   verbose    5


Log:
019.01.14 14:44:22 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 14:44:22 5: DoorBird : DoorBird_Get - command                            : ?
2019.01.14 14:44:22 1: PERL WARNING: Use of uninitialized value $option in concatenation (.) or string at ./FHEM/73_DoorBird.pm line 279.
2019.01.14 14:44:22 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 14:44:22 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at ./FHEM/73_DoorBird.pm line 285.
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - command                            : Info_Request
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - option                             :
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - usage                              : Unknown argument $service, choose one of Info_Request:noArg
2019.01.14 14:44:25 5: DoorBird : DoorBird_BlockingGet - CommandURL                 : http://192.168.999.999/bha-api/info.cgi?http-user=9999&http-password=9999
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Info_Request - err                 :
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Info_Request - data                : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000116","BUILD_NUMBER": "15450338","WIFI_MAC_ADDR": "112233445566","RELAYS":["1","2"],"DEVICE-TYPE": "DoorBird D2101V"}]}}
2019.01.14 14:44:25 1: PERL WARNING: Use of uninitialized value $option in pattern match (m//) at ./FHEM/73_DoorBird.pm line 380.
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - json                               : HASH(0x3924ae0)
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Content of             DEVICE-TYPE : DoorBird D2101V
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Content of                FIRMWARE : 000116
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Content of            BUILD_NUMBER : 15450338
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Content of           WIFI_MAC_ADDR : 112233445566
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Number of connected relays         : 2
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Adress of                  Relay 1 : 1
2019.01.14 14:44:25 5: DoorBird : DoorBird_Get - Adress of                  Relay 2 : 2
2019.01.14 14:44:57 5: DoorBird : DoorBird_Get - name                               : DoorBird
2019.01.14 14:44:57 5: DoorBird : DoorBird_Get - command                            : ?
2019.01.14 14:44:57 5: DoorBird : DoorBird_Get - option                             :

Sailor

Zitat von: Frank_Huber am 14 Januar 2019, 14:42:56
Pssssst, das war nicht ich. :-)

Upsi Daisy... Das ist peinlich!  :-[

Sorry netbus!  ;)

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

Sailor

#115
Moinsen

Ich habe für die Abfrage der DoorBird eine Möglichkeit gefunden den Usernamen und Passwort nicht innerhalb des Links sondern mit den Parametern des HTTPUTILS_*Get zu übergeben.

Könnt Ihr bitte mal ausprobieren, ob diese Variante ebenfalls funktioniert oder ob Ihr eine Fehlermeldung bekommt?

Vielen Dank.

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

steffen83

Moin,

läuft :-)
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - name : myDoorBird
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - command : Info_Request
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - option : JSON
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - usage : Unknown argument $service, choose one of Info_Request:,JSON
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_BlockingGet - CommandURL : http://192.168.0.6/bha-api/info.cgi
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - Info_Request - err :
2019.01.15 07:22:46 5 : myDoorBird : DoorBird_Get - Info_Request - data : {"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000115","BUILD_NUMBER": "15421161","WIFI_MAC_ADDR": "xxx","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D101S"}]}}
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

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

Sailor

Frage:

Wenn Ihr den Link

http://192.168.xxx.xxx/bha-api/info.cgi?http-user=9999&http-password=9999

direkt in der Browser-Addresszeile eingebt, seht Ihr dann sofort das Vollbild der Kamera mit in der Addresszeile sich aufsteigenden Bildnummern am Ende?

Eine Bildschirmkopie wäre hilfreich mit der Erklärung was sich ändert bzw. wie es sich darstellt...

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

steffen83

Nein,
das Bild der Kamera siehst du nicht über die info.cgi. du musst auf die
http://ip/bha-api/image.cgi?http-user=xxx&http-password=xxx

diese wird nicht ständig aktualisiert. Du musst erneut aufrufen.
Es gibt aber noch die video.cgi. Diese erneuert sich automatisch
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