Ack when using MySensors with RFM69 radio

Moderator: leecollings

Post Reply
Rolo
Posts: 52
Joined: Sunday 27 December 2015 19:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: The Netherlands
Contact:

Ack when using MySensors with RFM69 radio

Post by Rolo »

Did some experiments with MySensors <-> Domoticz using the RFM69 radio module. I build a serial gateway and a simple relay node using the examples from MySensors. It all works fine, but one thing I noticed is when I power off the node the switch can still be operated in domoticz. It seems like Domoticz is not checking if the command is actually recieved by the node. Or maybe the node itself does not give an ack, I'm not sure.
I'm I missing something here, should I have set some otions or is this only working when using the NRF024 radio's ?
Now I do not have the real status of the node, only the last command that was send making it not any better then a simple one way device on the 433Mhz band.

Thanks !
Rolo
Posts: 52
Joined: Sunday 27 December 2015 19:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: The Netherlands
Contact:

Re: Ack when using MySensors with RFM69 radio

Post by Rolo »

Found it ! There is a ack checkbox on each child line of the device. You have to anable the ack on all children. First select the line, then set the checkbox and click "Update". Repeat for each child. Now the switch gives an error when the node is not reachable and it will not change the switch state. So in your scripts you now know the real status of the switch and can act on it.
Hope this info is of any use for other forum members using MySensors.

Image

Image

Image
Rolo
Posts: 52
Joined: Sunday 27 December 2015 19:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: The Netherlands
Contact:

Re: Ack when using MySensors with RFM69 radio

Post by Rolo »

Some extra info, to get Ack working you also have to enable Ack in the folowing lines of the node code :
Your lines can be different but the ,1 between the () enables the ack.

//gw.sendSketchInfo("Relay", "1.0"); // Default
gw.sendSketchInfo("Relay", "1.0", 1); // With Ack


//gw.present(sensor, S_LIGHT); // Default
gw.present(sensor, S_LIGHT, "Relay", 1); // With ack
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest