Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. send alert from sensor
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

send alert from sensor

Scheduled Pinned Locked Moved Development
4 Posts 3 Posters 1.5k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nicoN Offline
    nicoN Offline
    nico
    wrote on last edited by
    #1

    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.

    Boots33B 1 Reply Last reply
    0
    • nicoN nico

      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.

      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      1
      • nicoN Offline
        nicoN Offline
        nico
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Qu3Uk
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          14

          Online

          11.7k

          Users

          11.2k

          Topics

          113.0k

          Posts


          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular