HA just stopped working

Hi,

I am using HassOS on a RPI3. HA stopped working on the weekend and I am trying to find out what happened. I can still connect via SSH.

I did not change anything, neither in my LAN nor on the RPi itself. I was not even using my computers at the weekend :slight_smile:
Some background:

  OS Version:               Home Assistant OS 5.13
  Home Assistant Core:      2021.4.3

ha > info
arch: armv7
channel: stable
docker: 19.03.15
features:
- reboot
- shutdown
- services
- network
- hostname
- timedate
- hassos
hassos: "5.13"
homeassistant: 2021.4.3
hostname: hassio
logging: info
machine: raspberrypi3
operating_system: Home Assistant OS 5.13
state: running
supervisor: 2021.06.0
supported: true
supported_arch:
- armv7
- armhf
timezone: Europe/Berlin
ha > login
# docker ps
CONTAINER ID        IMAGE                                                  COMMAND                  CREATED             STATUS              PORTS                                            NAMES
680eec6e1bc0        ghcr.io/hassio-addons/wireguard/armv7:0.5.1            "/init"                  36 hours ago        Up 36 hours         0.0.0.0:51820->51820/udp                         addon_a0d7b954_wireguard
ff0949422ecc        ghcr.io/hassio-addons/nginxproxymanager/armv7:0.10.1   "/init"                  36 hours ago        Up 36 hours         0.0.0.0:80-81->80-81/tcp, 0.0.0.0:443->443/tcp   addon_a0d7b954_nginxproxymanager
c879c7b7644a        hassioaddons/appdaemon3-armv7:5.0.1                    "/init"                  36 hours ago        Up 36 hours         0.0.0.0:5000->5000/tcp, 0.0.0.0:5050->5050/tcp   addon_a0d7b954_appdaemon3
d92d80253b65        homeassistant/armv7-addon-ssh:9.1.3                    "/init"                  36 hours ago        Up 36 hours                                                          addon_core_ssh
2d0a68f6bc52        homeassistant/armv7-addon-mariadb:2.3.0                "/init"                  36 hours ago        Up 36 hours                                                          addon_core_mariadb
d6bd67977333        homeassistant/armv7-hassio-multicast:2021.04.0         "/init"                  36 hours ago        Up 36 hours                                                          hassio_multicast
ce9c5bcdb42b        homeassistant/armv7-hassio-cli:2021.05.1               "/init /bin/bash -c …"   36 hours ago        Up 36 hours                                                          hassio_cli
e94335a6faae        homeassistant/armv7-hassio-audio:2021.04.0             "/init"                  36 hours ago        Up 36 hours                                                          hassio_audio
588b19e167b7        homeassistant/armv7-hassio-dns:2021.04.0               "/init"                  36 hours ago        Up 36 hours                                                          hassio_dns
c08596db4dde        homeassistant/armv7-hassio-supervisor:latest           "/init"                  2 days ago          Up 36 hours                                                          hassio_supervisor
a9cedbc6d532        homeassistant/raspberrypi3-homeassistant:2021.4.3      "/init"                  2 months ago        Up 15 minutes                                                        homeassistant
7d220738d776        homeassistant/armv7-hassio-observer:2020.10.1          "/init"                  2 months ago        Up 36 hours         0.0.0.0:4357->80/tcp                             hassio_observer

For some reason it looks like it cannot connect to the services (IPP printer, Fritzbox, MELCloud, …) anymore, a ping command shows that they are online and I can reach them from other computers just fine.

bash-5.0# cat home-assistant.log 
2021-06-14 09:35:31 WARNING (MainThread) [homeassistant.loader] You are using a custom integration duofern which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-14 09:35:31 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'duofern'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'duofern'
2021-06-14 09:35:31 WARNING (MainThread) [homeassistant.loader] You are using a custom integration helios which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-06-14 09:35:31 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'helios'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'helios'
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform hassio is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of duofern is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of media_source is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2021-06-14 09:35:51 WARNING (MainThread) [homeassistant.setup] Setup of system_health is taking over 10 seconds.
2021-06-14 09:35:55 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2021-06-14 09:35:55 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2021-06-14 09:35:55 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2021-06-14 09:35:55 ERROR (MainThread) [snitun.client.client_peer] Challenge/Response error with SniTun server
2021-06-14 09:35:55 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server
2021-06-14 09:35:56 WARNING (SyncWorker_0) [pyfritzhome.fritzhome] login failed 0000000000000000
2021-06-14 09:35:56 WARNING (SyncWorker_1) [pyfritzhome.fritzhome] login failed 0000000000000000
2021-06-14 09:36:00 WARNING (MainThread) [homeassistant.components.homekit] The 'auto_start' option near /config/configuration.yaml:151 is deprecated, please remove it from your configuration
2021-06-14 09:36:00 ERROR (MainThread) [homeassistant.components.sensor] The openweathermap platform for the sensor integration does not support platform setup. Please remove it from your config.
2021-06-14 09:36:00 ERROR (MainThread) [homeassistant.components.sensor] The nut platform for the sensor integration does not support platform setup. Please remove it from your config.
2021-06-14 09:36:06 WARNING (MainThread) [homeassistant.components.cover] Setup of cover platform opengarage is taking over 10 seconds.
2021-06-14 09:36:06 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Brother-MFC-L2700DW' for ipp integration not ready yet: Invalid response from API: Timeout occurred while connecting to IPP server.; Retrying in background
2021-06-14 09:36:06 WARNING (MainThread) [homeassistant.config_entries] Config entry 'fxxxxxx.org' for melcloud integration not ready yet; Retrying in background
2021-06-14 09:36:07 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.10.11
2021-06-14 09:36:07 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Philips hue' for hue integration not ready yet; Retrying in background
2021-06-14 09:36:11 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform darksky is taking over 10 seconds.
2021-06-14 09:36:11 WARNING (MainThread) [homeassistant.config_entries] Config entry 'FRITZ!Box 7590 (UI)' for upnp integration not ready yet; Retrying in background
2021-06-14 09:36:15 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:36:15 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}")
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 376, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1327, in _render_with_context
    return template.render(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 8, in top-level template code
  File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 407, in getattr
    value = getattr(obj, attribute)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1351, in _fail_with_undefined_error
    raise ex
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1343, in _fail_with_undefined_error
    return super()._fail_with_undefined_error(*args, **kwargs)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 483, in async_render_to_info
    render_info._result = self.async_render(variables, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 378, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
2021-06-14 09:36:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:36:16 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}")' for attribute '_state' in entity 'sensor.phone_line_status'
2021-06-14 09:36:17 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Warn about UPS OG battery runtime' trigger: In 'numeric_state' condition: unknown entity sensor.ups_time_left
2021-06-14 09:36:17 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Warn about UPS battery runtime' trigger: In 'numeric_state' condition: unknown entity sensor.ups_basement_battery_runtime
2021-06-14 09:36:28 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2021-06-14 09:37:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:37:29 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 82, in async_scan
    await self._process_entries()
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 129, in _process_entries
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 131, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step
    result: dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/fritzbox/config_flow.py", line 140, in async_step_ssdp
    if entry.data[CONF_HOST] == host:
KeyError: 'host'
2021-06-14 09:38:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:39:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:40:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:41:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:42:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:43:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:44:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:45:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
{% endif %}'
2021-06-14 09:46:16 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'None' has no attribute 'attributes' when rendering '{% if is_state("sensor.phone", "idle") %}
    Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
    Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
{% elif is_state("sensor.phone", "ringing") %}
    Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
{% else %}
    Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})

Please help - I don’t know where to look further.

Thanks.

The first thing I would do, if this were me, is get a backup of my HA since you have SSH access. Once that’s done I would tackle those errors by moving the template file out of the structure and restarting HA. Basically start chipping away at files until you find what gets you access, starting with anything that changed recently. It’s possible that an add-on that you are using no longer works and was updated in newer releases of HA (I see you are on one that is a couple months old).

Worst case scenario is that you could move your various config files to a different folder so you can at least boot into HA and update it to see if that helps, then start putting the files back in small batches until you find the batch that is giving you problems.

1 Like

It self-healed. I don’t know why - but I took the chance to remove some of my long outdated integrations and errors.

Thanks.