Anyone know what happened to the error log API?
It’s still listed in the official documentation as /api/error_log. I know the physical log was deprecated, but nothing is documented about the API going away (logs are still accessible in the UI).
FYI, Claude taught me how to bypass the apparently-deprecated /api/error_log REST endpoint entirely and instead use this WebSocket approach:
Connect to ws://$HA_HOST:$HA_PORT/api/websocket
Authenticate with your long-lived token
Send the command, {"id":1,"type":"system_log/list"}
Parse the JSON response.
Claude also authored this JSON response parser python script:
import json, datetime
with open('/tmp/ha_ws_log.json') as f:
lines = f.readlines()
result_line = [l for l in lines if '"type": "result"' in l or '"type":"result"' in l]
d = json.loads(result_line[0])
for e in d['result']:
ts = e.get('timestamp')
dt = datetime.datetime.fromtimestamp(ts) if ts else None
msg = ' '.join(e['message']) if isinstance(e.get('message'), list) else e.get('message', '')
print(dt, '|', e['name'], '|', e['level'], '| count:', e.get('count'), '|', msg[:200])