Upgrade to 0.55.0 Ikea Tradfri not working anymore

great news. Whenever you an, please post the steps :slight_smile:

Related question: with this upgrade, if you have the light turned on and you switch it off with the wall switch, does it turn off in Home Assistant?

cool excellent, Daigo if you could post the instructions (in a idiot guide for me :slight_smile: ) that would be great, as I followed the posted instructions and still didnt work.

having the same issues here i am on hassbian stretch just updated to 0.55 the post https://github.com/home-assistant/home-assistant/issues/9752#issuecomment-334993733 seems to be a mix of different installs

yep. It seems on hassbian stretch they already merged the script that fixes it.

im all new to linux and stuff… how do you install that script…

it is installed via

sudo hassbian-config install tradfri

i have just done this and get the below error, is anyone able to help me out. I am on a fresh install of hassbian 0.55

2017-10-09 11:59:41 ERROR (MainThread) [homeassistant.components.tradfri] Looks like something isn't installed!

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tradfri.py”, line 115, in _setup_gateway
from pytradfri.api.aiocoap_api import api_factory
File “/srv/homeassistant/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py”, line 6, in
from aiocoap import Message, Context
ImportError: No module named ‘aiocoap’

I have done this and still get the error…

I have also sudo hassbian-config upgrade hassbian-script to update the scripts …

same here :frowning:

What about Tradfri and hass.io, which is already running Python 3.6?

1 Like

Hi could you please share your steps ? Thanks

Here also. Hassbian 1.3 on Stretch. I tried some of the above scripts. None of them worked. Then afterwards I updated the Hassbian scripts and installed the Tradfri script. The following errors still occurring.

okt 09 16:06:51 Hassbian hass[512]: 2017-10-09 16:06:51 ERROR (MainThread) [homeassistant.components.tradfri] Looks like something isn’t installed!
okt 09 16:06:51 Hassbian hass[512]: Traceback (most recent call last):
okt 09 16:06:51 Hassbian hass[512]: File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tradfri.py”, line 115, in _setup_gateway
okt 09 16:06:51 Hassbian hass[512]: from pytradfri.api.aiocoap_api import api_factory
okt 09 16:06:51 Hassbian hass[512]: File “/srv/homeassistant/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py”, line 9, in
okt 09 16:06:51 Hassbian hass[512]: from aiocoap.transports import tinydtls
okt 09 16:06:51 Hassbian hass[512]: ImportError: cannot import name ‘tinydtls’
okt 09 16:06:51 Hassbian hass[512]: 2017-10-09 16:06:51 ERROR (MainThread) [homeassistant.setup] Setup failed for tradfri: Component failed to initialize.

indent preformatted text by 4 spaces
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tradfri.py", line 115, in _setup_gateway
from pytradfri.api.aiocoap_api import api_factory
File "/srv/homeassistant/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py", line 9, in <module>
from aiocoap.transports import tinydtls
ImportError: cannot import name 'tinydtls'

Same error here !

I did like @morberg said in his post. So basically you need to install tinydtls and aiocoap. In order to do so you first need to install cython. So stop HA, activative your virtual environment (if you’ve installed HA in one) and execute the following command:

pip3 install cython

This may take a while - even though it looks nothing happens, just wait for it to finish.
Afterwards enter the following commands (taken from here: https://github.com/ggravlingen/pytradfri/blob/4d4a682f2f646d41d2a6e4a65858e376f56e24ed/script/install-aiocoap.sh)

git clone --depth 1 https://git.fslab.de/jkonra2m/tinydtls.git
cd tinydtls
autoreconf
./configure --with-ecc --without-debug
cd cython
python3 setup.py install

cd ../..
git clone https://github.com/chrysn/aiocoap
cd aiocoap
git reset --hard 3286f48f0b949901c8b5c04c0719dc54ab63d431
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .

Afterwards I restarted HA and TRADFRI was back. I hope these steps will help you!

6 Likes

i get the error

aclocal: warning: autoconf input should be named ‘configure.ac’, not ‘configure.in’
autom4te: cannot open autom4te.cache/requests: Permission denied
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

when at the ./configure --with-ecc --without-debug step

Hi @Daigo

Are you on Jessie or Stretch? Can you tell us your python version?

python -V
python3 -V

Ah, sorry, forgot to mention that!
I’m on Stretch after updating yesterday (instruction from here). So my version of python is 3.5.3.

@Dean_James Seems like you are in a directory you don’t have access to?

If I try this, might this mess up later Home Assistant updates when it is actually fixed in a newer release?
Or is it safe enough to run this manual commands and installations?

Sorry, maybe I’m the wrong person to be asked about this. I can’t imagine this would cause any harm, because you’re just installing some packages, but on the other hand maybe I’m wrong about this…

This worked for me, thanks a lot :slight_smile:

with the latest hassbian image?