MySensor nodes powering on with Dusk / Dawn Garden lights issue
-
I have converted some of my garden lights (not the pond lights because of the water ) to Mysensor lights with NeoPixels with different nice settings (color alarm etc). Thing is these are powerd by the 12V power lines running through the garden. This 12V system turns on @ dusk for a few hours (because they power the analog lights also). This results in 6-8 nodes booting at the same time, thus flooding the gatway with messages (presentation, getting the last state & color etc).
The last i can fix by creating a few second wait different for all nodes, but i cannot find a option to delay the presentation and the whole bootup part of the nRF24L01 radio part.
i found #define MY_TRANSPORT_WAIT_READY_MS but is this really working?
i tested with the line:#define MY_TRANSPORT_WAIT_READY_MS 5000
but didn't seem to delay / wait?
-
Hello @richard-van-der-plas this is not a wait before node does anything, but the delay after which the node will stop to try reconnecting to network.
To delay the initial processing in MySensors you have to use the before() method which is logically called before everything else, including MySernsors library initialization.
-
@nca78 said in MySensor nodes powering on with Dusk / Dawn Garden lights issue:
before()
so i need to create like :void before(); { delay(2500); }
-
@richard-van-der-plas yes.
Instead of making a different script for each sensor to change the delay, you can either use a random value or make node id * xxx ms and a fixed value if node id is not yet set.