CANDY-LINE / node-red-contrib-generic-ble

A Node-RED node set for providing access to generic BLE peripheral GATT characteristics.
Apache License 2.0
24 stars 22 forks source link

polling time #1

Closed gtalusan closed 6 years ago

gtalusan commented 7 years ago

Hi, this is an interesting project. I'm trying to use it to harvest information from some BLE sensors that I've strewn about my work area. Their intent is to be low powered (i.e., sleeping most of the time) and only wakeup to provide sensor data when needed.

For example, I have a sensor that sleeps at about 0.37mA but when it takes in a connection it'll jump up to about 4mA to provide data. Once the central disconnects, it'll reset back down to its 0.37mA low power state.

This node however seems to connect quite frequently and on its own. Is there any way to tune this so it happens when triggered via another node like a timer/manual/etc...

dbaba commented 7 years ago

Thank you for the comment. Your suggestion sounds good and I try to implement the feature. The reason why the node frequently tries to connect to all known peripherals is to collect as many notify events as possible from many devices (more than 10). However, as you said, if you don't want the node to propagate the notify events, it's indeed desirable that the node does nothing unless it receives any trigger input message.

Here is a list of expected scenarios for the enhancement:

If you have any suggestions regarding the above list, let me know.

dbaba commented 6 years ago

@gtalusan I've released a new version of Generic BLE node (v2.0.0). With this version, inject node and/or other nodes are now able to trigger Generic BLE node to connect a peripheral. See the help text for Generic BLE in node.