eschava / node-red-contrib-xiaomi-ble

Xiaomi Bluetooth4 (BLE) sensors
MIT License
19 stars 15 forks source link

How data is retrieved from the sensors? #12

Open 0xgrm opened 5 years ago

0xgrm commented 5 years ago

Hi,

I'd want to know if the values are red passively from the sensors or if the plugin explicitly connect to them for updating values.

Thanks.

eschava commented 5 years ago

Plugin connects to sensors and requests data from them

0xgrm commented 5 years ago

Is there a way you could possibly scan the data passively, as in the homebridge hygrothermograph plugin?

eschava commented 5 years ago

Sorry, what do you mean by "passively"? AFAIS, Homebridge uses similar code for requesting data from sensors

0xgrm commented 5 years ago

By passively, I mean not to connect to the BLE devices. Just:

By doing this, there is no need to connect directly to the BLE devices, thus greatly improve efficiency and battery life of the sensors. I unfortunately don't have the skills to do it correctly.

eschava commented 5 years ago

I like the idea and have found this information at the link you mentioned OK, will try to implement this as an additional option at the nearest time

0xgrm commented 5 years ago

Glad you find this interesting! This is by far the best method but only the homebridge plugin I mentioned seems to do it, and only for the temperature sensors, not MiFlora.

Please let me informed of your avancements here. Me and a friend would love to try and help you add this functionality.

sjroe commented 4 years ago

@uryupinsk I've implemented a pair of nodes that do it in this manner:

Simply link the above two nodes. In my flows I then have the output of the filter node going into a switch node to split the outputs by MAC address.

dingausmwald commented 2 years ago

This has never been implemented, right? Passive scan is much more battery friendly.