Skip to content

Instantly share code, notes, and snippets.

View EpicLPer's full-sized avatar

EpicLPer EpicLPer

View GitHub Profile
EpicLPer /
Last active January 5, 2024 17:38
Restart Zigbee2MQTT Home Assistant Add-On upon Adapter Crash

I'm using both Home Assistant and Zigbee2MQTT as my main Smarthome drivers, however I'm having a bit of an issue with my Sonoff Zigbee-P Dongle where it tends to crash randomly, often at night, leaving people in the house without any lights responding.

I've created a small automation which automatically restarts the Z2M addon in order to reconnect to the stick. Hope it helps!

As a note: This is of course not a "fix". The real fix is to get better hardware/fix the crashing stick issue. This is more a workaround to get things rolling without a huge downtime!

# -----------------------------------------------------------
# --- You might have to set Zigbee2MQTT to "debug" output ---
# ---      in "Settings" > "Advanced" > "Log level"!      ---