-
Notifications
You must be signed in to change notification settings - Fork 61
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
Battery status #11
Comments
I've been wanting this feature for the past 2-3 years. I brought 2 airthings CO sensors, and I loved that they had python code to get temp, humidity and co readings from the sensors. But the problem is that I have to poll my database readings to detect when a sensor falls offline. It would be very helpful if we could read the battery life, or at least get an alert when to replace the battery. Its my fault for not implementing a server side polling of the database to detect when a sensor stops sending data, but if there is a way to read the battery status via bluetooth - please do that. It would save me running a process on my workstation. |
Also I noticed that the app on the phone knows the battery life. |
yes, would like this, or a model that allows power to be hard wired. |
Also, does the SAMPLE-PERIOD impact battery life? This device seems to only update once every 5 minutes, but we don't know when that time period starts, so we need to sample at a rate greater than once every 5 minutes in order to get time accurate data, then throw out all duplicates from the 5 minute period. |
I would also love to know how to read the current battery percentage via bluetooth rather than having to rely on the app or to watch out for when the device stops reporting data. |
Me too please. These python scripts are the reason I chose to purchase an AirThings radon meter versus the alternatives. Battery status is the one thing missing. Please share how to decode it from the extra bits in the characteristic or update the firmware to support standard BLE battery reporting. |
I'm also interested in the battery status. As for polling frequency impacting battery, I haven't seen any significant difference between a sensor that is polled every few minutes and one polled every 30 seconds. |
I used the code from this page: https://sifter.org/~simon/journal/20191210.1.html I added the following lines to the function query2_parse
The battery in percentage is available in q2['battery']. It is not identical to what is reported in the app, but quite close. Maybe someone has a better way of calculating battery capacity from voltage? |
It would be helpful to read the battery status/charge. But there does not appear to be a standard GATT battery service advertised.
The code reads characteristic b42e2a68-ade7-11e4-89d3-123b93f75cba and I see that bytes 2-3 and 16-19 are currently ignored.. could battery status be hidden in there perhaps?
The text was updated successfully, but these errors were encountered: