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. Development
  3. M_ACK_VARIABLE or M_SET_VARIABLE

M_ACK_VARIABLE or M_SET_VARIABLE

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 844 Views 3 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.
  • LyubomyrL Offline
    LyubomyrL Offline
    Lyubomyr
    wrote on last edited by
    #1

    In servo actuator sketch there is a line

    if (message.type==V_DIMMER) { // This could be M_ACK_VARIABLE or M_SET_VARIABLE 
    

    I do not understand the comment at all. I searched, but I can't find any information about M_ACK_VARIABLE or M_SET_VARIABLE

    Please, help me to understand how can I send these type of messages, why one would like to do that and when is it necessary to use them.

    Can Domoticz sent theses messages?

    BartEB 1 Reply Last reply
    0
    • LyubomyrL Lyubomyr

      In servo actuator sketch there is a line

      if (message.type==V_DIMMER) { // This could be M_ACK_VARIABLE or M_SET_VARIABLE 
      

      I do not understand the comment at all. I searched, but I can't find any information about M_ACK_VARIABLE or M_SET_VARIABLE

      Please, help me to understand how can I send these type of messages, why one would like to do that and when is it necessary to use them.

      Can Domoticz sent theses messages?

      BartEB Offline
      BartEB Offline
      BartE
      Contest Winner
      wrote on last edited by
      #2

      @Lyubomyr This M_ACK_VARIABLE or M_SET_VARIABLE looks like a left over from old releases
      but what is meant here:

      if (message.type==V_DIMMER) {  // can be a new set dimmer value form the Gateway or an acknowledge from a previous send message
      

      In this example there are no message send and thus not acknowledged .
      In other examples this line is seen, making the distinguish between new value or ACK

        if (message.isAck()) {
           Serial.println("This is an ack from gateway");
        }
      

      Requesting for an ACK when sending a message is done by setting the third parameter of gw.send() to true

      gw.send(msg.set(state?false:true), true);
      
      1 Reply Last reply
      0
      • LyubomyrL Offline
        LyubomyrL Offline
        Lyubomyr
        wrote on last edited by
        #3

        Thank You very much!

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


        29

        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