I had to reinstall home assistant because tradfri component stopped working. I got messages about missing tinydtls and missing apifactory and so on. Even after upgrading to 0.57 (that was released some hours before this post). I don’t know what went wrong. I experimented a lot and tried every hint I found in the internet to revive tradfri. Nothing worked. So I reinstalled Home Assistant with the following commands:
uninstall home assistant: pip3 freeze | xargs pip3 uninstall -y
in your .homeassistant directory remove deps: rm -rf ./deps/ (this command is potentially dangerous! see post scriptum below)
docker rm hass
docker create <my ports and files> hass
docker run hass
Will eventually create an automation in HA that I can fire off to do this
I also wait 3 days before update or until xx.1 release to allow bug fix (unless some nice new component comes out)
I’m running the AIO version prior to Dec 2016 so names and paths may vary.
I also had to reinstall it to get the tradfri version running but it only takes a few minutes and I don’t have to redo any configuration. (always make a backup tough, don’t blame me if everythings gone)
Rename the old virtual env. (just so you can restore it if everything goes FUBAR) sudo mv /srv/hass/hass_venv/ /srv/hass/hass_venv_old/
Create a new virtual env. with the same name sudo mkdir /srv/hass/hass_venv
change ownership to old user hass sudo chown hass:hass /srv/hass/hass_venv
Switch to hass user sudo su -s /bin/bash homeassistant
Setup the virtual env. virtualenv -p python3 /srv/hass/hass_venv
Activate the virtual env. source /srv/homeassistant/bin/activate