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-Alpah2
version (will be released soon).
In node table you can seeStatus
(Up/Down) andLast seen
(ex: 3 minutes ago)
We can achieve this requirement in two ways.- Configure
Rule
+Send SMS Operation
.- Change
Nodes alive check interval
to 15 minutes. Default is 30 minutes. Available at Settings->System->MyController. - Configure 2
Send SMS
operations. first one to sendfailure
second one to sendrestored
message - Create 2 rules.
First one to triggerfailure
[Condition type:State
,Node
, Node name,== Down
, Dampening:None
. Select operation #1].
Second one to triggerrestored
[Condition type:State
,Node
, Node name,== Up
, Dampening:None
. Select operation #2].
In both the casesIgnore duplicate
should be checked to avoid multiple messages.
- Change
- Via the script
- Create
Rule
with script condition orTimer
with script operation - You can write your own script to check node status, you can use
Last seen
to get more accurate
Scripting is not documented well. I will update the documents along with0.0.3-Alpha2
release
- Create
- Configure
-
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.