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

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

Vorheriges Thema - Nächstes Thema

CoolTux

Bitte ein list machen

list ist ein FHEM Befehl.

Ist die Webinstanz 8083 Passwort geschützt oder HTTPS
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

danillo

Sorry  ::)
Internals:
   CFGFN
   DEF        99247689 IODev=NBridge1
   IODev      NBridge1
   NAME       NUKIDevice99247689
   NR         1349
   NUKIID     99247689
   STATE      unlocked
   TYPE       NUKIDevice
   VERSION    0.6.1
   WEBHOOK_COUNTER 0
   WEBHOOK_PORT 8083
   WEBHOOK_REGISTER sent
   WEBHOOK_URI /fhem/NUKIDevice
   WEBHOOK_URL http://192.168.178.32:8083/fhem/NUKIDevice-99247689
   READINGS:
     2017-11-09 19:11:25   battery         ok
     2017-11-09 19:11:25   batteryCritical false
     2017-11-09 19:11:25   lockState       unlocked
     2017-11-09 19:19:03   name            Nuki_05EA6649
     2017-11-09 19:19:03   paired          true
     2017-11-09 19:19:03   rssi            -72
     2017-11-09 19:11:25   state           unlocked
     2017-11-09 19:11:25   success         true
   fhem:
     infix      NUKIDevice
   helper:
     fromAutocreate 1
Attributes:
   IODev      NBridge1
   alias      P2
   room       NUKI
   verbose    0
   webhookFWinstance WEB
   webhookHttpHostname 192.168.178.32


Kein Passwort, kein https

CoolTux

192.168.178.32

Und das ist die IP vom FHEM Server?
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

Also laut Deinen Reading sollte sich eigentlich das Schloß korrekt melden. Und Du bist Dir sicher das wenn Du über FHEM das schloß sperrst sich der Status locked nicht von alleine setzt sondern lock stehen bleibt?
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

danillo

Also gerade nochmal probiert:

Schloss ist unlocked
Ich sperre von Hand zu
Status bleibt auf unlocked
Ich führe den Statusrequest aus
erst passiert nichts. Dann Lade ich das Schloss neu und der Status stimmt.
Jetzt öffne ich das Schloss über FHEM
Status bleibt auf locked
Ich führe den Statusrequest aus
erst passiert nichts. Dann Lade ich das Schloss neu und der Status stimmt.



CoolTux

Also alleine schon hier

Jetzt öffne ich das Schloss über FHEM
Status bleibt auf locked

Muss sich zu mindest der Status auf unlock ändern sobald die Bridge einen normalen HTTP Request gegeben hat das der Schaltbefehl angekommen ist.


Nun brauche ich doch mal den kompletten Verkehr. Also die Bridge auf 5 stellen und dann mal bitte öffnen/schließen
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

danillo

2017.11.09 20:15:07 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:07 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:15:07 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:15:07 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:07 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:15:14Z","uptime":5521,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-81,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:15:07 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:15:07 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:15:07 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:15:07 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:15:07 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"name":"Nuki_05EA6649","paired":true,"rssi":-81}
2017.11.09 20:15:07 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:15:07 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:15:28 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:28 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:15:28 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:15:28 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:28 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:15:35Z","uptime":5542,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-78,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:15:28 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:15:28 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:15:28 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:15:28 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:15:28 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"rssi":-78,"paired":true,"name":"Nuki_05EA6649"}
2017.11.09 20:15:28 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:15:28 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:15:56 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:56 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:15:56 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:15:56 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:15:56 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:16:03Z","uptime":5570,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-78,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:15:56 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:15:56 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:15:56 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:15:56 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:15:56 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"rssi":-78,"paired":true,"name":"Nuki_05EA6649"}
2017.11.09 20:15:56 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:15:56 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:16:17 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:17 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:16:17 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:16:17 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:17 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:16:24Z","uptime":5591,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-71,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:16:17 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:16:17 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:16:17 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:16:17 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:16:17 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"paired":true,"rssi":-71,"name":"Nuki_05EA6649"}
2017.11.09 20:16:17 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:16:17 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:16:38 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:38 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:16:38 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:16:38 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:38 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:16:45Z","uptime":5612,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-68,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:16:38 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:16:38 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:16:38 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:16:38 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:16:38 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"paired":true,"rssi":-68,"name":"Nuki_05EA6649"}
2017.11.09 20:16:38 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:16:38 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:16:47 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge check Bridge connected
2017.11.09 20:16:47 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 20:16:47 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/lockState?token=rqknc6&nukiId=99247689
2017.11.09 20:16:47 5: NUKIDevice (NUKIDevice99247689) - NUKIDevice_GetUpdate Call NUKIDevice_ReadFromNUKIBridge
2017.11.09 20:16:48 5: NUKIBridge (NBridge1) - Response JSON: {"state":1,"success":true,"stateName":"locked","batteryCritical":false}
2017.11.09 20:16:48 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:16:48 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:16:48 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"state":1,"success":true,"stateName":"locked","batteryCritical":false}
2017.11.09 20:16:48 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:16:48 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:16:57 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:17:04Z","uptime":5631,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-79,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:16:57 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:16:57 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:16:57 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:16:57 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:16:57 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"paired":true,"rssi":-79,"name":"Nuki_05EA6649"}
2017.11.09 20:16:57 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:16:57 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:16:57 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge check Bridge connected
2017.11.09 20:16:57 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/lockAction?token=rqknc6&action=1&nukiId=99247689
2017.11.09 20:17:07 5: NUKIBridge (NBridge1) - Response JSON: {"success":true,"batteryCritical":false}
2017.11.09 20:17:07 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:07 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:07 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"success":true,"batteryCritical":false}
2017.11.09 20:17:07 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:17:07 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge check Bridge connected
2017.11.09 20:17:07 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 20:17:07 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/lockState?token=rqknc6&nukiId=99247689
2017.11.09 20:17:07 5: NUKIDevice (NUKIDevice99247689) - lockAction readings set for NUKIDevice99247689
2017.11.09 20:17:08 5: NUKIBridge (NBridge1) - Response JSON: {"state":3,"success":true,"stateName":"unlocked","batteryCritical":false}
2017.11.09 20:17:08 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:08 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:08 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"state":3,"success":true,"stateName":"unlocked","batteryCritical":false}
2017.11.09 20:17:08 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:17:08 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:17:18 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:18 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:17:18 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:17:18 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:18 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:17:25Z","uptime":5652,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-86,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:17:18 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:18 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:18 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:17:18 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:17:18 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"paired":true,"rssi":-86,"name":"Nuki_05EA6649"}
2017.11.09 20:17:18 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:17:18 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:17:37 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:37 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:17:37 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:17:37 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:37 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:17:44Z","uptime":5671,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-72,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:17:37 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:37 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:37 5: NUKIBridge (NBridge1) - Bridge ist online
2017.11.09 20:17:37 4: NUKIDevice (NUKIDevice99247689) - Received scanResults for matching NukiID 99247689 at device NUKIDevice99247689
2017.11.09 20:17:37 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"name":"Nuki_05EA6649","paired":true,"rssi":-72}
2017.11.09 20:17:37 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 20:17:37 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 20:17:55 4: NUKIBridge (NBridge1) - NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:55 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/info?token=rqknc6
2017.11.09 20:17:55 4: NUKIBridge (NBridge1) - run NUKIBridge_Call
2017.11.09 20:17:55 4: NUKIBridge (NBridge1) - Call InternalTimer for NUKIBridge_GetCheckBridgeAlive
2017.11.09 20:17:55 5: NUKIBridge (NBridge1) - Response JSON: {"currentTime":"2017-11-09T19:18:02Z","uptime":5689,"scanResults":[{"paired":true,"nukiId":99247689,"rssi":-73,"name":"Nuki_05EA6649"},{"paired":false,"nukiId":105423241,"rssi":-98,"name":"Nuki_0648A189"}],"versions":{"appVersion":"1.3.3"},"bridgeType":2,"ids":{"serverId":1355477230},"serverConnected":true}
2017.11.09 20:17:55 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:55 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:55 5: NUKIBridge (NBridge1) - Bridge ist online


Also beim Schließen über FHEM hat's diesmal funktioniert. Beim Schließen von Hand nicht.

Mir iust gerade aufgefallen, dass beim Schloss der Status auch nicht regelmäßig aktualisiert wird
battery

ok

2017-11-09 20:17:08
batteryCritical

false

2017-11-09 20:17:08
lockState

unlocked

2017-11-09 20:17:08
name

Nuki_05EA6649

2017-11-09 20:21:16
paired

true

2017-11-09 20:21:16
rssi

-68

2017-11-09 20:21:16
state

unlocked

2017-11-09 20:17:08
success

true

2017-11-09 20:17:08


Es werden nur name, paired und rssi aktualisiert.

CoolTux

Also im Log sieht alles schick aus


2017.11.09 20:16:57 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 20:16:57 4: NUKIBridge (NBridge1) - Send HTTP POST with URL http://192.168.178.21:8080/lockAction?token=rqknc6&action=1&nukiId=99247689

Schaltbefehl geht vom Schloßdevice zum Bridgedevice und wird dann an die Hardwarebride gesendet.


2017.11.09 20:17:07 5: NUKIBridge (NBridge1) - Response ERROR:
2017.11.09 20:17:07 5: NUKIBridge (NBridge1) - Response CODE: 200
2017.11.09 20:17:07 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"success":true,"batteryCritical":false}

Die Hardwarebridge sendet ein 200 ok zurück und ausserdem als Response noch {"success":true,"batteryCritical":false} worauf hin sich der state locked nach unlock ändern sollte.
Jetzt wäre dann ein verbose 5 vom Schloßdevice interessant ob er über den Callback auch noch was bekommt.
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

danillo

So sieht's beim Schloss aus, wenn ich es per Hand zusperre
2017.11.09 22:31:48 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge check Bridge connected
2017.11.09 22:31:48 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 22:31:48 5: NUKIDevice (NUKIDevice99247689) - NUKIDevice_GetUpdate Call NUKIDevice_ReadFromNUKIBridge
2017.11.09 22:31:50 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"state":3,"success":true,"stateName":"unlocked","batteryCritical":false}
2017.11.09 22:31:50 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:31:50 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 22:32:04 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"rssi":-73,"paired":true,"name":"Nuki_05EA6649"}
2017.11.09 22:32:04 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:32:04 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 22:32:30 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"name":"Nuki_05EA6649","paired":true,"rssi":-72}
2017.11.09 22:32:30 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:32:30 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 22:32:50 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"name":"Nuki_05EA6649","paired":true,"rssi":-73}
2017.11.09 22:32:50 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:32:50 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 22:33:09 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge check Bridge connected
2017.11.09 22:33:09 4: NUKIDevice (NUKIDevice99247689) - NUKIDevice_ReadFromNUKIBridge Bridge is connected call IOWrite
2017.11.09 22:33:09 5: NUKIDevice (NUKIDevice99247689) - NUKIDevice_GetUpdate Call NUKIDevice_ReadFromNUKIBridge
2017.11.09 22:33:11 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"state":1,"success":true,"stateName":"locked","batteryCritical":false}
2017.11.09 22:33:11 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:33:11 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689
2017.11.09 22:33:15 5: NUKIDevice (NUKIDevice99247689) - Parse with result: {"rssi":-71,"paired":true,"name":"Nuki_05EA6649"}
2017.11.09 22:33:15 5: NUKIDevice (NUKIDevice99247689) - parse status message for NUKIDevice99247689
2017.11.09 22:33:15 5: NUKIDevice (NUKIDevice99247689) - readings set for NUKIDevice99247689


CoolTux

Leider keine Info darüber das was über den Callback kam.
Du kannst nun mal ins Log der Bridge schauen ob Du da nähere Infos findest.


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

Sascha_F

Hallo zusammen!

Ich mal wieder ;)

Ich glaube, ich brauche eine Eingebung...

Vorweg - ich bekomme nach wie vor immer wieder Log-Einträge (jetzt nicht x-fach, aber mehrmals am Tag). Um es etwas übersichtlicher zu halten, habe ich die Ziffern hinter Device nachfolgend immer entfernt:

NUKIBridge (NukiBridge) - invalid json detected: HTTP 503 Unavailable
NUKIDevice (NUKIDevice) - invalid json detected: HTTP 503 Unavailable



Mein ganz anders Problem habe ich aber gerade mit Nuki (Device) in Verbindung mit einem DOIF. Der Plan sieht vor, dass die Beleuchtung im Windfang angeschaltet wird, sobald das Schloss aufgeschlossen wurde. Das DOIF sieht so aus:

([NUKIDevice:state] eq "unlocked" and [?{sunset("REAL",1800,"16:00","23:00")}-{sunrise("REAL",0,"05:45","06:00")}]) (set HM_377AFE start)

'start' => eventMap auf on-for-timer
'?' => war ein Versuch, damit bei Eintreten der 'sunset'-Bedingung nicht aufgrund dieser Bedingung ausgelöst wird

Das Problem ist, dass die Beleuchtung auch eingeschaltet wird, wenn um 22:30 h aus einem DOIF das Abschließen ausgelöst wird. Im NukiDevice habe ich es auch mit "event-on-change state" probiert, aber das hat auch nicht geholfen. Eigentlich dachte ich, dass sich der state (oder auch lockState) nur aufgrund des webhook ändern - und dieser nur ausgelöst wird, wenn auch tatsächlich etwas am NukiDevice 'passiert' ist...

Also ich dachte:

Ausgangslage
state/lockState = 'unlocked' [ändert sich auch nicht, also kein event-on-change state/lockState; DOIF sollte daher bei Erfüllen der 'sunset'-Bedingung nicht auslösen - passiert aber. Das '?' scheint nicht als "nicht auslösende Bedingung" zu funktionieren]

später (wenn 'sunset'-Bedingung bereits erfüllt)
22:30 h: Anderes DOIF cmd setzt 'set NukiDevice lock' [jetzt wechseln state/lockState auf 'locked'; event-on-change state triggert, aber DOIF-Bedingung dürfte nicht erfüllt sein, da nicht 'unlocked' - passiert aber]

Ich war mir erst nicht sicher, ob DOIF-Problem oder NUKI, aber meine anderen DOIFs laufen einwandfrei, sodass ich es mir nur mit dem webhook oder wie auch immer erklären kann...

Danke euch und viele Grüße
Sascha

danillo

Ich hab immnoch das Problem, dass nur drei Readings aktualisiert werden
READINGS:
     2017-11-17 16:17:34   battery         ok
     2017-11-17 16:17:34   batteryCritical false
     2017-11-17 16:17:34   lockState       unlocked
     2017-11-17 16:17:45   name            Nuki_05EA6649
     2017-11-17 16:17:45   paired          true
     2017-11-17 16:17:45   rssi            -74
     2017-11-17 16:17:34   state           unlocked
     2017-11-17 16:17:34   success         true

die anderen Readings werden nur aktualisiert, wenn ich das Schloss über FHEM bediene oder von Hand den Status abfrage.
Wo kann man denn einstellen, welche Readings aktualisiert werden soll?

CoolTux

Es werden auch nur diese drei Readings aktualisiert. Der Status des Schlosses über den Webhook wenn betätigt sowie Resi und batterie glaube durch ein zyklisches abfragen der Bridge.
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

olaf

@danillo: bei mir klappt das mit dem Callback einwandfrei. Wie ich sehe, hast Du eine Software-Bridge. Ich habe eine Hardware-Bridge. Kann das daran liegen? Ich kenn die SW-Bridge nicht. Kann man da sehen, ob die "locked"-Meldung des Schlosses ankommt? Die 3 readings rssi, paired und name, die immer aktualisiert werden, resultieren nur aus einer zyklischen "Alive"-Abfrage des NUKI_Bridge Moduls. Diese ist nur vorgesehen, um zu sehen, ob die Bridge noch "connected" ist.

@CoolTux: Auf Github habe ich einen PR für meine Änderungen eingestellt. Kannst ja mal schauen.
Der Fehler 503 schlägt nun nicht mehr als json-error durch.
Weiterhin habe ich alle Anfragen an die Bridge/Schloss nun serialisiert und, wenn es eine Fehlermedung zurückgibt (503-unavailable, leere Antwort, http-timeout) wiederhole ich die Befehle solange, bis sie vom Schloss umgesetzt wurden. Damit vermeide ich, dass wichtige Befehle wie "lock" im Falle eines Fehlers einfach unter den Tisch fallen.

Eine Sache habe ich noch nicht im Griff, s. Anhang.
Kann man irgendwie zwischen Statusmeldungen des Schlosses aufgrund manueller Betätigung und Antworten auf fhem-Anfragen unterscheiden?