How to do resend when st=fail on a Repeater
-
everything is in the title
I'm wondering how to increase reliability on bad RF transmission (big ceiling).
I want to do a resend when st=fail.
I do it already on my sensor, it's easy to code, as it's in the sketch directly.
I'm wondering how to do it in the repetear ??? some ideas ???
-
I see two ways of implementing it (despite I never tried):
- gw.send( msg ) returns false in case transmission fails.
OR
- gw.send( msg, true ) will request an ack from controller, which should arrive back in few seconds if everything went well.
In both cases, you have to write your own logic to retry.
http://www.mysensors.org/download/sensor_api_15#the-full-api
-
@rvendrame Hello,
yes, I use this already. But as you know in a repeater, the gw.send is not available as it's include in the process() function... I do nont have access to gw.send...
-
@doblanch , not sure if I understood. gw.process is used to listen to incoming radio messages, while gw.send is to transmit messages, and is present on every example sketch here. For example the 'Door/Window/Button' sensor:
void loop() { debouncer.update(); // Get the update value int value = debouncer.read(); if (value != oldValue) { // Send in the new value gw.send(msg.set(value==HIGH ? 1 : 0)); oldValue = value; } }
-
http://forum.mysensors.org/topic/1424/resend-if-st-fail might be relevant
http://forum.mysensors.org/topic/2189/serial-api-noack-when-sending-with-ack-failed started by @SiLeX has a longer discussion on resending
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Raspberry Pi 5: invalid GPIO 9
Troubleshooting • 27 Aug 2024, 13:20 • igo 27 Aug 2024, 13:20 -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 26 Feb 2025, 00:32 • dpcons 26 Feb 2025, 06:22 -
NODs stop responding, but ping works.
Troubleshooting • 21 days ago • Marcin 21 days ago -
JSN SR04T - Temperature Influencing Readings
Troubleshooting • 6 Sept 2019, 07:51 • Timbergetter a day ago -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58