Problem with TRADFRI

After updating today I was hoping to get my new trådfri lights integrated into hass but I’ve ran into some problems.

In my config I just have the following

tradfri:
  host: 192.168.1.255

and I’ve doublechecked my unifi gateway that it’s the correct IP. In my GUI I get the configure screen, enter my secret from the GW but when I pres confirm nothing more happends. I’ve checked the log and there’s nothing there.
Got some tips on FB to remove the tradfri: part from config and instead just use the discovery component but when I do that I don’t get the configure screen?

The GW is the latest version, they are connected to the same network but HASS can’t find it, I actually even checked with a mDNS browser and that can’t find my GW either?

You can’t use 192.168.1.255 , 255 is a networks broadcast adress.
Must be 1 to 254.
Maybe factory reset the gateway?

Try remove that line from config, restart gateway (off/on) and then restart HA.
It works form me.

Ah silly me… changed the IP now and atleast I get a error in the log this time:

017-11-04 18:52:24 ERROR (MainThread) [homeassistant.components.tradfri] Looks like something isn't installed!
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/components/tradfri.py", line 60, in configuration_callback
    from pytradfri.api.aiocoap_api import APIFactory
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/pytradfri/api/aiocoap_api.py", line 9, in <module>
    from aiocoap.transports import tinydtls
ImportError: cannot import name 'tinydtls'

I have exactly the same Error. Cant get it running. Hope someone can figure this out.

i got the same problem, what i noticed is that the gateway does not take IP from DHCP since last update and only gets a 169 ip.
Ive tried to restart it several times but no joy.

Have you tried to remove tradfri: from config and add discovery: That was the solution for me

I just removed tradfri from the config and added Discovery. I get the config dialog but when i enter the apikey i get the same tinydtsl Error in the log. I run hass on Ubuntu 16.04.

Any ideas?

Have it been working before? Are all you packages updated as required after 0.55?

No it have not been working since 0.54. I have tried some suggestions from other threads but nothing works. How do i install all requirements? Is there any documentation on this?

I had maaaany problems with tinytdls and apifactory & co. Only thing that worked for me (even after upgrading to bleeding edge 0.57) was to reinstall hass. See here: Reinstalling Home Assistant: What's your way to do it?
Cheers!

1 Like

Yup, that’s what I did to! I just renamed the virtualenv, made a new with the same name and installed it there. Now everything works and I didn’t have to redo any config :smiley:

Same for me, I did a fresh install of hassbian, installed TRÅDFRI and everything worked again.

I just tried this and I am still getting errors.
I did the 0.55 config steps and still get an error with tinydtls when I do a clean install.
What were the steps you took when you 'installed TRADFRI"?

I using hassbian so this only works with hassbian but I did the steps form this thread. I used the hassbian-config to install the necessary trådfri components. Maby a little bit overkill but it works!

sudo hassbian-config upgrade hassbian-script
sudo apt-get update && sudo apt-get upgrade
sudo apt install -y cython3
sudo hassbian-config install tradfri