You could try adding a debug node in NodeRed to see when the various events are getting fired and so where the delay is?
The actual Bluetooth advertisement part should get sent out in around 300ms after the button press, so I'd be surprised if that was the slow part.
The only other thing I could think is that the signal strength from the Puck was so low only a few of the advertising packets were getting through?
To work around that you could:
Try and get the distance between the Puck and EspruinoHub down
Use NRF.setTxPower(4) to use the most powerful transmit power
Transmit more often (specify an interval in NRF.setAdvertising) so even if less are getting through, you hopefully stand a better chance of getting one.
Hope that helps! 8 secs sure seems like a lot though? It may be on the Hue side of things
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
So you're using standard Bluetooth Advertising pretty much like is done here? http://www.espruino.com/Puck.js+Node-REDÂ
You could try adding a debug node in NodeRed to see when the various events are getting fired and so where the delay is?
The actual Bluetooth advertisement part should get sent out in around 300ms after the button press, so I'd be surprised if that was the slow part.
The only other thing I could think is that the signal strength from the Puck was so low only a few of the advertising packets were getting through?
To work around that you could:
NRF.setTxPower(4)
to use the most powerful transmit powerinterval
inNRF.setAdvertising
) so even if less are getting through, you hopefully stand a better chance of getting one.Hope that helps! 8 secs sure seems like a lot though? It may be on the Hue side of things