-
Notifications
You must be signed in to change notification settings - Fork 28
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
Get battery status? (feature) #70
Comments
That information is not available on the documented interface I think, if someone knows how to get that info we could implement it. |
Ok thank you. I just thought maybe there was a "standard" bluetooth identifier for battery. Cheers! |
Maybe it is possible, have to test if the endpoint is available If I have time I might check this out more... |
I've been trying to get the batterystatus for some time now too (manually with bluetoothctl + gatt). I was not successful, but I did stumble across this: Airthings/waveplus-reader#11 (comment) Perhaps that could put you in the right direction? |
I see, that is interesting, seems like it should be kind of stright forward for the pluss model with the command uuid point if write and read to that works as I think...
ok, maybe I can setup a rpi and test this the comming days... |
I guess not as stright forward, did not get read to work, it uses notifications and I did not get that to work... Seems I do not get any reply or notification... probably me not getting the setup correctly. Tried adding delegate:
Then write to the command uuid and wait:
But nothing received, hmm |
Got it working I think, needed to add this to get notifications to work:
Mannaged to get this printout: |
…th the command interface uuid. Tested and working with the airthings pluss only. custom-components#70
Updated in fork, seems to be working for me, if someone else wants to test before I make a pull request and release. |
Great work. I will try to test it this afternoon. |
Cool stuff! Tested and seems to work without breaking my first-gen Wave; but has no battery status of course. ...Time to upgrade my Wave I guess :/ |
Looking good!
|
Just pushed some updates to handle some bad data that I have seen runing this a couple of days, will let it run some more. Also I am debating if the battery sensor with % battery should be as it is, since it is derived from the voltage, I am leaning towrads having this calculated on a "higher" level, maybe letting the user set max min values, if I keep it linear as now, but then again might just keep it as it is, will not be "right" either way... |
… voltage from the device. Adds a battery sensor that converts voltage to battery percentage, linear calculation from min to max values that are user configurable. Main data from the sensor will be battery percentage but voltage will be returned as an attribute. Adds description to the readme. custom-components#70
Ok, I feel more happy with the latest version, now there is one battery sensor that converts from voltage to percentage with user configurable max min values and the voltage is added as an attribute. I will lett it run a bit to see if I have any issues, then push this out unless there are any objections or maybe other solutions. |
@sverrham Looks like it works! Thank you so much! |
I set V_MAX to 3.0 and V_MIN to 2.0. Noe The battery reading is consistent with the official Airthings app. |
Hi - thanks so much for making this!
Do you have any plans to report on the battery status? It's something you can view in the official app. It would be nice to be able to see when the batteries are low and send a notification.
The text was updated successfully, but these errors were encountered: