Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Posted: Thursday 15 November 2018 20:52
I did a new install...
And again received errors...:
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Service hold-off time over, scheduling restart.
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: Stopped IKEA Tradfri COAP-adapter.
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Unhandled Error
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Traceback (most recent call last):
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 674, in run
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: runApp(config)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/scripts/twistd.py", line 25, in runApp
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: runner.run()
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 381, in run
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: self.application = self.createOrGetApplication()
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 453, in createOrGetApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = getApplication(self.config, passphrase)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: --- <exception caught here> ---
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 464, in getApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = service.loadApplication(filename, style, passphrase)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/service.py", line 416, in loadApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = sob.loadValueFromFile(filename, 'application')
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/persisted/sob.py", line 177, in loadValueFromFile
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: eval(codeObj, d, d)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac", line 34, in <module>
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: deviceConfig.read(INIFILE)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/usr/lib/python3.5/configparser.py", line 696, in read
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: self._read(fp, filename)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/usr/lib/python3.5/configparser.py", line 1108, in _read
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: raise e
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: configparser.ParsingError: Source contains parsing errors: '/home/pi/domoticz/plugins/IKEA-Tradfri/devices.ini'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: [line 41]: '[]\n'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Failed to load application: Source contains parsing errors: '/home/pi/domoticz/plugins/IKEA-Tradfri/devices.ini'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: [line 41]: '[]\n'
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Unit entered failed state.
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Failed with result 'exit-code'.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Service hold-off time over, scheduling restart.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: Stopped IKEA Tradfri COAP-adapter.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Start request repeated too quickly.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: Failed to start IKEA Tradfri COAP-adapter.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Unit entered failed state.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Failed with result 'exit-code'.
At this point i had a look in devices.ini..., and the [] was there again.
Removed this line, and started the service again:
Nov 15 20:43:08 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:09+0100 [-] Loading /home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac...
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [-] Loaded.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.9.0 (/usr/bin/python3 3.5.3) starting up.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [-] AdaptorFactory starting on 1234
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [builtins.AdaptorFactory#info] Starting factory <AdaptorFactory object at 0x75fd72f0>
Nov 15 20:43:21 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:21+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45478)
Nov 15 20:44:36 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:36+0100 [stdout#info] Error in announce: Request timed out
Nov 15 20:44:36 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:36+0100 [stdout#info] Disconnected
Nov 15 20:44:51 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:51+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45480)
Nov 15 20:45:26 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:26+0100 [stdout#info] Error in announce: Request timed out
Nov 15 20:45:26 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:26+0100 [stdout#info] Disconnected
Nov 15 20:45:41 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:41+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45482)
Now it al seems to work..., but after a reboot the [] is again in the devices.ini
Did the trick of removing the [] again, and it works agian:
Nov 15 20:51:04 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:05+0100 [-] Loading /home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac...
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [-] Loaded.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.9.0 (/usr/bin/python3 3.5.3) starting up.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [-] AdaptorFactory starting on 1234
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [builtins.AdaptorFactory#info] Starting factory <AdaptorFactory object at 0x75f502f0>
Nov 15 20:51:12 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:12+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=40822)
Nov 15 20:51:25 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:25+0100 [stdout#info] Failed to connect to gateway: Request timeout
Nov 15 20:51:25 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:25+0100 [stdout#info] Disconnected
And again received errors...:
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Service hold-off time over, scheduling restart.
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: Stopped IKEA Tradfri COAP-adapter.
Nov 15 20:41:24 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Unhandled Error
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Traceback (most recent call last):
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 674, in run
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: runApp(config)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/scripts/twistd.py", line 25, in runApp
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: runner.run()
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 381, in run
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: self.application = self.createOrGetApplication()
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 453, in createOrGetApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = getApplication(self.config, passphrase)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: --- <exception caught here> ---
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/app.py", line 464, in getApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = service.loadApplication(filename, style, passphrase)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/application/service.py", line 416, in loadApplication
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: application = sob.loadValueFromFile(filename, 'application')
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/.local/lib/python3.5/site-packages/twisted/persisted/sob.py", line 177, in loadValueFromFile
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: eval(codeObj, d, d)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac", line 34, in <module>
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: deviceConfig.read(INIFILE)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/usr/lib/python3.5/configparser.py", line 696, in read
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: self._read(fp, filename)
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: File "/usr/lib/python3.5/configparser.py", line 1108, in _read
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: raise e
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: configparser.ParsingError: Source contains parsing errors: '/home/pi/domoticz/plugins/IKEA-Tradfri/devices.ini'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: [line 41]: '[]\n'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: Failed to load application: Source contains parsing errors: '/home/pi/domoticz/plugins/IKEA-Tradfri/devices.ini'
Nov 15 20:41:25 Domoticz.labots.nl twistd[969]: [line 41]: '[]\n'
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Unit entered failed state.
Nov 15 20:41:25 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Failed with result 'exit-code'.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Service hold-off time over, scheduling restart.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: Stopped IKEA Tradfri COAP-adapter.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Start request repeated too quickly.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: Failed to start IKEA Tradfri COAP-adapter.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Unit entered failed state.
Nov 15 20:41:26 Domoticz.labots.nl systemd[1]: ikea-tradfri.service: Failed with result 'exit-code'.
At this point i had a look in devices.ini..., and the [] was there again.
Removed this line, and started the service again:
Nov 15 20:43:08 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:09+0100 [-] Loading /home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac...
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [-] Loaded.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.9.0 (/usr/bin/python3 3.5.3) starting up.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [-] AdaptorFactory starting on 1234
Nov 15 20:43:10 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:10+0100 [builtins.AdaptorFactory#info] Starting factory <AdaptorFactory object at 0x75fd72f0>
Nov 15 20:43:21 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:43:21+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45478)
Nov 15 20:44:36 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:36+0100 [stdout#info] Error in announce: Request timed out
Nov 15 20:44:36 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:36+0100 [stdout#info] Disconnected
Nov 15 20:44:51 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:44:51+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45480)
Nov 15 20:45:26 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:26+0100 [stdout#info] Error in announce: Request timed out
Nov 15 20:45:26 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:26+0100 [stdout#info] Disconnected
Nov 15 20:45:41 Domoticz.labots.nl twistd[1012]: 2018-11-15T20:45:41+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=45482)
Now it al seems to work..., but after a reboot the [] is again in the devices.ini
Did the trick of removing the [] again, and it works agian:
Nov 15 20:51:04 Domoticz.labots.nl systemd[1]: Started IKEA Tradfri COAP-adapter.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:05+0100 [-] Loading /home/pi/domoticz/plugins/IKEA-Tradfri/tradfri.tac...
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [-] Loaded.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 18.9.0 (/usr/bin/python3 3.5.3) starting up.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [-] AdaptorFactory starting on 1234
Nov 15 20:51:06 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:06+0100 [builtins.AdaptorFactory#info] Starting factory <AdaptorFactory object at 0x75f502f0>
Nov 15 20:51:12 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:12+0100 [stdout#info] Connected from IPv4Address(type='TCP', host='127.0.0.1', port=40822)
Nov 15 20:51:25 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:25+0100 [stdout#info] Failed to connect to gateway: Request timeout
Nov 15 20:51:25 Domoticz.labots.nl twistd[932]: 2018-11-15T20:51:25+0100 [stdout#info] Disconnected