Closed elxsi closed 5 years ago
That's strange, the init-string from the plugin is incomplete:
Data received: b'{"pollinterval": "3000", "groups": "True", "observe": "True", "action": "initGateway"}'
As strange as it sounds, it would appear that you have an older version of the plugin.py file?
Could you please try to pull the master branch again?
Hi moroen,
thank you for your reply. I've reinstalled twisted yesterday and suddenly the problem went away (I had to use the pip3 version, the native debian python3-twisted did not work).
I close this issue, as my problem is resolved.
Thank you!
Hi!
The tradfri plugin suddenly stopped working today. I confirmed, that the tradfri device is reachable via network, I'm receiving the following error:
root@domoticz:/home/domoticz/plugins# /usr/bin/python3 /home/domoticz/plugins/IKEA-Tradfri/tradfri.tac IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)! Connected from IPv4Address(type='TCP', host='10.0.0.24', port=58002) Data received: b'{"pollinterval": "3000", "groups": "True", "observe": "True", "action": "initGateway"}' Initializing gateway Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, kw) File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, *kw) File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) --- ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/domoticz/plugins/IKEA-Tradfri/tradfri.tac", line 100, in dataReceived
self.factory.initGateway(self, command)
File "/home/domoticz/plugins/IKEA-Tradfri/tradfri.tac", line 221, in initGateway
if command['transitiontime'] == "":
builtins.KeyError: 'transitiontime'
Disconnected
I also tried rebooting the tradfri device multiple times.
Thank you!