Skip to content
  • MySensors
  • 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. My Project
  3. Need help with MeSensors library sub-type values

Need help with MeSensors library sub-type values

Scheduled Pinned Locked Moved My Project
5 Posts 3 Posters 1.8k Views 2 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.
  • T Offline
    T Offline
    timota
    wrote on last edited by
    #1

    Hi All,

    im a new to mysensors library but want to learn it. I found in documentation that (as example) Motion sensor can use 2 types of values.
    S_MOTION 1 Motion sensors V_TRIPPED, V_ARMED

    So my question is: how sub-type V_ARMED can be used? via incomingMessageCallback ? Can this value be send from Controller to sensor to pass/disable Tripped checks?

    I saw many screenshots with Motion (Vera controller) sensor and all of them contains ARM and BYPASS buttons, but what the purpose of those buttons?
    Sorry for the newbie questions, but can someone explain this for me.
    Thanks

    J barduinoB 2 Replies Last reply
    0
    • T timota

      Hi All,

      im a new to mysensors library but want to learn it. I found in documentation that (as example) Motion sensor can use 2 types of values.
      S_MOTION 1 Motion sensors V_TRIPPED, V_ARMED

      So my question is: how sub-type V_ARMED can be used? via incomingMessageCallback ? Can this value be send from Controller to sensor to pass/disable Tripped checks?

      I saw many screenshots with Motion (Vera controller) sensor and all of them contains ARM and BYPASS buttons, but what the purpose of those buttons?
      Sorry for the newbie questions, but can someone explain this for me.
      Thanks

      J Offline
      J Offline
      jkandasa
      Plugin Developer
      wrote on last edited by
      #2

      @timota said:

      Hi All,

      im a new to mysensors library but want to learn it. I found in documentation that (as example) Motion sensor can use 2 types of values.
      S_MOTION 1 Motion sensors V_TRIPPED, V_ARMED

      So my question is: how sub-type V_ARMED can be used? via incomingMessageCallback ? Can this value be send from Controller to sensor to pass/disable Tripped checks?

      I saw many screenshots with Motion (Vera controller) sensor and all of them contains ARM and BYPASS buttons, but what the purpose of those buttons?
      Sorry for the newbie questions, but can someone explain this for me.
      Thanks

      @timota I do not know how vera controller works, But can answer how to use your incomingMessageCallback for different sensor variable types. Here is the example code.

      void incomingMessage(const MyMessage &message) {
          if (message.sensor == YOUR_SENSOR_ID) {
              if (message.type == V_TRIPPED) {
                //Do somthing here
              } else if (message.type == V_ARMED) {
                //Do somthing here
              }
          }
      }
      
      1 Reply Last reply
      0
      • T Offline
        T Offline
        timota
        wrote on last edited by
        #3

        @ jkandasa Many thanks for your answer.

        So this means that these 2 values can be simply send/receive from/to Controller and so can be processed on sensor side. Am right?

        1 Reply Last reply
        0
        • T timota

          Hi All,

          im a new to mysensors library but want to learn it. I found in documentation that (as example) Motion sensor can use 2 types of values.
          S_MOTION 1 Motion sensors V_TRIPPED, V_ARMED

          So my question is: how sub-type V_ARMED can be used? via incomingMessageCallback ? Can this value be send from Controller to sensor to pass/disable Tripped checks?

          I saw many screenshots with Motion (Vera controller) sensor and all of them contains ARM and BYPASS buttons, but what the purpose of those buttons?
          Sorry for the newbie questions, but can someone explain this for me.
          Thanks

          barduinoB Offline
          barduinoB Offline
          barduino
          wrote on last edited by
          #4

          @timota

          Picture this scenario:

          You have an alarm system for you house based on MySensors.

          You have sensors to detect if the door and windows are open. Once they are open you trigger some kind of alarm if the system is not turned off.

          Also you might want to be able to open the windows or door and have the alarm off.

          The V_TRIPPED would detect if the door or windowsa are opened and the V_ARMED would control if the alarm is on or off.

          So ye, the V_ARMED would be turned on and off via incoming message and you would find out if you need to trigger the alarm by looking t both variables.

          As for implementation examples you have plenty under /libraries/MySensors/Examples.

          There is also one example wich has fake implementations of almost all sensors . This was designed to help developers test or implement controllers but it has also been a nice learning exercise.

          Cheers

          1 Reply Last reply
          0
          • T Offline
            T Offline
            timota
            wrote on last edited by
            #5

            yes. that's it what i want to know.
            Thanks.

            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.1k

            Posts


            Copyright 2025 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
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular