send alert from sensor
-
Hello, i build a sensor and i want to send alert to gateway if problem is detected.
How to send a variable to gateway?
In my mind, i send a variable to gateway and use lua to treat (send a mail for example).
Thank you for your help.
-
@nico What sort of sensor is it, could you not just use a lua script on the data it is already sending. Another option could be to add a switch (S_BINARY) to the sensor and have your node turn it on if a problem is detected. You could then have your lua code attached to the switch on change event.
-
it's a door sensor, the sensor test 3 times to activate relay and if nothing happen a variable(alert) is put to 1. I want to send this variable(for example) and generate an alert in lua. If you have another idea..
Thanks
-
I was wondering about this but currently don't have any nodes that need to report errors. I thought though I would wrap the error in a string including a prefix as well as importance of the error and send it back to the controller via S_VAR
I use MQTT gateway and I would have NodeRed listen out for any string with the prefix and send me an alert or log the event depending on the importance.
Just an idea at the moment but might help you.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
Home Assistant/MySensors quirks
Development • 12 days ago • OldSurferDude 12 days ago -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51