I have a serial device that seems to stop working after a while and I can see exactly when that happens because there is an error message in the HA OS Host log.
I want to create an HA Automation when that error message string appears in the Host log file. Is that possible?
I am not after the HA Core logs.
I want to read and trigger an event based on the HA Host log.
I can see the log via Settings->System->Logs->Host
I don’t use HAOS so I can’t confirm if the system can access that log file or not. Assuming it can, you can just use the file integration to read the most recent line in the log. Then you can build an automation off the state of that sensor.
I have no idea how the HA UI is able to pull the Host log to display it when using HAOS.
But so far everything I have seen seems to suggest that only the HA core log is accessible.
Found your post looking for the exact same thing. Did you find a solution?
I’m having usb->serial devices losing connection on my pi4 (which seem to fail al lot more after some HA and HAOS updates) Loosing connection and not reporting their values.
I have some last_updated and last_changed event automations, but reading the actual host log would be easier and quicker
Never managed to find anyone who could tell me how I can get HA to read its own host logs to trigger an Automotion/event.
My guess is that any parsing/processing on the host log side would have to be managed outside of HA on the host itself. And then somehow trigger an event that HA can pick up on.
HA seems to allow only its core log to be processed from within HA. Which sort of makes sense, but didnt help.