Apparently maintaining an onpen BLE conection uses a lot of precious miliamps.
The modules ran out of battery after 1 month of constant streaming. Only one sensor is still working, they stopped broadcasting one by one in the spam of one week.
I have in mind two solutions for this:
Instead of a permanent BLE connection and constant streaming of data, the raspberry could each 2-5 minutes create a BLE conection and read the temp+humidity data once, then close the connection.
Modify the firmware/use a modified version of the xiaomi sensors, so they include temperature and humidity data in their advertisment data.
TODO: review and fix the javascript nodered node, it looks like we have a signed/unsigned problem. I only noticed because this days temperatures dropped below 0ºC
Managed to save received data to influxDB and display it with graphana. So far only two devices are connected, 12h working uninterrupted .TODO: update the uild steps with influxdb and grapana setups
I managed to maintain 9 simultaneous BLE conexions, enable the notifications for the specific characteristic im interested in.
Receive all notifications and decode the bytes in the payload
The gatttool doesnt allow me to connect a 10th BLE device, i feel the bluetooth chip really struggling when opening more than 5 BLE conections, this would not happen with a raspberryPi4 (different more powerfull wirelles chip) or a raspberryPi3 without active wifi conections