Homeassistant container on hass.io will not start

After the upgrade to 0.110.1 and some configuration changes, I am unable to get the homeassistant docker container to start. I have checked my yaml files and other things as well and nothing seems off. Everything is UTF-8 encoded as well.

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 364, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 337, in main
    args = get_arguments()
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 84, in get_arguments
    import homeassistant.config as config_util
  File "/usr/src/homeassistant/homeassistant/config.py", line 57, in <module>
    from homeassistant.util.yaml import SECRET_YAML, load_yaml
  File "/usr/src/homeassistant/homeassistant/util/yaml/__init__.py", line 4, in <module>
    from .loader import clear_secret_cache, load_yaml, secret_yaml
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 17, in <module>
    import keyring
  File "/usr/local/lib/python3.7/site-packages/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/usr/local/lib/python3.7/site-packages/keyring/core.py", line 192, in <module>
    init_backend()
  File "/usr/local/lib/python3.7/site-packages/keyring/core.py", line 96, in init_backend
    filter(limit, backend.get_all_keyring()),
  File "/usr/local/lib/python3.7/site-packages/keyring/util/__init__.py", line 22, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/keyring/backend.py", line 216, in get_all_keyring
    _load_plugins()
  File "/usr/local/lib/python3.7/site-packages/keyring/backend.py", line 199, in _load_plugins
    entry_points = metadata.entry_points()['keyring.backends']
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 575, in entry_points
    ordered = sorted(eps, key=by_group)
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 573, in <genexpr>
    dist.entry_points for dist in distributions())
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 268, in entry_points
    return EntryPoint._from_text(self.read_text('entry_points.txt'))
  File "/usr/local/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 524, in read_text
    return self._path.joinpath(filename).read_text(encoding='utf-8')
  File "/usr/local/lib/python3.7/pathlib.py", line 1217, in read_text
    return f.read()
  File "/usr/local/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc1 in position 0: invalid start byte

scripts.yaml:

'1589777086901':
  alias: Roomba - Basement Lights On
  sequence:
  - device_id: 7f500854bf1e413cab9d3f25a6fa1ff7
    domain: switch
    entity_id: switch.inovelli_nzw30_smart_toggle_switch_w_scene_switch
    type: turn_on
  - brightness_pct: 25
    device_id: 002d31af9a374901b38cb50c0843459e
    domain: light
    entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level
    type: turn_on
  - brightness_pct: 25
    device_id: d3bd3fabcd9043c497a7e433b173a248
    domain: light
    entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level_5
    type: turn_on
'1589778526249':
  alias: Roomba - Basement Lights Off
  sequence:
  - device_id: d3bd3fabcd9043c497a7e433b173a248
    domain: light
    entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level_5
    type: turn_off
  - device_id: 7f500854bf1e413cab9d3f25a6fa1ff7
    domain: switch
    entity_id: switch.inovelli_nzw30_smart_toggle_switch_w_scene_switch
    type: turn_off
  - device_id: 002d31af9a374901b38cb50c0843459e
    domain: light
    entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level
    type: turn_off

automations.yaml:

> - id: '1589605142458'
>   alias: Living Room - Toggle Lamp
>   description: ''
>   trigger:
>   - device_id: 41757baf4f8e4cba83b48b4a8f595d4e
>     domain: switch
>     entity_id: switch.living_room_corner_lamp
>     platform: device
>     type: turned_on
>   condition: []
>   action:
>   - device_id: 41757baf4f8e4cba83b48b4a8f595d4e
>     domain: switch
>     entity_id: switch.living_room_corner_lamp
>     type: toggle
> - id: '1589606268059'
>   alias: Basement - Toggle Lamp
>   description: ''
>   trigger:
>   - device_id: d3bd3fabcd9043c497a7e433b173a248
>     domain: light
>     entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level_5
>     platform: device
>     type: turned_on
>   - device_id: d3bd3fabcd9043c497a7e433b173a248
>     domain: light
>     entity_id: light.inovelli_nzw31_smart_toggle_dimmer_w_scene_level_5
>     platform: device
>     type: turned_off
>   condition: []
>   action:
>   - device_id: 2f9b9e2a3ee14901a8b5aa189f421a63
>     domain: switch
>     entity_id: switch.smartthings_outletv4_13410901_on_off
>     type: toggle
> - id: '1589607012284'
>   alias: Lock - Lock Doors at 9pm
>   description: ''
>   trigger:
>   - at: '21:00'
>     platform: time
>   condition: []
>   action:
>   - device_id: f406212cfcaf4f919916d6d3b309d684
>     domain: lock
>     entity_id: lock.front_door_lock
>     type: lock
> - id: '1589608395325'
>   alias: HomeState - Set Away Mode
>   description: ''
>   trigger:
>   - entity_id: person.justin_dybedahl
>     event: leave
>     platform: zone
>     zone: zone.home
>   condition: []
>   action:
>   - data:
>       option: Away
>     entity_id: input_select.homestate
>     service: input_select.select_option
> - id: '1589611249719'
>   alias: HomeState - Set Home Mode
>   description: ''
>   trigger:
>   - entity_id: person.justin_dybedahl
>     event: enter
>     platform: zone
>     zone: zone.home
>   condition: []
>   action:
>   - data:
>       option: Home
>     entity_id: input_select.homestate
>     service: input_select.select_option
> - id: '1589654079843'
>   alias: Notification - Doorbell
>   description: ''
>   trigger:
>   - device_id: 8539743e75d04168acd6c2c68f149610
>     domain: binary_sensor
>     entity_id: binary_sensor.nexia_doorbell_sensor_contact
>     platform: device
>     type: opened
>   condition: []
>   action:
>   - data:
>       message: Someone is at the door.
>       title: Doorbell Notification
>     service: notify.notify
> - id: '1589775325368'
>   alias: Away - Roomba Clean
>   description: ''
>   trigger:
>   - entity_id: input_select.homestate
>     for: 00:01:00
>     from: Home
>     platform: state
>     to: Away
>   condition: []
>   action:
>   - device_id: b119da804c2746e298cae66d7ae2d174
>     domain: vacuum
>     entity_id: vacuum.roomba_i7
>     type: clean
>   - condition: or
>     conditions:
>     - after: sunset
>       condition: sun
>     - before: sunrise
>       condition: sun
>   - data: {}
>     entity_id: script.1589777086901
>     service: script.turn_on
> - id: '1589776506560'
>   alias: Home - Roomba Dock
>   description: ''
>   trigger:
>   - entity_id: input_select.homestate
>     for: 00:00:00
>     from: Away
>     platform: state
>     to: Home
>   condition: []
>   action:
>   - device_id: b119da804c2746e298cae66d7ae2d174
>     domain: vacuum
>     entity_id: vacuum.roomba_i7
>     type: dock
>   - condition: or
>     conditions:
>     - after: sunset
>       condition: sun
>     - before: sunrise
>       condition: sun
>   - data: {}
>     entity_id: script.1589778526249
>     service: script.turn_on
> - id: '1589779363187'
>   alias: Notification - Basement Freezer Above Threshold
>   description: ''
>   trigger:
>   - above: 30
>     device_id: a057f005365141b29dc35e0cde0e6f39
>     domain: sensor
>     entity_id: sensor.basement_freezer_temperature_measurement
>     for:
>       hours: 0
>       minutes: 30
>       seconds: 0
>     platform: device
>     type: temperature
>   condition: []
>   action:
>   - data:
>       message: Basement Freezer above 30 for 15 minutes.
>       title: Basement Freezer
>     service: notify.notify
> - id: '1589779572795'
>   alias: Notification - Basement Freezer Left Open
>   description: ''
>   trigger:
>   - device_id: a057f005365141b29dc35e0cde0e6f39
>     domain: binary_sensor
>     entity_id: binary_sensor.basement_freezer_contact
>     for:
>       hours: 0
>       minutes: 2
>       seconds: 0
>     platform: device
>     type: opened
>   condition: []
>   action:
>   - data:
>       message: Basement Freezer left open for 2 minutes.
>       title: Basement Freezer
>     service: notify.notify
> - id: '1589866353590'
>   alias: Notification - Dryer
>   description: ''
>   trigger:
>   - below: 5
>     device_id: 6eaf65de2f9d4b04b1dbdac283ff3f7d
>     domain: sensor
>     entity_id: sensor.dryer_power_2
>     for:
>       hours: 0
>       minutes: 0
>       seconds: 10
>     platform: device
>     type: value
>   condition:
>   - condition: state
>     entity_id: input_boolean.dryeron
>     state: 'true'
>   action:
>   - data:
>       message: Dryer has completed a load.
>       title: Laundry Notification
>     service: notify.notify
>   - data: {}
>     entity_id: input_boolean.dryeron
>     service: input_boolean.turn_off
> - id: '1589866924370'
>   alias: Laundry - Dryer On
>   description: ''
>   trigger:
>   - above: 200
>     device_id: 6eaf65de2f9d4b04b1dbdac283ff3f7d
>     domain: sensor
>     entity_id: sensor.dryer_power_2
>     for:
>       hours: 0
>       minutes: 0
>       seconds: 10
>     platform: device
>     type: value
>   condition: []
>   action:
>   - data: {}
>     entity_id: input_boolean.dryeron
>     service: input_boolean.turn_on
> - id: '1589867118429'
>   alias: Laundry - Washer On
>   description: ''
>   trigger:
>   - above: 300
>     device_id: c60815bdc28240b4be1de7971faa7464
>     domain: sensor
>     entity_id: sensor.washing_machine_power
>     platform: device
>     type: value
>   condition: []
>   action:
>   - data: {}
>     entity_id: input_boolean.washeron
>     service: input_boolean.turn_on
> - id: '1589867511835'
>   alias: Notification - Washer
>   description: ''
>   trigger:
>   - below: 5
>     device_id: c60815bdc28240b4be1de7971faa7464
>     domain: sensor
>     entity_id: sensor.washing_machine_power
>     platform: device
>     type: value
>   condition:
>   - condition: state
>     entity_id: input_boolean.washeron
>     state: 'true'
>   action:
>   - data:
>       message: Washing machine has completed a load.
>       title: Laundry Notification
>     service: notify.notify
>   - data: {}
>     entity_id: input_boolean.washeron
>     service: input_boolean.turn_off

Configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Lesson learned on going multiple days without a snapshot and setting up Samba and SSH add-ons. I blew away my original installation after getting the YAML files. I would still like to know though if anyone has any recommendations for troubleshooting these issues with the above information. I was able to restore my old YAML files with no issues so that leads me to believe it wasn’t them.

This happened again with the upgrade to 0.110.2. I figured out that this was due to the Samba and SSH add-ons config.js files being touched and changed during the upgrade process. Not sure why though. Bug?

I have the same issue. Not able to find out yet which add-on/config has the issue. I will keep following this ticket to see if someone can fix it.

I was able to figure out which add-on it was and pulling the docker logs after starting the homeassistant container. That was ultimately where I found the reference to SSH and samba. I removed the add-ons using the cli interface and had to delete the cached add-on files before they would install again from the store.

Another couple of things I’ve noticed is that some of my z-wave devices are clobbered after snapshot restore. They come back as undefined and I have to go and include them again. I also noticed that the snapshot seems to clobber the ecobee integration as well too as that has to be resetup since the entities all come back undefined.