-
Notifications
You must be signed in to change notification settings - Fork 21
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
BMS Watthours sensor #110
Comments
Nice work! So it's the integral of all (absolute) battery charge and discharge? It's a shame that it wraps at 16 bits -- I wonder whether it's worth trying to unwrap that in HA... Maybe we should /1000 and keep the unit as kWh, for consistency with other energy sensors? |
@canton7 yes that's it exactly 👍 I was really hoping it was going to be an int32 😢 - but it's connected to the battery cycle counter, the BMS must do some internal maths on the capacity of batteries installed and increment the cycles so it's probably not worth re-creating a bigger number in HA as you could get there (roughly) by taking your (cycles * known capacity) + watthours. Actually /1000 would make a lot of sense to keep in kWh (and help the HA database) 😄 |
To be honest, do we even want this sensor? Is it of any use to anyone? |
Agree, I don't think there is a lot of value to it (it might have been if it were a really big number), but it can easily be recreated in HA if anyone wants a watt usage meter - I would be inclined to remove it. |
Just following on from issue nathanmarlor#110 this corrects the scale and unit of measurement - a slightly wider decision required as to whether this sensor is needed at all, but at least with these changes it provides a sensor that matches it's name (watthours).
This is now in |
Just out of interest i've been getting to the bottom of 'what' the watthours sensor actually is.
I created a watthrate sensor to track it and confirm its value, I had to remove the scale to bring it in line.
The only thing I wasn't sure of, was whether the counter was 16 or a 32 bit register - so tracked it for the last few, it eventually got to 65535 and rolled to 0 without any adjacent register incrementing, confirming it is 16 bit, and simply a counter used internally by the BMS as an energy meter to track all battery activity in watts.
So the only changes are the scale 0.1 is incorrect, and should be removed, and the unit of measurement is Wh (not kWh)
foxess_modbus/custom_components/foxess_modbus/entities/xx1_aux_entity_descriptions.py
Lines 588 to 589 in 137329b
The text was updated successfully, but these errors were encountered: