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. Controllers
  3. Vera
  4. Arm / by-pass message not broadcast-ed to MySensor module

Arm / by-pass message not broadcast-ed to MySensor module

Scheduled Pinned Locked Moved Vera
4 Posts 2 Posters 1.8k Views 1 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.
  • BartEB Offline
    BartEB Offline
    BartE
    Contest Winner
    wrote on last edited by
    #1

    I was busy creating a security type of sensor which i needed to set in the arm and by-pass mode.
    However Vera showed the correct status (arm/by-pass) the sensor was not aware that it was by-passed.

    Looking trough the Vera: I_Arduino.lua code i did figure out the setArmed on caused a local variable update.

    Bij adding a sendCommand function call my mysensor gets an update on setArmed. This is the new code (MySensors version 1.4.1):

    -- Security commands
    function setArmed(device, newArmedValue)
       -- Line added by BartE
    	sendCommand(luup.devices[device].id,"ARMED",newArmedValue)
       -- Add ends
    	setVariableIfChanged(tVarTypes.ARMED[2], tVarTypes.ARMED[3], newArmedValue, device)
    end
    

    In a sketch running on an Arduino one can handle the setArmed like this

    void incomingMessage(const MyMessage &message) {
        if (message.type==V_ARMED) {
               bArmed = message.getBool();
               // Do something wise with the global bArmed boolean
       }
    }
    
    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      You might very well be the first one using the ARMED command. :)

      See my previous comment about creating a pull request for this change so others can use it as well.

      1 Reply Last reply
      0
      • BartEB Offline
        BartEB Offline
        BartE
        Contest Winner
        wrote on last edited by
        #3

        Nice :) I did make both pull requests

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          Both merged! Thanks.

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


          25

          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