G-Two / smoke-x-receiver

An ESP32+LoRa application to bridge a ThermoWorks Smoke X remote thermometer to Home Assistant via MQTT
MIT License
14 stars 5 forks source link

MQTT failure after restart HA #19

Open thomasshawn opened 7 months ago

thomasshawn commented 7 months ago

As above, was working fine. Busy making new dashboard for it and rebooted HA for some updates when I did it lost the device. All sensors show as unavailable. All other mqtt devices are working. I see the traffic on mqtt Explorer I rebooted the lora and also went as far as to delete the entity from mqtt hoping it would rediscover after reboot of both HA and the Lora device.

Thoughts?

G-Two commented 7 months ago

Is this after a HA reboot or an ESP32 reboot?

Is MQTT discovery and birth message enabled on both sides?

thomasshawn commented 7 months ago

Is this after a HA reboot or an ESP32 reboot?

Is MQTT discovery and birth message enabled on both sides?

Reboot of Home assistant led to the unavailable across all entities of this project. All my other entities still functioning correctly. Not sure how to check the discovery and birth enabled.

Not sure what happened to my previous reply..

thomasshawn commented 7 months ago

Got it working for now and it has survived 2 restarts of both ESP32 and HA.

no clue what fixed it but here's what i did in order

powered off thermoworks device, powered off esp32. rebooted HA. powered everything back on nothing went into mqtt explorer and deleted all smoke-x references to remove any bad commands/topics. checked for retained and all clear--- rebooted

nothing

reset any webui mqtt topics to match those in the initial setup/rebooted. nothing. toggled off mqtt and autodiscovery on the webui. rebooted and then toggled back on, rebooted both esp and HA. nothing. was about to reflash the whole unit when I rebooted everything one last time and it worked.

it's been up now for about 2 hours and hasn't been an issue again.

fingers crossed.

G-Two commented 7 months ago

You can check discovery and birth message settings in the HA MQTT configuration menu. image The birth message will help when HA reboots by signaling the ESP32 to resend the discovery message.