Repository navigation
v1.7.0
Stewart 1.7 helps you find out why an automation fired, or why it did not: trace one app line by line, give it a log
level of its own, and see in make status when each subscription last fired and when each schedule runs next.
Highlights
Trace an app. make run TRACE=porch-light (also make watch and make debug) logs what reaches the app and what
it does with it, at any log level:
… TRACE [porch-light] Event received {"subscription":"state_change exact:binary_sensor.porch_motion","id":"w0:3","change":"on → off"}
… TRACE [porch-light] Event received {"subscription":"state_change exact:binary_sensor.porch_motion","id":"w0:3","change":"off → on"}
… TRACE [porch-light] Handler called {"subscription":"state_change exact:binary_sensor.porch_motion","id":"w0:3"}
… TRACE [porch-light] Service call sent {"service":"light.turn_on","target":{"entity_id":["light.porch"]}}
… TRACE [porch-light] Service call answered {"service":"light.turn_on","outcome":"succeeded","took":"42ms"}
An event that is received but never reaches the handler was stopped by an operator, such as a filter() that said
no. apps.porch-light.trace: true in stewart.yaml keeps an app traced, and a reload applies it.
One app's status. make status APP=porch-light lists each of the app's subscriptions with how many events
reached it and how many got through to the handler, and each schedule and timer with its next and last run.
WATCH=1 redraws it every two seconds and keeps trying while Stewart restarts. The Apps table now shows when each
app's handler last ran and when its next schedule is due.
Every log line names its source. INFO [porch-light] …, [broker], [@shared] or [worker 0] come right after
the level, and lines Stewart writes about an app, such as App failed, carry that app's tag. apps.<id>.log_level
makes one app say more, or less, than the rest. The new Logs
guide explains the line, the JSON fields and tracing.
Also new
- An
mqttrow inmake statusand fourstewart_mqtt_*metrics show the MQTT connection, its outages and dropped
messages. Warnings for dropped messages are sampled instead of one per message. - A
generatedrow shows whether the generated classes still match Home Assistant. Stewart checks again after each
reconnect, when entities are added or removed, and after each reload, somake generatethenmake reloadclears
it. stewart status --jsonholds every subscription and schedule with their figures, and the admin API's apps gain
last_handled_atandnext_run_at.
Security
Stewart now requires PHP 8.5.12, the security release that fixes two Core advisories (GHSA-w8hw-w9fx-j79w and
GHSA-6wmf-4rv5-p3rp). The runtime image already runs it.
Upgrading
Run make upgrade VERSION=1.7, then restart Stewart. make status and the other control targets need the daemon on
1.7 too. Anything that parses line logs needs to allow for the new [source] tag. To get TRACE, APP and WATCH,
copy them from the skeleton's Makefile. The
upgrading guide has the details.
Every change is in the changelog.