Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How data is retrieved from the sensors? #12

Open
0xgrm opened this issue Mar 15, 2019 · 8 comments
Open

How data is retrieved from the sensors? #12

0xgrm opened this issue Mar 15, 2019 · 8 comments

Comments

@0xgrm
Copy link

0xgrm commented Mar 15, 2019

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
Copy link
Owner

eschava commented Mar 15, 2019

Plugin connects to sensors and requests data from them

@0xgrm
Copy link
Author

0xgrm commented Mar 15, 2019

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

@eschava
Copy link
Owner

eschava commented Mar 15, 2019

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

@0xgrm
Copy link
Author

0xgrm commented Mar 15, 2019

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

  • Scan for BLE devices.

  • Check the broadcast advertisement packet.

  • Look for the Service Data UUID to check the sensor type and all data.

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
Copy link
Owner

eschava commented Mar 15, 2019

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
Copy link
Author

0xgrm commented Mar 15, 2019

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
Copy link

sjroe commented Oct 27, 2019

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants