Trigger Email if Input not recevied since x minutes?

#1

Hi,

I am not great at javascript programming so apologies.

I have a battery operated weather station that I want to know when the batteries have died so I can replace them.

The weather station is sending data to my MQTT server every 20 minutes and into Node-Red.

I am trying to think of some way of writing a function that will send me an email if a "message" hasn't been received in the last 20 minutes.

Can anyone share how they would approach this please?

Trev

Message ON/OFF in case one sensor Stop working
#2

Hi @trevorjdaniel

Take a look at the Trigger node. It can be used to send a message if it doesn't receive one within a configurable time interval - exactly what you want.

Configure the node to send nothing when a message is received, then wait for 25 minutes (or how ever long a grace period you want to allow) and send (whatever payload you want).

The key part is to tick the box extend delay if new message arrives.

Nick

1 Like
#3

Perfect!

Many thanks!!!

Trev