my 2 cents :
Why are you doing a sleep into setup method?
why not using wait method instead?
I understand that you'd like switch in sleep mode after a loop, but this doesnt sounds natural to do this during "initializing" step.
if you remove sleep from setup, do you still have your issues?
moreover, i've read somewhere that smartsleep methode gives messages time to be sent before sleeping (i'm not absolutly sure about this, i cannot find anymore the place where i've read that).
bool smartSleep(uint8_t interrupt, uint8_t mode, unsigned long ms=0)
@params:
ā¢ interrupt: Pin that should trigger the wakeup
ā¢ mode: RISING, FALLING, CHANGE
ā¢ ms: Number of milliseconds to sleep or 0 to sleep forever
@return: True if wake up was triggered by pin change and false means timer woke it up.
at last : you can wait for an aknownledge, it'll be slower but you'll be sure that message is sent before going to the next line of code...
i did not test it yet, but it would be something like this :
bool ack = true;
send(myMsg.set(avalue), ack );
if(!wait(2000,V_TEMP , mymsg.getType());)
Serial.println("timeout after 2 secs");