it may be a more universal solution for the node/switch to use the request(uint8_t childSensorId, uint8_t variableType) function and resend the command to the node/relayActuator after a timeout. This is what @jkandasa mentioned in his post earlier. Still if the node/switch receives the request() it does not know what sensor sent it. If this was contained in the message variable we could implement a fairly robust solution to this.
Latest posts made by rayven
-
RE: Is their an option to enable ack for messages the gateway originates?
-
RE: Is their an option to enable ack for messages the gateway originates?
@rayven the sending node/switch could set the state of the ackSensor to UNDEFINED and the receiving node/relayActuator can update it as to the STATE of the relay. So the receiving node/relayActuator needs to know which nodes to send an ackSensor STATUS update to. Because it wont know which node/sensor sent the message. All this goes out the window if the user toggles the switch quickly or there is more than one sender like the gateway and the node/switch.
-
RE: Is their an option to enable ack for messages the gateway originates?
Are you sending the msg from the gateway or a node? If from a node then you could add a 'sensor' on the sending node that the second relayactuator could update as it switches the relay on. if the sending nodes 'sensor' isn't updated in the TIMEOUT period then it will resend the message.
-
RE: Is their an option to enable ack for messages the gateway originates?
I moved to trying to use ack between two nodes to better understand what is being done. In the receive function I was unable to tell which node sent the ack. Like int NODE_ID = message.originatingNode similar to msg.setDestination(int NODE_ID). Seems like you would need to set a timer when you send a message to check and see if a ReceivedAck flag had been set in a TIMEOUT period. And in the receive function when we test for ack set the ack flag to true. My issue is not knowing what is being ack'ed. Are you acking my last message or the one of the previous messages. So I clearly dont understand the ack from the receive functions point of view....
It is my understanding that the node sending the message that is requesting the ack will resend the message if no ack is heard within the parameters set in the mysensors code.
-
RE: Is their an option to enable ack for messages the gateway originates?
Is this a possible feature or is there an insurmountable obstacle?
-
Is their an option to enable ack for messages the gateway originates?
I have a sensor that controls a pump. Sometimes the pump does not receive the message the controller/gateway sends when i change the S_Binary sensor state to ON. I would like the gateway to request an ack from the sensor and retry if it does not get one. Is this possible?