[ NUKI Smartlock ] 73_NUKIBridge.pm und 74_NUKDevice.pm

Begonnen von CoolTux, 18 Juli 2016, 23:50:11

Vorheriges Thema - Nächstes Thema

markukug

Danke. habe den Link gefunden und als Favorit abgespeichert.

Hier das Ergebnis:
set autocreate

2016.11.05 11:46:24 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/list?token=123456
2016.11.05 11:46:24 4: NUKIBridge (nuki01) - Call NUKIBridge_Get
2016.11.05 11:46:27 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/info?token=123456
2016.11.05 11:46:27 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 398.
2016.11.05 11:46:27 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 11:46:27 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 399.
2016.11.05 11:46:27 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 11:46:27 3: NUKIBridge (nuki01) - Error: http://192.168.178.xxx:8080/info?token=123456: empty answer received
2016.11.05 11:46:27 3: NUKIBridge (nuki01) - JSON:
2016.11.05 11:46:27 4: NUKIBridge (nuki01) - error while requesting: http://192.168.178.xxx:8080/info?token=123456: empty answer received
2016.11.05 11:46:34 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 11:46:34 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 11:46:34 3: NUKIBridge (nuki01) - Error: read from http://192.168.178.xxx:8080 timed out
2016.11.05 11:46:34 3: NUKIBridge (nuki01) - JSON:
2016.11.05 11:46:34 4: NUKIBridge (nuki01) - error while requesting: read from http://192.168.178.xxx:8080 timed out


set clearlog - Log wird nicht gelöscht
2016.11.05 11:49:24 3: NUKIDevice (nuki01) - empty answer received for http://192.168.178.xxx:8080/clearlog?token=123456

set fwupdate
2016.11.05 11:51:44 3: NUKIDevice (nuki01) - empty answer received for http://192.168.178.xxx:8080/fwupdate?token=123456

fwupdate aus Nuki-Bridge Logfile
{"timestamp": "2016-11-05T10:51:45+00:00", "type": "HTTP-FwUpdate"},

set reboot
2016.11.05 11:54:49 3: NUKIDevice (nuki01) - empty answer received for http://192.168.178.xxx:8080/reboot?token=123456

Reset aus Nuki-Bridge Logfile
{"timestamp": null, "type": "System-Startup", "version": "1.3.6"},
{"timestamp": "2016-11-05T10:54:52+00:00", "type": "System-Reset"},


set statusrequest
2016.11.05 11:56:40 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/info?token=123456
2016.11.05 11:56:40 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 11:56:40 3: NUKIBridge (nuki01) - Param Code: 200
2016.11.05 11:56:40 3: NUKIBridge (nuki01) - Error:
2016.11.05 11:56:40 3: NUKIBridge (nuki01) - JSON: {"bridgeType": 1, "ids": {"hardwareId": 12345678, "serverId": 123456789}, "versions": {"firmwareVersion": "1.3.6", "wifiFirmwareVersion": "1.0.1"}, "uptime": 106, "currentTime": "2016-11-05T10:56:40+00:00", "serverConnected": true, "scanResults": [{"nukiId": 123456789, "name": "Nuki_12345678", "rssi": -78, "paired": true}]}


HTTP-Info aus Nuki-Bridge Logfile
{"timestamp": "2016-11-05T10:56:40+00:00", "type": "HTTP-Info"},

get logfile
2016.11.05 11:59:06 3: NUKIDevice (nuki01) - empty answer received for http://192.168.178.xxx:8080/log?token=123456
2016.11.05 11:59:06 3: NUKIBridge (nuki01) - Kurz vor der Bedingung nach decode_json ARRAY


FHEM - TYPE NUKIBridge
Internals:
   DEF        192.168.178.xxx 123456
   HOST       192.168.178.xxx
   INTERVAL   60
   NAME       nuki01
   NR         489
   PORT       8080
   STATE      Initialized
   TOKEN      123456
   TYPE       NUKIBridge
   VERSION    0.3.9
   Readings:
     2016-11-05 11:56:40   bridgeType      Hardware
     2016-11-05 11:56:40   currentTime     2016-11-05T10:56:40+00:00
     2016-11-05 11:56:40   hardwareId      98598929
     2016-11-05 11:46:34   lastError       read from http://192.168.178.xxx:8080 timed out
     2016-11-05 11:56:40   serverConnected true
     2016-11-05 11:56:40   serverId        287592143
     2016-11-05 11:40:28   state           Initialized
     2016-11-05 11:56:40   uptime          106
Attributes:
   room       NUKI
   verbose    5

CoolTux

So langsam weiß ich auch nicht weiter. Es scheint egal zu sein ob ich Blocking oder nonBlocking die Bridge anspreche. Empty Answer kommt so gut wie immer.
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

markukug

Das verstehe ich. Ist frustrierend!

Was mir noch auffällt ist, dass z.B. nach Eingabe des Links im Browser oft erstmals eine Fehlermeldung "Seite funktioniert nicht" kommt und sich die Seite erst dann aufbaut.

Z.B. http://192.168.178.xxx:8080/log?token=123456

Hier noch einieg zusätzliche Infos aus Chrome DevTools:
Console:

Resource interpreted as Document but transferred with MIME type application/json: "http://192.168.178.xxx:8080/log?token=123456".
Navigated to http://192.168.178.233:8080/log?token=ge5b7e
favicon.ico:1 GET http://192.168.178.233:8080/favicon.ico 400 (Bad Request)


Network:

common.js 5ms
app.js 9ms



CoolTux

Interessant. Laut Doku bedeutet 400 das die Aktion nicht bekannt ist. Also in dem Fall /log

Aber konzentrieren wir uns mal auf autocreate. Hier hat es ja schon mal funktioniert mit einer Bridge. Kannst du das noch mal machen und den FHEMlog hier rein tun.
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

markukug

#274
Hier das Ergebnis von autocreate mit verbose 5:


2016.11.05 13:45:55 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/list?token=132456
2016.11.05 13:45:55 4: NUKIBridge (nuki01) - Call NUKIBridge_Get
2016.11.05 13:45:58 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/info?token=132456
2016.11.05 13:45:59 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 13:45:59 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 13:45:59 3: NUKIBridge (nuki01) - Error: http://192.168.178.xxx:8080/info?token=132456: empty answer received
2016.11.05 13:45:59 3: NUKIBridge (nuki01) - JSON:
2016.11.05 13:45:59 4: NUKIBridge (nuki01) - error while requesting: http://192.168.178.xxx:8080/info?token=ge5b7e: empty answer received
2016.11.05 13:46:06 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 13:46:06 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 13:46:06 3: NUKIBridge (nuki01) - Error: read from http://192.168.178.xxx:8080 timed out
2016.11.05 13:46:06 3: NUKIBridge (nuki01) - JSON:
2016.11.05 13:46:06 4: NUKIBridge (nuki01) - error while requesting: read from http://192.168.178.xxx:8080 timed out


CoolTux

Ich habe noch mal ein Update im Devel gemacht. Bitte beide Module installieren.
Es wird sich nichts ändern, ich versuche erstmal alles ausser das list zu elemenieren uim einen sauberen Start zu bekomme und darauf dann auf zu bauen.

Danke für Deine Geduld und Zeit
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

markukug

Habs installiert!

Soll ich noch etwas Spezielles testen?


CoolTux

Nur ein autocreate mit Verbose 5 und hier die Ausgabe einstellen
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

markukug

2016.11.05 15:22:14 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/list?token=123456
2016.11.05 15:22:14 4: NUKIBridge (nuki01) - Call NUKIBridge_Get
2016.11.05 15:22:24 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 398.
2016.11.05 15:22:24 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 15:22:24 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 399.
2016.11.05 15:22:24 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 15:22:24 3: NUKIBridge (nuki01) - Error: read from http://192.168.178.xxx:8080 timed out
2016.11.05 15:22:24 3: NUKIBridge (nuki01) - JSON:
2016.11.05 15:22:24 4: NUKIBridge (nuki01) - error while requesting: read from http://192.168.178.xxx:8080 timed out


Just for Info - Bei einem httpmod wird das "buf"-Feld so ausgelesen:
define nukiTest HTTPMOD http://192.168.178.xxx:8080/list?token=123456 10

HTTP/1.1 200 OK Connection: Close Content-Type: application/json;charset=utf-8 Transfer-Encoding: chunked 1 [ A6 {"nukiId": 123456789, "name": "Tstr23 ", "lastKnownState": {"state": 3, "stateName": "unlocked", "batteryCritical": false, "timestamp": "2016-11-05T11:55:14+00:00"}}] 0

CoolTux

Danke das war eine super Idee. Ich versuche da heute Abend mal die Daten mit ein zu bauen.
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

Ok ich habe da eine allerletzte Idee wie das ganze passiert sein kann. Wäre zwar doof aber egal. Lieber erstmal testen ob es das war. Dauert aber . Melde mich heute Abend noch mal.
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

markukug


Steeeve

Zitat von: CoolTux am 05 November 2016, 15:46:54
Ok ich habe da eine allerletzte Idee wie das ganze passiert sein kann. Wäre zwar doof aber egal. Lieber erstmal testen ob es das war. Dauert aber . Melde mich heute Abend noch mal.
Klingt irgendwie spannend. Gibts da dann auch ne Auflösung :D

CoolTux

So ich habe nun noch mal eine Version online gestellt. Es reicht das Bridgemodul zu installieren.
Bitte testen. Vielen Dank
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

markukug

das Ergebnis bleibt bei "empty answer received"

2016.11.05 20:58:14 4: NUKIBridge (nuki01) - Send HTTP POST with URL http://192.168.178.xxx:8080/list?token=123456
2016.11.05 20:58:14 4: NUKIBridge (nuki01) - Call NUKIBridge_Get
2016.11.05 20:58:14 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 396.
2016.11.05 20:58:14 3: NUKIBridge (nuki01) - Param Alive:
2016.11.05 20:58:14 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 397.
2016.11.05 20:58:14 3: NUKIBridge (nuki01) - Param Code:
2016.11.05 20:58:14 3: NUKIBridge (nuki01) - Error: http://192.168.178.xxx:8080/list?token=123456: empty answer received
2016.11.05 20:58:14 3: NUKIBridge (nuki01) - PATH: /list?token=123456
2016.11.05 20:58:14 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/73_NUKIBridge.pm line 400.
2016.11.05 20:58:14 3: NUKIBridge (nuki01) - httpheader:
2016.11.05 20:58:14 4: NUKIBridge (nuki01) - error while requesting: http://192.168.178.xxx:8080/list?token=123456: empty answer received