On two separate occasions, HA has decided to press EVERY button and to toggle several switches. While a little humorous (to me) when the car randomly honked it’s horn and opens the trunk, it was less humorous to the mrs. when the water was turned off. Other lights, etc were affected as well. Note that the effect is across different integrations including tuya, tesla, ZHA, … so it seems like the stimulus for the actions is coming from deep inside HA.
After HA runs amok, i can’t log into it, so can’t examine to logs. or debug. And in HAOS it seems like to logs are wiped on reboot(?) so I have little to go on.
I’ve using HA for several years in Supervised mode. I recently switched to HAOS. No other major changes (always lots of minor changes) have been made.
@ShadowFist Interesting. I did know that HA has that “feature”. But I checked all my automations for any turn_on action. Interestingly, not only do I not have any homeassistant.turn_on but I also happen to have no button.turn_on anywhere in any automation. But I like this general idea. I wonder if there is something else going on where bad formatting on my part is being interpreted as a system-wide wildcard within HA.
@sparkydave I thought of that and will do it once I hook up a console terminal. However I don’t see any other sign of nefarious use. Also - I am perhaps confused. If I change my HA user password, that only affects the user password inside the docker image of HAOS. Do I need to take steps to change password(s) on the bare metal? How?
The homeassistant action has other options, like homeassistant.toggle. Maybe search for that in your automations and scripts too. EDIT: search inside blueprints if you’re using those, too.
I checked all homeassistant action types. I don’t ever use those.
But I have a little more info. It happened again but did not lock up the system so I was able to gather a bit more info. Also, the effect was not as widespread (water stayed on!). Here’s what I have:
at least 2 covers were pressed, 1 alarm_control_panel and 1 switch across three different integrations that I have found so far.
they did not all occur simultaneously: the earliest was at 19:21:48 and the latest at 19:22:14
I happen to list all triggered automations in a dashboard. The only automations triggered in this interval were at 19:06 (well before) and 21:31 (way, way after)
Some interesting lines in the log: 19:22:21.378 ERROR (MainThread) [homeassistant.components.websocket_api.commands] Refusing to allow mqtt to subscribe to event *
19:21:14.188 WARNING (MainThread) [homeassistant.components.homeassistant] The service homeassistant.turn_off does not support entities binary_sensor.ac_on, binary_sensor.furnace_on
IMHO, the first is not related (even though I don’t know where that comes from), but because there is a system wide wildcard here I include it here just in case.
The second line is more interesting. To clarify, I do define furnace_on and ac_on in config.yaml and use them sparingly in automations, however find . -type f -exec grep homeassistant.turn_on {} \; from the homeassistant directory yield no results. Really – I don’t invoke any homeassistant actions.
Is it possible that other integrations or the core invoke hmeassistant actions?
I doubt an integration would do that, certainly not a core integration. Maybe a poorly written custom integration might do that, but even that sounds implausible.
Check the Activity screen from the sidebar & filter it for the 19:00 - 19:30 timespan. If the homeassistant command was triggered from somewhere within HA, you’ll see something like “switch.xxx turned off by …”.
My money’s still on some blueprint, since I’ve seen a fair few which use homeassistant actions. The Activity screen should help point you in the right direction, so start there.