Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ikea Tradfri stops working within 24h #22221

Closed
nskn71 opened this issue Mar 20, 2019 · 5 comments
Closed

Ikea Tradfri stops working within 24h #22221

nskn71 opened this issue Mar 20, 2019 · 5 comments

Comments

@nskn71
Copy link

nskn71 commented Mar 20, 2019

Home Assistant release with the issue:

Last working Home Assistant release (if known):
either 0.76.2 or 0.84.2, not sure exactly. It was working well until a release during the winter.

Operating environment (Hass.io/Docker/Windows/etc.):

0.84.2
arch x86_64
dev false
docker false
hassio false
os_name Linux
python_version 3.6.5
timezone Europe/Stockholm
version 0.89.1
virtualenv true

Fixed IP addresses both for Trådfri GW and Home assistant, both HA and Tradfri are hardwired (no wifi).

-->

Component/platform:

https://www.home-assistant.io/components/tradfri/

Description of problem:
After a period of time, ususally within 24h, Home Assistant looses connectivity with the Ikea trådfri gateway and lights/sockets become unavailable and can not be controlled. The Ikea Trådfri app works without issues, only HA have this problem. Power cycle on Trådfri GW does not resolve issue, I need to restart HA in order to restore connectivity.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

2019-03-20 17:36:48 WARNING (SyncWorker_7) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:37:19 WARNING (SyncWorker_9) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:37:49 WARNING (SyncWorker_1) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:38:03 ERROR (MainThread) [coap] Exception CancelledError() can not be represented as errno, setting -1.
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.switch] Observation failed for TRADFRI outlet
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.light] Observation failed for Läslampa röda mattan
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.light] Observation failed for Lampa vänster
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.light] Observation failed for Lampa höger
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.light] Observation failed for Golvlampa röda mattan
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:03 WARNING (MainThread) [homeassistant.components.tradfri.sensor] Observation failed for TRADFRI remote control
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pytradfri/api/aiocoap_api.py", line 95, in _get_response
    r = await pr.response
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 816, in _run_outer
    yield from cls._run(app_request, response, weak_observation, protocol, log, exchange_monitor_factory)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 865, in _run
    blockresponse = yield from blockrequest.response
aiocoap.error.RequestTimedOut
2019-03-20 17:38:20 WARNING (SyncWorker_8) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:38:51 WARNING (SyncWorker_0) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:39:22 WARNING (SyncWorker_7) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:39:53 WARNING (SyncWorker_7) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 WARNING (MainThread) [root] Observation deleted without explicit cancellation
2019-03-20 17:39:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/transports/tinydtls.py", line 160, in _run
    message = yield from self._queue.get()
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/util/asyncio.py", line 40, in get
    priority, first = yield from self._inner.get()
  File "/usr/lib/python3.6/asyncio/queues.py", line 167, in get
    yield from getter
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/transports/tinydtls.py", line 169, in _run
    self.coaptransport.new_error_callback(-1, self)
  File "/srv/homeassistant/lib/python3.6/site-packages/aiocoap/protocol.py", line 203, in _dispatch_error
    for key, (monitor, cancellable_timeout) in self._active_exchanges.items():
AttributeError: 'NoneType' object has no attribute 'items'
2019-03-20 17:40:24 WARNING (SyncWorker_7) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:40:55 WARNING (SyncWorker_0) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:41:11 ERROR (Thread-4) [pychromecast.socket_client] [KD-65XE9305:8009] Error reading from socket.
2019-03-20 17:41:11 WARNING (Thread-4) [pychromecast.socket_client] [KD-65XE9305:8009] Error communicating with socket, resetting connection
2019-03-20 17:41:11 ERROR (Thread-4) [pychromecast.socket_client] [KD-65XE9305:8009] Failed to connect to service BRAVIA-4K-GB-042bd3eb63cbd2d7c6c5d0b7a066a48e._googlecast._tcp.local., retrying in 5.0s
2019-03-20 17:41:25 WARNING (SyncWorker_4) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:41:56 WARNING (SyncWorker_6) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:42:26 WARNING (SyncWorker_2) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:42:57 WARNING (SyncWorker_9) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage
2019-03-20 17:43:28 WARNING (SyncWorker_2) [homeassistant.components.sensor.efergy] Could not update status for Energy Usage

Additional information:

Issue seem to have started around 17:38:03.

I've seen other in the forums so I'm not the only one with this problem.
Let me know if any more information is needed.

@TychoWerner
Copy link

I've had the same issue, just now removed the gateway from Home Assistant and readded it. Let's see.

@timdonovanuk
Copy link

I just had the same issue. I'm on 0.88.0. I couldn't grab the log because I had to quickly reboot HA to restore service, but I did quickly manage to see ERROR (MainThread) [coap] Exception CancelledError(). Usually issues with Tradfri I just unplug the Tradfri gateway and that restores control, but on recent versions of HA I have to also reboot HA.

@bouwew
Copy link
Contributor

bouwew commented Mar 22, 2019

I have the same problem several times per week!

I'm running the Circadian custom components, so lots of communication to my 13 various types of Tradfri bulbs.

See also here: home-assistant-libs/pytradfri#205

@ktpx
Copy link

ktpx commented Mar 22, 2019

Have same issue, and have for awhile. I see no errors in this regard. it works ok after hass reboot, then goes slower and slower, until it doesn update states. Tradfri app works as intended, so it is definitely not the gateway. Sorry, not very useful info, as I see no errors.

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Mar 22, 2019

Closing as duplicate of #14386.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants