eschava / node-red-contrib-xiaomi-ble

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

Multiple sensors #7

Closed borpin closed 5 years ago

borpin commented 5 years ago

I (now) have multiple Temperature/Humidity sensors I wish to read. My guess is that they need to be read in sequence. Is that correct?

If so, is the best way to do this to create multiple nodes and sequence them or use the same BLE node and inject the address each time?

eschava commented 5 years ago

I have two sensors and both are read at the same time successfully

Approach with multiple nodes is better because if a single node is used then it scans all available BLE devices every time when the address is updated. With multiple nodes - a reference to found device is cached and retrieving data happens faster

borpin commented 5 years ago

Ok great. How do I inject multiple addresses? I tried "macaddress, macaddress".

if a single node is used then it scans all available BLE devices every time when the address is updated.

Could a check for the address in the found devices be added in before a scan is started?

This node does work really well 😄.

eschava commented 5 years ago

Ok great. How do I inject multiple addresses? I tried "macaddress, macaddress".

Sorry, but multiple addresses are not supported for single node. You should either use multiple nodes or provide address field in the message initiating data reading

Could a check for the address in the found devices be added in before a scan is started?

Sorry, not clear