node-red-contrib-generic-ble icon indicating copy to clipboard operation
node-red-contrib-generic-ble copied to clipboard

Feature suggestion: Automatically reconnect

Open JasonBSteele opened this issue 5 years ago • 3 comments

Hi,

I am using a Nano BLE Sense device to listen for sounds, and then infer what they are. If the sound is other than background noise it sends a Notify to the central.

This all works fine, but the Nano device is prone to the occasional disconnection due to it's weak radio. Unfortunately this means I need to connect again, and this is currently done with an Inject. I guess I could monitor the status and send a connect message if it disconnects but I prefer it if the "config" node could reconnect automatically if a check box is checked.

Also if subscribed for events it would need to resubscribe.

JasonBSteele avatar Jul 12 '20 16:07 JasonBSteele

Interesting. Let me try it.

dbaba avatar Jul 13 '20 04:07 dbaba

I set up a Status listening node to connect when disconnected. This deals with the issue most of the time, however occasionally the status is stuck at disconnected or missing. In these cases I find it necessary to go back into the config node and untick the scanning checkbox, then tick it again. When I do this it immediately finds the device and then the status listener does the connection.

JasonBSteele avatar Jul 14 '20 11:07 JasonBSteele

I observed that while reproducing an issue. Scanning on/off commands seem to be required in some cases.

dbaba avatar Jul 15 '20 05:07 dbaba