Humidity doesn't receive ACK, everything else works?
I've got a weird behaviour, I'm using a BME280 and send humidity, temp, pressure via mysensors.
The problem is that humidity never gets sent, so I tried to debug it and saw that it works if I send it twice,
but one of the requests never receives an ACK.
This only happens for humidity, the other measurements work fine.
I tried adding a delay (100) but same result.
Can anyone tell me how to fix this? Here is the relevant code:
skywatch last edited by skywatch
@christoph-blank You'll need to post the whole code as that doesn't tell us much.
Maybe it's just that humidity isn't changing enough to send data? - You are only sending if it changes from the last reading.
Sending requests in fast succession will likely not leave time for ack to be returned and so it gets lost in the message queue or is sent just as the node starts sending it's next message? - try putting wait(100); after each radio send.
From my point of view this is the only relevant code, but I can post it later when I'm on the other machine again.
The humidity changes, I get the same result if I leave out the condition.
Also, from my understanding, as I'm using ACK, it already waits 70ms before continuing, so there should be enough time with the additional delay?
(When using only one send())
I'm surprised that it only happens for humidity.. never had this problem on the other readings.
Is there any way I can wrap this in a while loop? I think that ACK timeouts after 70ms or so IIRC, so I'm not sure how I would actually wait until I
receive the ACK, and e.g. try 3 times.
@christoph-blank since you are requesting that the destination node echos the message back to the sending node, your receive() function is highly relevant. How are you managing the echoed message?
sorry it took a bit - this is my current test: https://gist.github.com/solars/688a635f791c2e558a1ec57b67c9beb4
it's stitched together from sources I have found, so I might not be doing it right.