Share your experience with upgrading to 0.40.x

This week many of us experienced issues with HASS (based on the number of msgs in GIT and on this forum) after upgrading to 0.40.1.
Me too and it cost me nearly a day to restore from a previous backup after reinstalling HASS.
If you using open source software these things happen as we all know.

The culprit seems to has been an upgraded dependency that is not (yet) compatible with HASS and the guys have released a fix for it in 0.40.2. Which is super !!! Many thanks for this!!!

However the PR and release notes mentions that this was caused by AppleTV and IP Webcam now I’m not using any of those :frowning: so why did it happen to me??

So I’m a bit reluctant to update my HASS to 0.40.2 at the moment … however I know that there are a lot of brave people out there that will perform the upgrade and if you one of those please share your experience here so we who are less brave can benefit from your experience!!


Edit: Just to have a sort of baseline/reference I’m using the following components/setup:

  • running on a PI 3
  • HTTP - SSL encryption
  • TTS - Google
  • RFXTRX - for sensors and switches
  • emulated_hue (google home)
  • device_tracker: asuswrt
  • MQTT - build in version for sensors and switches
  • notify- email, html5, pushbullet
  • Synology - cameras and NAS / HASS db
  • media_player: Kodi, DenonAVR, Chromecast, Panasonic TV

I did not have any issues when I upgraded to 0.40.1
I’m using IP Webcam and all is good.

I have also many Problems. After i upgrade to 0.40.1 HA doesn’t start anymore. So i go back to my last backup. With the next try with 0.40.2 HA started but i get many many errors. Also homematic variable are not visible in the GUI. :frowning:
So now i am back to 0.39.1

MQTT is broken for me, went back to 0.39.2. I get dependency errors:

17-03-22 20:54:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component mqtt
File “/srv/hass/lib/python3.5/site-packages/homeassistant/components/mqtt/”, line 338, in async_setup
File “/srv/hass/lib/python3.5/site-packages/homeassistant/components/mqtt/”, line 446, in async_connect
None, self._mqttc.connect,, self.port, self.keepalive)
File “/home/hass/.homeassistant/deps/paho/mqtt/”, line 686, in connect
File “/home/hass/.homeassistant/deps/paho/mqtt/”, line 821, in reconnect

17-03-22 20:55:09 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of automation.mqtt. Setup failed for dependencies: mqtt
17-03-22 20:55:09 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform automation.mqtt: Could not setup all dependencies.

Same error when I tried to upgrade to 0.40.00

I would look into how you backup your HA instance. A complete reinstall should take a half-hour or so. I went from OS install on ubuntu to new HA running in 25 minutes recently when moving to my new server.

Things may be a bit more complicated if your are running z-wave and it gives new names as devices are discovered.

So don’t. I generally stay a generation or so behind unless I want a specific upgrade. I stay on top of the release notes and only upgrade when I have some time to kill or I want an feature. I have had a very stable system as a result for quite awhile.

Thanks for your feedback. Just to be clear this topic is not meant to be negative about HASS as I’m an early adopter and very pleased with it. I placed this on the forum as we are a community and sharing experience hopefully makes this awesome project even more awesome :smiley:

Wrt my backup: I make a SD copy every month and before I do any changes I make another backup to my NAS. So also before the upgrade.

However after installing 0.40.1 I started to try to fix the errors as my first thought was it was something with my install as I got many errors. After sometime I decided to roll back but that didn’t fix all issues. Even after a restore I had problems that could only be solved by a hard reset of the ESP8266’s and chromecasts… took a bit before it was all cleared up again…

Oh and yes I also stay on top of the release notes and breaking changes… read the forums and look at the reported issues on GITHUB… however I still dropped into this as this issues wasn’t there when 40.1 was released it started only a couple of days ago when a dependency was updated… and yes in 0.40 there are some features that I have been waiting for :smiley:

Anyway not clear if you managed to go to 40.x as your post doesn’t mention it …

I updated to 40.0, 40.1 and 40.2 without any issues, but I’m not currently using the IP camera or Apple TV components.

Thanks piotr sound like what I experienced as well.

If you still experiencing issues try the following:

  • uninstall HASS: pip3 uninstall homeassistant
  • remove the deps folder in your homeassistant folder
  • install HASS: pip3 install --upgrade homeassistant==0.39.2

Make a copy of your homeassistant folder first so you can refer to it later when needed
That fixed most of my issues… just needed to reset most of my components as somehow they were all messed up

My clean install the other day was a 40.X, I think I am sitting on 40.1 right now.

Tried that, now I have even bigger problems:

17-03-23 20:31:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=create, service_call_id=140285689569632-17, service_data=message=The following components and platforms could not be set up:
* switch.mqtt
* sensor.mqtt
* automation.mqtt
* [mqtt](
* device_tracker.owntracks