Skip to content
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 alarm not updating if battery is empty #36

Open
onsmam opened this issue Jul 3, 2024 · 6 comments
Open

Battery alarm not updating if battery is empty #36

onsmam opened this issue Jul 3, 2024 · 6 comments

Comments

@onsmam
Copy link

onsmam commented Jul 3, 2024

Hi,

today i discovered that 2 of my thermostats have low battery's but in homeassistant the battery_alarm attribute stay's 0
also checked where the fault is (i think) after some reverse engineering of the uponor api found;

That the formula for battery alarm is "101 + (500 * "controller") + (40 * "thermostat") which is correct (if im reading correct your using an offset of 80 + address 21 = 101) in the custom_components/uhomeuponor/uponor_api/const.py

i think the script is trying to read property 85 of the address defined by the formula above. but it needs to read property 662.
i have no python skills to make a pull request to you git... i've checked it via a shell script, with the following line:

battery=$(curl -s "http://$uhomeip/api" --data-binary '{"jsonrpc": "2.0", "id": 8, "method": "read", "params": {"objects": [{"id": "'$battery'", "properties": {"662": {}}}]}}' | jq -r '.result.objects[0].properties["662"].value')

which gave me the battery warning on the empty thermostats.
is it possible without to many hassle to add this in the code?

thanx!

@raympie
Copy link

raympie commented Jul 5, 2024

@dave-code-ruiz I have the same issue. Hope this can be fixed! TIA

@dave-code-ruiz
Copy link
Owner

I test all you say , and it is correct

I dont know why , for values technical_alarm, tamper_indication, rf_alarm and battery_alarm need 662 property instead of 85

Im trying to solves it

@dave-code-ruiz
Copy link
Owner

please @onsmam and @raympie test changes in 1.3.3 version y havent battery alarms in my uponor system

@onsmam
Copy link
Author

onsmam commented Jul 12, 2024

yes! working! thanx for the quick fix!

@dave-code-ruiz
Copy link
Owner

Great! , please dont close issue because i want to develop new state sensor or binary sensor with state alarm can get states "battery alarm, technical_alarm, tamper_indication, rf_alarm, remote_access_alarm or device_lost_alarm

@raympie
Copy link

raympie commented Jul 30, 2024

Works! Great! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants