Upgrade to 0.55.0 Ikea Tradfri not working anymore

Hello together,

just upgraded to version 0.55.0 and now, the Ikea Tradfri Component isn’t working anymore.
The first error i have is the following:

homeassistant hass[18836]: Traceback (most recent call last):
homeassistant hass[18836]:   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tradfri.py", line 115
homeassistant hass[18836]:     from pytradfri.api.aiocoap_api import api_factory
homeassistant hass[18836]:   File "/srv/homeassistant/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py", line 6, in <mod
homeassistant hass[18836]:     from aiocoap import Message, Context
homeassistant hass[18836]: ImportError: No module named 'aiocoap'

The other error is the following:

homeassistant hass[19146]: Traceback (most recent call last):
homeassistant hass[19146]:   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tradfri.py", line 115
homeassistant hass[19146]:     from pytradfri.api.aiocoap_api import api_factory
homeassistant hass[19146]:   File "/srv/homeassistant/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py", line 9, in <mod
homeassistant hass[19146]:     from aiocoap.transports import tinydtls
homeassistant hass[19146]: ImportError: cannot import name 'tinydtls'

I have tried to install aiocoap via pip3 in the virtual environment and also from the raspian strecht repo itself, but both didn’t worked for me.

For the other problem i have no Idea…

Any suggestions to solve this?

Thanks and regards

1 Like

Hi I have just upgraded also and hit the same Ikea Tradfri Error

ImportError: No module named 'aiocoap

Is there a script to rollback, I am using the latest version of hassbian.

Thanks Graham

Same Ikea Tradfri Error here.

@Hefford27 To rollback in hassbian, type:
pip3 install homeassistant==0.54.0
in your virtual environment.

@danyo Please fix the version in the title.

Thanks, I found the instructions on the website, the “Wife Factor” moaning lights were down… meant i was being lazy :slight_smile: Just finished the rollback… all working again on 0.54.0…

Same issue here, tried getting aiocoap from git, but no success…

Ok, correction, I think I might have figured out the issue.

To get the new branch to work, it seems you need to install tinydtls etc., the instructions were on the pytradfri git page. I haven’t tested this though as it requires python 3.4.4 or newer, and I currently have 3.4.2. Will work on that in the morning.

Walkthrough for my possible solution:

wget https://raw.githubusercontent.com/ggravlingen/pytradfri/master/script/install-aiocoap.sh
chmod +x install-aiocoap.sh
sudo ./install-aiocoap.sh

I tried it, but this does not fix the problem

You need to upgrade python.
How to do that? Need to do a newinstallation?

Tradfri needs specific versions of tinydtls and aoicap to be installed (https://github.com/ggravlingen/pytradfri/blob/4d4a682f2f646d41d2a6e4a65858e376f56e24ed/script/install-aiocoap.sh)

I couldn’t install tinydtls on macOS, but found a way to get around it. See https://github.com/ggravlingen/pytradfri/issues/64 for details.


Home Assistant does no longer support Python 3.4.

Can confirm that rolling back to 0.54 fixed the problem.

1 Like

Hi morberg,

ok, thanks for the informatin, but thats not the issue. I have the latest Python Version running on Raspbian with Home Assistant installed…


See my other comment regarding tradfri needing specific versions of tinydtls and aoicap.

Having the same problems. This roll back command worked fine om my Pi3 install, and the Tradfri was fine after a restart.

1 Like

Hi all,

thanks for all your answers…

Have also downgraded the Hass Version to 0.54.0 and everything is fine again…

Thanks and regards

Had to rollback as well. I’m running on an rpi3 with Jessie on it. My python 3 version is 3.4.2 and it seems the async update for trader requires 3.4.4.
Need to look into detail on it when I have some time.

I second this! After upgrading to 0.55 TRADFRI didn’t work anymore, but after following the steps in the first link I managed to get it up and running again. If someone is interested in detailled steps, just let me know and I’ll post them later today.

hi, did you manage to get it working in 55?

Yes, I did. Works fine and shows some more information about the individual bulbs and the battery level of the remote as well!