Hello to all,
this is my first post in the Community, if there is something wrong, please tell me ![]()
I Try to check the presence of Pi-Pico-Clients in my network. They have several functions like gathering temperatures etc. Unfortunately some of them have hangup’s sometimes.
I have implemented a “ClientID.LifeCounter” in the software of the clients. The Counter starts with value 10000 at startup of the Pico and then increment this Counter at least all 30 seconds. The Counters are published on a running MQTT-DB on my HA.
Now I try to check on my HA with an automation every 2 minutes, if this counters are increasing. There I have a second value for each client “ClientID.LifeCounterOld”, that is set everytime the automation runs. So I can compare the “ClientID.LifeCounterOld” with “ClientID.LifeCounter”. If they are equal, the client has a hangup and I want to restart it by a Shell PM that controls the powersupply for the client.
- The Counter on the client is running and will be published to the MQTT-DB
- I have a automation that runs every 2 minutes
- I can reset the power for the Pico-clients
- I can access the entities of the MQTT-DB, so I can use the Counters
My problem is to code the comparison of the two counters (“ClientID.LifeCounter” and “ClientID.LifeCounterOld”)
I have tried to use the editor for the automation as well as YAML but I didn’t succeded ![]()
Best regards and I will be happy for every idea !!!
Holger