Message Send Returns False, but message send
-
I'm sure it appears NACK, but to be sure I'll try again when I get home and post back here the results!
-
If you see NACKs on node of course you will get a false from send and it is plausible the gateway gets the message correctly. In your case could be low signal on node side or a power issue on the gateway radio but you need to have several nodes to make a comparison.
-
I have 3 nodes at the moment... All of them with the same problem! The gateway is a sensebender gateway, it can be a power issue on the gateway... It uses a mobile charger... And it's not a official one... It can have problems... Any ideias on how can I test if the problem is on the charger? Or the only way is trial and error?
Thank you
-
Yes I did! On the nodes... On the gateway, no... The sensebender allready has it... Does it not?
This is my nodes https://www.openhardware.io/view/83/Smart-Light-Switch-220v
Thank you
-
I did try to replace the radios, but I didn't see any improvements. For example... I send the messages in this while loop:
#define REPEAT_DELAY 50 void messageRepeat(MyMessage &message, bool ack = true) { int repeat = 1; int repeats = 10; int repeatdelay = 0; boolean sendOK = false; SerialPrint("Sending message of child "); SerialPrintln(message.sensor); while ((sendOK == false) and (repeat < repeats)) { if (send(message, ack)) { sendOK = true; SerialPrint("Send OK"); } else { sendOK = false; SerialPrint("Send ERROR "); SerialPrint(repeat); repeatdelay += REPEAT_DELAY; } if (ack == true) { SerialPrintln(" With ack "); } else { SerialPrintln(" Without ack "); } repeat++; wait(repeatdelay); } }It tries to send a message and incresses the timer of the wait on 50ms on every try
(idea adapted from the @zzz-teo code on https://forum.mysensors.org/topic/7786/about-ack/2 at the moment I don't need to process the ack response, so I adapted it to work only with the send)Sometimes I can make it go on the fist try, sometimes it takes 5 tries, and sometimes it takes the max 10. But almost every times I can see the messages appearing in the MQTT topic. I made this topic code from information's on https://forum.mysensors.org/topic/3346/discussion-reliable-delivery/19 of @mfalkvidd and @hek
At the moment I didn't change the power of the NF24 radios. Do you think that it could help to try and bost the power? Who can I do this?
I'm using after the HLK-PM01 2 capacitors, a 0.1 uF Capacitor and a 100uF Capacitor, and on my radios a capacitor after the 3v regulator, a 4.7uF Capacitor, I can try to add a extra one or a bigger one to the radio, don't know if it could help, any ideas on the capacity?
Thank You
-
I ordered a new power supply to my sensebender gateway try to rule out power problems, this one is 5v 2.5A and I know that they are good because I use them on my raspberry pi's.
-
@Soloam that's some great code, mind if I copy it for my nodes?
// Ah, wait, that's blocking code isn't it. Not technically, with the wait() function. But it would stop the rest of my node from running until the process is complete?