moroen / IKEA-Tradfri-plugin

A Python plugin for Domoticz to controll IKEA Gateway
68 stars 23 forks source link

(Tradfri) No transport, write directive to 'Main' ignored. #62

Closed azvero closed 5 years ago

azvero commented 5 years ago

Several times a day my Domoticz instance loses its ability to talk to the TRÅDFRI gateway.

In the Domoticz log I see lots of the following:

2019-01-13 09:00:09.696 Error: (Tradfri) No transport, write directive to 'Main' ignored. 2019-01-13 09:05:03.951 Error: (Tradfri) No transport, write directive to 'Main' ignored. 2019-01-13 09:14:13.215 Error: (Tradfri) No transport, write directive to 'Main' ignored. 2019-01-13 09:20:03.149 Error: (Tradfri) No transport, write directive to 'Main' ignored.

often accompanied by

2019-01-13 11:19:28.845 (Tradfri) Connected successfully to: 127.0.0.1 2019-01-13 11:19:39.095 (Tradfri) Device has disconnected 2019-01-13 11:19:53.979 (Tradfri) Connected successfully to: 127.0.0.1 2019-01-13 11:20:04.063 (Tradfri) Device has disconnected 2019-01-13 11:20:18.853 (Tradfri) Connected successfully to: 127.0.0.1 2019-01-13 11:20:29.081 (Tradfri) Device has disconnected

and then more of "(Tradfri) No transport, write directive to 'Main' ignored."

When this happens, I found that the only way to recover is by rebooting the TRÅDFRI gateway.

On its own (i.e. before integration into Domoticz) the gateway was very stable, running for weeks on end controlling the lights on a schedule etc.

Domoticz Version: 4.9700 Build Hash: a3a45906 Compile Date: 2018-06-23 15:24:51 dzVents Version: 2.4.6 Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] (Tradfri) Initialized version 1.1.0, author 'moroen'

moroen commented 5 years ago

Are you polling for changes? And if so, what are the polling-interval?

Experience shows that polling the gateway will make it freeze, and freezing seems more frequent when using shorter intervals. If you don't really need to observe changes, I would recommend disabling "observe changes".

Using real resource observations (i.e. not polling for changes) are downright impossible to implement using the current api (coap-client). I'm working on a aiocoap version of the plugin that hopefully will be more stable, but it's still some way off...

Take a look at issue #59

basrieter commented 5 years ago

Polling at 300 seconds seems to be fine for me and does not freeze. Shorter will.

azvero commented 5 years ago

Thanks for the suggestion (and for the great plugin).

I was using the default polling interval, which I have now increased to 300s.

MHagreis commented 5 years ago

same problem here but can't fix it and the 300s dusn't help me rebooted all systems multiple times and changed to an interval of 300s but still not posible to recover