Closed shakisha closed 1 year ago
I have no idea frankly. Can you switch on debug and post the log here? It receives a message but ot really doesn;t like what it gets so I need some more data. Can you also tell me what your setup is (which lock), whether this is on first install of whether you have had it working bwefore, stuff like that. A bit of context would help me.
H
Hello.
I have got an opener and a bridge. The issue I think is related to the last message (property name in double quotes".
2022-08-09 14:43:43.977 Error: Nuki Bridge: Call to function 'onMessage' failed, exception details: 2022-08-09 14:43:43.977 Error: Nuki Bridge: Traceback (most recent call last): 2022-08-09 14:43:43.977 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 416, in onMessage 2022-08-09 14:43:43.977 Error: Nuki Bridge: _plugin.onMessage(Connection, Data) 2022-08-09 14:43:43.977 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 265, in onMessage 2022-08-09 14:43:43.977 Error: Nuki Bridge: Response = json.loads(Response) 2022-08-09 14:43:43.977 Error: Nuki Bridge: File "/usr/lib/python3.9/json/init.py", line 346, in loads 2022-08-09 14:43:43.977 Error: Nuki Bridge: return _default_decoder.decode(s) 2022-08-09 14:43:43.977 Error: Nuki Bridge: File "/usr/lib/python3.9/json/decoder.py", line 337, in decode 2022-08-09 14:43:43.977 Error: Nuki Bridge: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2022-08-09 14:43:43.977 Error: Nuki Bridge: File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode 2022-08-09 14:43:43.977 Error: Nuki Bridge: obj, end = self.scan_once(s, idx) 2022-08-09 14:43:43.977 Error: Nuki Bridge: json.decoder.JSONDecodeError: ('Expecting property name enclosed in double quotes', '{3\x0f}%\x00N\nz:mM]\x7f]~?1WM
Today all my opener actions failed, this is what i have got:
2022-08-10 10:49:11.351 Error: Nuki Bridge: Call to function 'onCommand' failed, exception details: 2022-08-10 10:49:11.352 Error: Nuki Bridge: Traceback (most recent call last): 2022-08-10 10:49:11.352 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 420, in onCommand 2022-08-10 10:49:11.352 Error: Nuki Bridge: _plugin.onCommand(Unit, Command, Level, Hue) 2022-08-10 10:49:11.352 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 299, in onCommand 2022-08-10 10:49:11.352 Error: Nuki Bridge: lockid = str(self.lockIds[Unit-1-self.numLocks]) 2022-08-10 10:49:11.352 Error: Nuki Bridge: IndexError: list index out of range
@heggink i have found that if I deactivate "hashed" token mode, then the error disappear.
Ah, that makes sense. The hashed token mode was added by someone else as a security measure. I don't use it myself so don't know how it works. If it now works, you may close this
@heggink false alarm, issue is again here, with plain token mode too.
2022-08-10 19:55:18.633 Error: Nuki Bridge: Call to function 'onCommand' failed, exception details: 2022-08-10 19:55:18.634 Error: Nuki Bridge: Traceback (most recent call last): 2022-08-10 19:55:18.634 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 420, in onCommand 2022-08-10 19:55:18.634 Error: Nuki Bridge: _plugin.onCommand(Unit, Command, Level, Hue) 2022-08-10 19:55:18.634 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 299, in onCommand 2022-08-10 19:55:18.634 Error: Nuki Bridge: lockid = str(self.lockIds[Unit-1-self.numLocks]) 2022-08-10 19:55:18.634 Error: Nuki Bridge: IndexError: list index out of range
This is a different error as it's looking for a non existant device. Can you remove the plugin and recreate but now without the hashed token?
If that still gives errors then please switch on debug and give me the entire debug log. I need to see what is being sent from the locks in order to understand what is going wrong. Just the error messages alone are not enough but start by deleting and recreating.
Still the same. I ended up directly removing the plugin and using home assistant instead. Thank you so much @heggink for your apportions.
I have got these errors in log:
2022-08-09 02:54:34.568 Error: Nuki Bridge: Call to function 'onMessage' failed, exception details: 2022-08-09 02:54:34.568 Error: Nuki Bridge: Traceback (most recent call last): 2022-08-09 02:54:34.568 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 416, in onMessage 2022-08-09 02:54:34.568 Error: Nuki Bridge: _plugin.onMessage(Connection, Data) 2022-08-09 02:54:34.568 Error: Nuki Bridge: File "/home/pi/domoticz/plugins/domoticz-nuki/plugin.py", line 262, in onMessage 2022-08-09 02:54:34.568 Error: Nuki Bridge: Response = strData[strData.index('{') :]
what can be the issue?