-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
No battery level reported for stickup_cam_v4 #1312
Comments
I'm pretty sure it's because the code checks for Realistically, the code should probably check for either "battery_life" or "battery_life_2" and return true if either are present (that is what I do in ring-mqtt), but it's a pretty good corner case as I believe this is only checked during initial startup. |
The battery_life property is in there, it just has a value of null. I'll test swapping the battery to the other slot tomorrow and see if it makes a difference |
Ah yes, sorry, missed it, glanced through too quickly. So it's not that it is not registering a battery characteristic, it's that it is reporting the battery value as null because the primary battery is either completely dead or not installed. Looks like it is probably because of
Because there is no battery_percentage or battery_present properties, this function will return null instead of the value from second battery (I believe the goal of this function is to return the highest value from either of two batteries). Should probably add an additional check for !health.second_battery_percentage to this function, then it will return value of second battery even if first is completely dead/removed. |
If you modify
to
Restart and I believe it will work. |
It looks like slot 1 of the camera has an issue, the camera won't boot up unless the battery is in slot 2 :( I made the code change you suggested though and that does indeed fix the problem when there is only a battery in slot 2, thanks! |
Great, I'll see about getting a fix into the next version. |
@sjonez it looks like we may have already merged a fix for this. Would you mind updating to the latest version and letting us know if the battery level now shows up correctly? |
Is there an existing issue for this?
Describe The Bug
I'm not seeing any battery data for one of my cameras which is a stickup cam v4. Here's the discovery data:
I think it's because there is no health.battery_percentage or health.battery_present like my other devices, but there is instead health.active_battery
To Reproduce
No response
Expected behavior
Battery reported
Relevant log output
No response
Screenshots
No response
Additional context
No response
OS
Ubuntu
Node.js Version
20.6.1
NPM Version
9.8.1
ring-client-api
12.0.1
Operating System
Ubuntu
The text was updated successfully, but these errors were encountered: