Replies: 3 comments 1 reply
-
Why did you specify
should it not be
|
Beta Was this translation helpful? Give feedback.
-
Because I see no advantage in updating a sensor with NaN when the BLE device isn't connected - so I push the value when I have it.. |
Beta Was this translation helpful? Give feedback.
-
I stumbled onto your chat because I am looking for similar examples to implement a bluetooth integration with a BMS. |
Beta Was this translation helpful? Give feedback.
-
Hi
I am trying to retrieve data from a number of different characteristics on the same BLE device.
I have set up a ble_client on the mac address of the device and given it an ID - and the in my sensor section I have:
A similar BLE client sensor has been set up with another charteristic ID ...
But when the ESP sees the device, it connects to both template sensors (the log tells me) - and then nothing more happens (I have even tried to add ESP_LOGD() as the first line for each lambda section)... Some moments later, both "clients/sensors" disconnect again, without returning any data - as if the lambda sections never were executed...
Any hints on what could be the issue - and would there be a more nice way of doing things, e.g. if the BLE device cannot handle more than one simultaneous BLE client connection ?
Another challenge is that the MAC changes upon battery change... I wonder if it possible to create lambda code in the BLE tracker, that can match the advertised data, and match the MAC from there and connect to it? Unfortunately I think service/characteristics uuids also change upon power cycle of the device, so getting the right ones might be a question about getting a list of all service and characteristics uuids, and then identifying them by the "index" number.... Not sure how to do that through the ble_tracker lambda coe, though :-) (but that is a secondary challenge)
Regards
Brian
Beta Was this translation helpful? Give feedback.
All reactions