Updated hassio, no longer accessible

I just logged into my Hassio with putty and ran;
Hassio supervisor logs
and I found error messages not in the log file

19-12-13 17:17:28 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-12-13 17:17:28 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale
19-12-13 17:22:33 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-12-13 17:22:33 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale

No other errors in the logs. Saw others on a google search in the past had this error and they also could not load Lovelace.
Did a search on the web and don’t see a fix (that I understand.
Like others, if I revert to 102.3 everything works again. Confirmed from command line that the Hassio was upgraded to .103.

Same here

19-12-13 17:54:54 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]

19-12-13 17:54:54 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale

and @bschatzow

That’s just complaining that there’s no sensor up yet for stale snapshots (the google drive addon). It is normal to see if homeassistant isn’t up.

If you try an update and it rolls back to a previous version, there’s something in your configuration to check for. You can also try the Check Home Assistant configuration addon against .103.0

Also, Custom components are always the first thing to disable if you’re having problems.

No errors in check home assistant configuration. I’ll start disabling the custom components one by one and see if I can figure out which one is causing the problem. Any idea why no errors are generated?

I encounter the same question, after debugging I found that it’s because of the api_password in the configuration, which it deprecated according to https://www.home-assistant.io/integrations/http/

I move the api_password to https://www.home-assistant.io/docs/authentication/providers/#legacy-api-password and everything works fine again.

I don’t know why it’s not downward compatibility, and it ruin the whole system.

I have done the following tests:
-Reverting back to 102.3 restores the Lovelace GUI immediately
-Removed the lines bellow from my configuration.yaml

homeassistant:
auth_providers:
# - type: legacy_api_password
# api_password: “password”

After the upgrade the homeassistant container restarts fine. I can SSH or view the logs in Portainer. I have the last following logs bellow. Note that some devices are turned off hence some of the errors.

2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] decode_slice_header error,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] no frame!,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] decode_slice_header error,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] no frame!,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] decode_slice_header error,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] no frame!,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] decode_slice_header error,
2019-12-16 17:07:56 ERROR (stream_worker) [libav.h264] no frame!,
2019-12-16 17:07:56 WARNING (MainThread) [homeassistant.components.sensor] Platform epsonworkforce not ready yet. Retrying in 30 seconds.,
2019-12-16 17:07:57 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.x.x:8554?timeout=5000000 failed: Host is unreachable,
Exception in thread stream_worker:,
Traceback (most recent call last):,
File “/usr/local/lib/python3.7/threading.py”, line 926, in _bootstrap_inner,
self.run(),
File “/usr/local/lib/python3.7/threading.py”, line 870, in run,
self._target(*self._args, **self._kwargs),
File “/usr/src/homeassistant/homeassistant/components/stream/worker.py”, line 49, in stream_worker,
container = av.open(stream.source, options=stream.options),
File “av/container/core.pyx”, line 275, in av.container.core.open,
File “av/container/core.pyx”, line 227, in av.container.core.Container.cinit,
File “av/container/core.pyx”, line 129, in av.container.core.ContainerProxy.init,
File “av/container/core.pyx”, line 195, in av.container.core.ContainerProxy.err_check,
File “av/utils.pyx”, line 105, in av.utils.err_check,
av.AVError: [Errno 113] Host is unreachable: ‘rtsp://root:[email protected]:8554/unicast’ (16: tcp),
,
2019-12-16 17:07:57 ERROR (SyncWorker_14) [miio.device] Unable to discover a device at address 192.168.x.x,
2019-12-16 17:07:57 ERROR (MainThread) [custom_components.xiaomi_miio_fan.fan] Got exception while fetching the state: Unable to discover the device 192.168.x.x,
2019-12-16 17:07:57 INFO (MainThread) [homeassistant.setup] Setup of domain fan took 7.6 seconds.,
2019-12-16 17:08:06 INFO (SyncWorker_7) [homeassistant.components.nmap_tracker.device_tracker] No MAC address found for 192.168.x.x,

Then the lovelace GUI is not accessible anymore. It is quite brutal. The container reverts back automatically to 102.3 after a while and this restores the GUI.

Bellow is my config file which checks fine against a 102.3
I suspect there is something obvious causing the 103 to hang at restart. I tried to remove the custom components and the cameras at some point but it didn’t help.

homeassistant:
  auth_providers:
#    - type: legacy_api_password
#      api_password: "password"
    - type: trusted_networks
      trusted_networks:
        - 192.168.x.x/xx
    - type: homeassistant
        
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: xx.x
  longitude: xx.xx
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: xxx
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/London
  # Customization file
  customize: !include customize.yaml

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

discovery:
  ignore:
    - yeelight
ssdp:
zeroconf:

recorder:
  purge_keep_days: 5
  purge_interval: 1

cloud:

custom_updater:
  track:
    - components
    - python_scripts
    - cards
  component_urls:
    - https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
  python_script_urls:
    - https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/python_scripts.json

weather:
  - platform: darksky
    api_key: key
    scan_interval:
      hours: 1

  - platform: openweathermap
    api_key: key
    name: OpenWeatherMap
    mode: freedaily
    
http:
  base_url: https://url.com:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

huawei_lte:
  - url: http://192.168.x.x/
    username: login
    password: password

notify:
  - platform: huawei_lte
    name: huawei_lte
    recipient: "telnumber"

# Camera

ffmpeg:

camera:
  - platform: ffmpeg
    input: rtmp://192.168.x.x/bcs/channel0_sub.bcs?channel=0&stream=0&user=login&password=password
    name: "Camera 1"

  - platform: ffmpeg
    input: rtmp://192.168.x.x/bcs/channel0_sub.bcs?channel=0&stream=0&user=login&password=password
    name: "Camera 3"
    
  - platform: ffmpeg
    input: rtsp://root:[email protected]:8554/unicast
    name: "Camera 4"

  - platform: ffmpeg
    input: rtsp://root:[email protected]:8554/unicast
    name: "Camera 5"
    
  - platform: ffmpeg
    input: rtsp://root:[email protected]:8554/unicast
    name: "Camera 6"
    
  - platform: mjpeg
    name: "OctoPrint"
    still_image_url: http://192.168.x.x/webcam/?action=snapshot
    mjpeg_url: http://192.168.x.x/webcam/?action=stream

# 3D Printer
octoprint:
  host: 192.168.x.x
  api_key: key
  name: "Octoprint"
  bed: true
  number_of_tools: 1

fan:
  - platform: xiaomi_miio_fan
    name: Smartmi Fan
    host: 192.168.x.x
    token: key
    model: zhimi.fan.za3

yeelight:
  devices:
    192.168.x.x:
      name: Yeelight 1
      model: mono
# Sensors
sensor:
  - platform: huawei_lte
    monitored_conditions:
      - device_information.SoftwareVersion
      - device_information.WanIPAddress
      - device_signal.rsrq
      - device_signal.rsrp
      - device_signal.sinr

  - platform: moon

  - platform: template
    sensors:
      moonphases:
        entity_id: sensor.moon
        friendly_name: 'Moon'
        value_template: '{{ states.sensor.moon.state }}'
        entity_picture_template: >
            {% if is_state('sensor.moon', 'new_moon') %}
              /local/MoonPhases/NNewMoon.jpg
            {% elif is_state('sensor.moon', 'waxing_crescent') %}
              /local/MoonPhases/NWaxingCrescent.jpg
            {% elif is_state('sensor.moon', 'first_quarter') %}
              /local/MoonPhases/NFirstQuarter.jpg
            {% elif is_state('sensor.moon', 'waxing_gibbous') %}
              /local/MoonPhases/NWaxingGibbous.jpg
            {% elif is_state('sensor.moon', 'full_moon') %}
              /local/MoonPhases/NFullMoon.jpg
            {% elif is_state('sensor.moon', 'waning_gibbous') %}
              /local/MoonPhases/NWaningGibbous.jpg
            {% elif is_state('sensor.moon', 'last_quarter') %}
              /local/MoonPhases/NLastQuarter.jpg
            {% elif is_state('sensor.moon', 'waning_crescent') %}
              /local/MoonPhases/NWaningCrescent.jpg
            {% endif %}

  - platform: template
    sensors:
      sunset_time:
        value_template: '{% set timestamp = as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom("%H:%M") %} {{ timestamp.lstrip("0") }}'
        friendly_name: "Sunset"

  - platform: template
    sensors:
      sunrise_time:
        value_template: '{% set timestamp = as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom("%H:%M") %} {{ timestamp.lstrip("0") }}'
        friendly_name: "Sunrise"

  - platform: template
    sensors:
      sun_azimuth:    
        value_template: "{{ state_attr('sun.sun', 'azimuth') }}"
        unit_of_measurement: '°'
        friendly_name: "Azimut"
        
  - platform: template
    sensors:
      sun_elevation:    
        value_template: "{{ state_attr('sun.sun', 'elevation') }}"
        unit_of_measurement: '°'
        friendly_name: "Elevation"
        
  - platform: epsonworkforce
    host: 192.168.x.x
    monitored_conditions:
    - black
    - yellow
    - magenta
    - cyan

  - platform: epsonworkforce
    host: 192.168.x.x
    monitored_conditions:
    - black
    - photoblack
    - yellow
    - magenta
    - cyan

  - platform: enphase_envoy
    ip_address: 192.168.x.x
    monitored_conditions:
      - production
      - daily_production
      - seven_days_production
      - lifetime_production

  - platform: syncthru
    resource: http://192.168.x.x
    name: samsung-printer

  - platform: nut
    host: 192.168.x.x
    port: 3493
    alias: upsname
    username: login
    password: password
    resources:
      - ups.status.display
      - ups.load
      - input.voltage
      - battery.runtime

# Binary Sensors
binary_sensor:

  - platform: mqtt
    name: 'Motion'
    state_topic: 'home/motion'
    device_class: motion
    off_delay: 3

  - platform: mqtt
    name: 'Ceiling'
    state_topic: 'home/ceiling'
    device_class: motion
    off_delay: 3

  - platform: mqtt
    name: 'Door1'
    state_topic: 'home/door1'
    device_class: door

  - platform: mqtt
    name: 'Door2'
    state_topic: 'home/door2'
    device_class: door

# Media Players
media_player:
  - platform: squeezebox
    host: 192.168.x.x
    
  - platform: squeezebox
    host: 192.168.x.x

  - platform: squeezebox
    host: 192.168.x.x

  - platform: squeezebox
    host: 192.168.x.x

# Device Tracker
device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.x.x/xx
    track_new_devices: yes
    interval_seconds: 20
    consider_home: 60

life360:
  accounts:
    - username: !secret life360_username
      password: !secret life360_password
  driving_speed: 30
  interval_seconds: 10
  max_gps_accuracy: 100

# Text to speech
tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    base_url: https://url.ui.nabu.casa
    service_name: google_say
    language: 'en'

python_script:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

My problem with the Lovelace interface not the components. Try renaming it and I believe it will rebuild on restart.

I think I have a similar issue brand new install 103.0. The initial startup goes well but once I restart HA the front web doesn’t load. How can I install previous versions?

Doing a complete reboot of the host worked for me. you may want to give that a try if you haven’t yet.

I have tried everything but 103 version breaks the lovelace homepage. Containers seem to run fine but the lovelace interface is not responding. I have checked the config against 103 and it passed it.
Restarted the host, relaunched the container many times but so far the only way I can make it work is to revert to 102.3. Some underlying breaking change is at play…

Well reboot really didn’t help me initially, however; I did an update to hassos and it solved the problem.

Ok I’ve found the culprit.

I could not upgrade homeassistant whatever I tried. So I totally emptied the configuration.yaml file (except for the required lines), restarted in degraded mode and did the upgrade which went to the end well. Then tried to add integrations one after the other to see what was causing it to previously hang.

This is a generic method which I highly recommend as I think that all breaking changes cannot be properly identified with each new version.

I found that the following entry was crashing the GUI with every restart:

huawei_lte:
  - url: http://192.168.x.x/
    username: login
    password: password

notify:
  - platform: huawei_lte
    name: huawei_lte
    recipient: "+0000000000"

After some reading I realized that huawei_lte had some small syntax changes and had to be modified to this:

huawei_lte:
  - url: http://192.168.x.x/
    username: login
    password: password
    notify:
      recipient: "+0000000000"

After this I could send notifications, connect to the lte router fine and add all other devices without issue.

Hope this will help!!