M_ACK_VARIABLE or M_SET_VARIABLE
-
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?
-
@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 ACKif (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);
-
Thank You very much!