I have a situation where an ESP32 device on micro-python is publishing temperature data to MQTT https://github.com/AnthonyKNorman/Xiaomi_LYWSD03MMC_for_HA
It appear to have a function that makes it restart if disconnected from MQTT. Somehow it stops publishing the data but probably stays connected to MQTT because I need to power cycle to resume its operations. Unfortunately I cannot figure out the micro-python part so I am trying to find a way to write a script in home assistant to temporarily disconnect the device to force it to reboot.
Anyone have a suggestion?
I am not a fluent programmer.
Not that I am not a programmer but I am not fluent at micro-python. I did try ESPHome but was not able to get it setup for my devices. I have Xiaomi bluetooth devices arround the house, the ESP32 picks up the info from the devices via bluetooth and then sends the info to MQTT via wifi. The Github link I indicated above was very simple to setup and worked right away. The only thing is after some time it stops publishing and I have to power cycle the ESP32 to bring it back. If I was fluent in micro-python I would write a function that force it to reboot every 24 hours. That would solve my problem.