I have just setup Home Assistant so if I am missing anything on this post I am happy to amend it.
I have recently bought some Ikea Tradfri smart lights which I can use with Home Assistant. I am trying to add the Tradfri lights to my configurations.yaml file so that I can control them with Home Assistant. When I reboot my Pi (2) and go to http://hassbian.local:8123 on the states page I am presented with this:
I have tripled check my configurations.yaml file for the Tradfri lights but this error still comes up. This is the Tradfri part of my configurations.yaml part. I have changed the host key and api_key to keep them private:
tradfri: host: 123.456.89.7 api_key: 76FFDfbbhR
This is what my log says as well about the issue:
2017-05-22 18:22:34 ERROR (MainThread) [homeassistant.setup] Setup failed for tradfri: Component failed to initialize.
and
I have changed the IP address and the part next to it to keep them private I have replaced them with some random number:
2017-05-22 18:22:57 WARNING (Thread-11) [netdisco.ssdp] Found malformed XML at http://123.456.7.89:12345/description0.xml: 2017-05-22 18:22:58 WARNING (Thread-11) [netdisco.ssdp] Found malformed XML at http://123.456.7.89:12345/description1.xml: 2017-05-22 18:22:58 WARNING (Thread-11) [netdisco.ssdp] Found malformed XML at http://123.456.7.89:12345/description3.xml:
Thanks so much for looking at this and I am happy to provide more information about this issue if needed.
Okay. And the “malformed XML”-error belongs to the IP of your Gateway, right? Did you tried to restart the gateway? I didn`t get these errors from my Gateway. And did you updated the gateway? My version is 1.1.0015
Okay, that’s strange, my setting is the same and it works for me. Did a tradfri.conf appeared in your config-directory? And do you have the discovery-mode enabled?
You will need to log in to your router and look it up. (if you don’t know how, either google it or post the make/model here for some help) The MAC address is printed on the back of the gateway and there should be a table of attached devices and the current IP address assigned.
It is a good idea to assign a fixed IP to the gateway (and really any home assistant device) as it won’t change that way in the future. Generally your DHCP server will continually give the same IP, but it is not guaranteed, it can create some headaches in the future if it does change randomly.
This also tells me that the IP and the security code is valid of the tradfri hub I used in the HA config. I can controll my Receiver and Chromecast with Home assistant so the HA setup is working either.
Firmware level of the hub is 1.1.0015.
I have been having issues with connecting my hub when I restart HA. I get an invalid config notification that only is resolved by rebooting the hub letting it boot and then rebooting HA. Might be worth a try for you, reboot the hub and then HA.
I was going to submit a issue on Github but I can’t seem to reproduce it consistently.