Heart beat check of esp

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
BartSr
Posts: 546
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Heart beat check of esp

Post by BartSr »

I am having several ESP's interfacing sensordata for domoticz.
There's an ESP monitoring DUCO ventilation system.
For some reason that ESP freezes sometimes. Ping remains possible.
I plan to force that ESP to sent every minute a pulse to domoticz which I mention a hartbeat. But how can I monitor that from domoticz or is there another solution?
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 7029
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Heart beat check of esp

Post by waltervl »

If the ESP updates its value to Domoticz every x minutes you can check the last update time and have Domoticz send a notification when it takes too long. You can set this with the notification button on the device widget.
This only works for real sensors like temperature, lux etc.

If it is a switch sensor you can have dzvents check it with thedevice.lastUpdate.minutesAgo attribute.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
franzelare
Posts: 146
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Heart beat check of esp

Post by franzelare »

i implemented exact this, i send a on command from the ESP to domticz every minute and use a LUA script when the device changes to send an off command back
in the ESP i run a timer, that when it doesn's see the off command back for 5 minutes it automatically reboots
the only issue i have is that on the reboot the IO will be set back to default... like for my ventilation it will jump on to high mode for a few seconds on a reboot before pulling the old status again from domoticz and going to the right speed level

p.s. i do the same on the mysensor arduino's with RF24 connection to my domoticz to control my curtains
BartSr
Posts: 546
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Heart beat check of esp

Post by BartSr »

@Walter
Thanks for this suggestions which looks reliable to me.

@Franzelare
Thanks for sharing your solation but if the esp freezes it also cannot do a reset though?
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
franzelare
Posts: 146
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Heart beat check of esp

Post by franzelare »

i see that the ESP is sometimes not communicating out but still be able to reset base on internal timerloop
never seen a full freeze so far
BartSr
Posts: 546
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Heart beat check of esp

Post by BartSr »

Well, it can according my experience.
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
Post Reply