Why is HA reverting to old version?

I recently added the usps component to my 0.65.4 version of HA. I normally use the Call Service operation in the web GUI to restart HA but this time I decided to use the command line:

sudo systemctl start [email protected]

I found that it never came up. The only thing in the log file was 2 lines that said that the august component was not recognized. I have an august door lock and replaced the wink component version with august component after the 0.64 release and it’s been working OK since.

So, now I decided to do a manual check of the config file with hass:

homeassistant@hassbian:~/.homeassistant $ hass --script check_config
INFO:homeassistant.util.package:Attempting install of colorlog==3.1.2
Testing configuration at /home/homeassistant/.homeassistant
2018-03-22 19:08:31 INFO (Thread-2) [homeassistant.config] Upgrading configuration directory from 0.65.4 to 0.63.3
2018-03-22 19:08:31 INFO (Thread-2) [homeassistant.config] Migrating old system configuration files to new locations
2018-03-22 19:08:31 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 1.1 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up http
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up history
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up api
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up scene
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up usps
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up ecobee
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up python_script
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up ifttt
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up zone
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up notify
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up map
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up lutron_caseta
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-03-22 19:08:33 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-03-22 19:08:33 ERROR (MainThread) [homeassistant.loader] Unable to find component august
2018-03-22 19:08:33 ERROR (MainThread) [homeassistant.setup] Setup failed for august: Component not found.

One of the first lines talks about “upgrading” the configuration from 65 to 63. What is going on here?

Thanks for any help you can offer.

I rebooted the system and got a different behavior this time. HA came up but had a couple of errors:

2018-03-22 20:20:52 WARNING (Thread-5) [homeassistant.components.python_script] Folder python_scripts not found in configuration folder
2018-03-22 20:20:53 ERROR (MainThread) [homeassistant.setup] Setup failed for python_script: Component failed to initialize.
2018-03-22 20:21:18 ERROR (Thread-5) [homeassistant.components.usps] Could not connect to My USPS
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/usps.py", line 55, in setup
    driver=driver)
  File "/srv/homeassistant/lib/python3.5/site-packages/myusps/__init__.py", line 300, in get_session
    _login(session)
  File "/srv/homeassistant/lib/python3.5/site-packages/myusps/__init__.py", line 170, in _login
    driver = _get_driver(session.auth.driver)
  File "/srv/homeassistant/lib/python3.5/site-packages/myusps/__init__.py", line 151, in _get_driver
    raise USPSError('{} not supported'.format(driver_type))
myusps.USPSError: None not supported
2018-03-22 20:21:18 ERROR (MainThread) [homeassistant.setup] Setup failed for usps: Component failed to initialize.

The python_scripts error is my fault and I have corredted it. The problem with usps I need help with. I installed it according to the tutorial using github as the source for the phantomjs package. The binary is in /usr/bin so it should accessible to HA.

My configuration looks like this:

usps:
    username: !secret usps_username
    password: !secret usps_password
    driver: phantomjs

What am I missing?

Do I need to worry about the previous problem with “upgrading” the HA revision?

It is the failure mode of some SD cards that they appear to write correctly, but then revert to an earlier point at a later date. This sounds like it might be happening to you, so I suggest you try another SD card.

Thanks for the suggestion. However, I have a hard drive (2.5" SATA III 500GB with USB controller) as the boot drive on this system so that can’t be the problem. Do you know if there is any way to verify that the system has returned to normal operation? Is there a detailed log file that I should examine?

You may want to look at the location of your installation. A number of people have forgotten to enter their virtual environment when updating and install a second instance.

Thanks, but that is not my problem. It’s running OK now. Even usps is working without doing anything to fix it. Maybe it’s all self_repairing… :slight_smile:

For anyone else who arrives here as I did looking for solutions to the same problem: This can be caused by migrating your data partition to a USB stick. Perhaps it’s fixed in newer versions of Home Assistant OS, but when I did it, both the SD card and USB drive were left with partitions labeled hassos-data, and the data partition is mounted by label, so I was getting my “old version” whenever the kernel happened to link the “wrong” partition to /dev/disk/by-id/hassos-data. I was able to solve it by cloning the kernel & system partitions from the USB drive to the SD card, and removing the USB drive, so that the SD card had the newest system, and newest user-data only.

1 Like