Configure an alarm if no communication from sensor in past x minutes
Typically my sensors send updates every 4 minutes and if nothing changes every 10 minutes. With several sensors on a node this results in usually the node communicating withe gateway/controller every minute. If the controller does not receive any messages from a node after 15 minutes I would like to send an SMS message - "Communication lost with Node 123 - possible power failure". Only 1 message should be sent no matter how long the communication failure lasts. After the node establishes communication again I would like to send an SMS - "Communication with Node 123 has been restored."
How would you suggest accomplishing this? Do you have the concept of a node being "online" or "offline"? Could the timers be used?
@bpair This support available from
0.0.3-Alpah2version (will be released soon).
In node table you can see
Last seen(ex: 3 minutes ago)
We can achieve this requirement in two ways.
Send SMS Operation.
Nodes alive check intervalto 15 minutes. Default is 30 minutes. Available at Settings->System->MyController.
- Configure 2
Send SMSoperations. first one to send
failuresecond one to send
- Create 2 rules.
First one to trigger
Node, Node name,
== Down, Dampening:
None. Select operation #1].
Second one to trigger
Node, Node name,
== Up, Dampening:
None. Select operation #2].
In both the cases
Ignore duplicateshould be checked to avoid multiple messages.
- Via the script
Rulewith script condition or
Timerwith script operation
- You can write your own script to check node status, you can use
Last seento get more accurate
Scripting is not documented well. I will update the documents along with
Those sound like good options. I think the "last seen" is really useful on bot the node and sensor. I would only want to send notification for specific sensors or nodes and ideally the timing could be configurable, e.g. sensor x: 15 minutes, sensor b: 60 minutes.
Probably the custom script that runs every couple of minutes and checks the last seen is the most flexible approach.