Deep Sleep Watchdog

My project is a fridge monitoring system, There will be 5 battery-powered NodeMCUs each monitoring a pair of fridges using DS18B20s.

They’ll report to a local Blynk server on a Raspberry Pi. The Pi will also host a Python script which will check the temperatures against alarm thresholds and if necessary send a push notification to my phone, as well as sounding a physical alarm buzzer.

The NodeMCUs deep sleep for 30 minutes at a stretch [thanks again, Pete!] then wake and send temperatures and the battery voltage to Vpins at the server. They’re typically awake for 3-4 seconds per cycle.

I would like the Python script to check the health of the outstations by alerting if any misses two consecutive uploads. I can’t find such a watchdog in the Blynk docs. So I was thinking of getting the NodeMCUs to write to a Vpin a value which changes on each cycle, for the script to check.

This all sounds a bit cumbersome, though - can anyone suggest a more elegant solution?

1 Like

I’d do it in Node-Red.

When you push the temperatures up to Node-Red then you can write a simple function to do the Alarm Thresholds calculation and send an alert if one of the fridges is above or below the threshold.

You can also use the incoming temperature reading to reset a Timeout node. If the Timeout doesn’t get an input of some kind for the specified period then it will output a message that can be used as an alert.

It would look something like this:

As you’re using two sensors per device then presumably you only really need one timeout timer per device, although I’ve used two in this example.


Okaaaay, this is another thing I haven’t used before, but I’ll give it a look - it seems like it’ll do exactly what I need, including for my next project,

I’ll research it well, but brace yourself for more questions!



1 Like

No problem. PM me if you wish, happy to help bring another convert over to the dark side!