Hello,
I had to reinstall HAOS on my RPI 3b+ because I was running into some issues yesterday. I reinstalled everything from scratch and moved the data disk to a SSD connected via a SATA - USB3 adapter. I had this configuration running before as well.
After I installed all addons, I started re-doing my automations. I copied over the old automations.yaml, reloaded it and it seemed to work. I had to make a few entity changes as I named some of them differently on the new install, reloaded it and all of a sudden the GUI and samba were unresponsive. After waiting for 20mins I pulled the plug and restarted it.
After the restart, the GUI loaded fine but with some erros in it:
22-01-29 18:42:49 INFO (MainThread) [supervisor.host.manager] Host information reload completed
22-01-29 18:42:57 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config:
22-01-29 18:42:58 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-177' coro=<HomeAssistantWebSocket.async_send_message() done, defined at /usr/src/supervisor/supervisor/homeassistant/websocket.py:210> exception=TypeError('Received message 8:1000 is not str')>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 212, in async_send_message
if not await self._can_send(message):
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 190, in _can_send
self._client = await self._get_ws_client()
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 171, in _get_ws_client
client = await WSClient.connect_with_auth(
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 147, in connect_with_auth
auth_ok_message = await client.receive_json()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_ws.py", line 290, in receive_json
data = await self.receive_str(timeout=timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_ws.py", line 275, in receive_str
raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str")
TypeError: Received message 8:1000 is not str
22-01-29 18:43:15 INFO (MainThread) [supervisor.api.middleware.security] /dns/info access from a0d7b954_nginxproxymanager
22-01-29 18:43:28 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-186' coro=<HomeAssistantWebSocket.async_send_message() done, defined at /usr/src/supervisor/supervisor/homeassistant/websocket.py:210> exception=TypeError('Received message 8:1000 is not str')>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 212, in async_send_message
if not await self._can_send(message):
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 190, in _can_send
self._client = await self._get_ws_client()
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 171, in _get_ws_client
client = await WSClient.connect_with_auth(
File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 147, in connect_with_auth
auth_ok_message = await client.receive_json()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_ws.py", line 290, in receive_json
data = await self.receive_str(timeout=timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_ws.py", line 275, in receive_str
raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str")
TypeError: Received message 8:1000 is not str
22-01-29 18:44:39 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/bus/usb/001/006 - None
22-01-29 18:44:39 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/input/event0 - /dev/input/by-id/usb-046a_0023-event-kbd
22-01-29 18:44:39 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/hidraw0 - None
22-01-29 18:44:39 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/input/event1 - /dev/input/by-id/usb-046a_0023-event-if01
22-01-29 18:44:39 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/hidraw1 - None
22-01-29 18:44:59 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/input/event0 - /dev/input/by-id/usb-046a_0023-event-kbd
22-01-29 18:44:59 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/hidraw0 - None
22-01-29 18:44:59 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/input/event1 - /dev/input/by-id/usb-046a_0023-event-if01
22-01-29 18:44:59 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/hidraw1 - None
22-01-29 18:44:59 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.REMOVE hardware /dev/bus/usb/001/006 - None
22-01-29 18:45:04 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/bus/usb/001/007 - None
22-01-29 18:45:06 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/input/event0 - /dev/input/by-id/usb-046a_0023-event-kbd
22-01-29 18:45:06 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/hidraw0 - None
22-01-29 18:45:07 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/input/event1 - /dev/input/by-id/usb-046a_0023-event-if01
22-01-29 18:45:07 INFO (MainThread) [supervisor.hardware.monitor] Detecting HardwareAction.ADD hardware /dev/hidraw1 - None
22-01-29 18:46:02 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info
22-01-29 18:46:03 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /supervisor/info
The Observer stated that the Supervisor was connected, but unsupported and unhealthy. I rebooted the host to have a clean start. UI is loading fine, but the Observer still says the same as before. I looked at it once before it froze up and everything was in the green.
Info page:
System Health
version: core-2021.12.10
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.63-v8
arch: aarch64
timezone: Europe/Berlin
logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok
host_os: Home Assistant OS 7.2
update_channel: stable
supervisor_version: supervisor-2021.12.2
docker_version: 20.10.9
disk_total: 223.5 GB
disk_used: 11.2 GB
healthy: true
supported: true
board: rpi3-64
supervisor_api: ok
version_api: ok
installed_addons: Samba share (9.5.1), File editor (5.3.3), Mosquitto broker (6.0.1), room-assistant (2.19.0), Nginx Proxy Manager (0.11.0), MariaDB (2.4.0), AdGuard Home (4.4.3), InfluxDB (4.3.0), deCONZ (6.11.1)
dashboards: 1
resources: 0
views: 1
mode: storage
api_endpoint_reachable: ok
automations.yaml:
- id: '1609259348750'
alias: Motion Schlafzimmer
description: ''
trigger:
- platform: state
entity_id: binary_sensor.bewegungsmelder_schlafzimmer
to: 'on'
condition:
- condition: state
entity_id: light.schlafzimmerlampen
state: 'off'
- condition: time
after: '15:00:00'
before: '11:00:00'
action:
- service: light.turn_on
data: {}
entity_id: light.schlafzimmerlampen
- delay: 00:02:00
- service: light.turn_off
data: {}
entity_id: light.schlafzimmerlampen
mode: single
- id: '1609260231487'
alias: Flurlicht
description: ''
trigger:
- platform: state
entity_id: binary_sensor.haustursensor
to: 'on'
condition:
- condition: state
entity_id: light.flurlampe
state: 'off'
action:
- service: light.turn_on
data: {}
entity_id: light.flurlampe
- delay: 00:03:00
- service: light.turn_off
data: {}
entity_id: light.flurlampe
mode: single
- id: '1609859284662'
alias: 'Door notification '
description: ''
trigger:
- platform: state
entity_id: binary_sensor.haustrsensor
to: 'on'
condition:
- condition: state
entity_id: person.aria
state: not_home
action:
- service: notify.mobile_app_oneplus_8_app
data:
message: 'Haustür würde geöffnet! '
mode: single
- id: '1624152794270'
alias: Motion Wohnzimmer
description: ''
trigger:
- platform: state
to: 'on'
entity_id: binary_sensor.bewegungsmelder_wohnzimmer
condition:
- condition: state
entity_id: switch.stehlampe
state: 'off'
- condition: or
conditions:
- condition: not
conditions:
- condition: state
entity_id: media_player.sony_kd_65xf9005
state: playing
- condition: not
conditions:
- condition: state
entity_id: media_player.libreelec
state: playing
- condition: time
after: '15:00:00'
before: '11:00:00'
action:
- service: switch.turn_on
target:
device_id: c86f692de02f25ae51bda726d1d9777c
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
device_id: c86f692de02f25ae51bda726d1d9777c
mode: single
- id: '1643210895367'
alias: Tado Offset Adjust Wohnzimmer
trigger:
- platform: state
entity_id:
- sensor.thermometer_wohnzimmer
- sensor.wohnzimmer_temperature
condition:
- condition: template
value_template: '{% set tado_temp = states(''sensor.wohnzimmer_temperature'')|float(20)
%} {% set room_temp = states(''sensor.thermometer_wohnzimmer'')|float(20) %}
{{ (tado_temp - room_temp) | abs > 0.5 }}
'
action:
- service: tado.set_climate_temperature_offset
target:
entity_id: climate.wohnzimmer
data:
offset: '{% set tado_temp = states(''sensor.wohnzimmer_temperature'')|float(20)
%} {% set room_temp = states(''sensor.thermometer_wohnzimmer'')|float(20)
%} {% set current_offset = state_attr(''climate.wohnzimmer'', ''offset_celsius'')
%} {{ (-(tado_temp - room_temp) + current_offset)|round(1) }}
'
- id: '1643312278043'
alias: Turn off/on heat if window open
description: ''
trigger:
- platform: state
entity_id: binary_sensor.fenster_wohnzimmer
to: 'on'
for:
hours: 0
minutes: 0
seconds: 45
condition:
- condition: state
entity_id: climate.wohnzimmer_thermostat_hk
state: heat
action:
- service: climate.turn_off
target:
entity_id: climate.wohnzimmer_thermostat_hk
- service: notify.mobile_app_oneplus_8_app
data:
message: 'Heizung ist aus! '
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.fenster_wohnzimmer
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 30
- service: climate.turn_on
target:
entity_id: climate.wohnzimmer_thermostat_hk
- service: notify.mobile_app_oneplus_8_app
data:
message: 'Heizung ist an! '
mode: single
Everything seems to work (some ZigBee sensors aren’t back yet). The log still says “Invalid token for access /supervisor/info”. I wonder:
a) why it crashed when I reloaded the automations?
b) why the observer is red?
c) why I have the token issues (probably related to b)?
Greetings