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

Minor/cosmetic issue: SoC translated incorrectly to "state of capacity" (correct: "state of charge") #26

Closed
madmat17 opened this issue Dec 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@madmat17
Copy link

First of all: A VERY promising and cool adapter for ioBroker!
Keep on rocking!

Describe the bug
You translated the register 37760 to "stateOfCapacity", whereas this register is holding the current state of charge.
Register 37760 should be translated to "stateOfCharge".

Versions:

  • Adapter version: 0.0.1

Additional context
The state of capacity would more describe the remaining total capacity compared to the battery's initial capacity (the battery health as known from mobile phones) but that value doesn't seem to be held in an externally accessible register. To my knowledge that value isn't transparent to the user, since the gross capacity and net capacity derive from each other and Huawei / LG already added some "reserves" to cover the wearing of the battery.

@madmat17 madmat17 changed the title SoC translated incorrectly ot "state of capacity" Minor/cosmetic issue: SoC translated incorrectly to "state of capacity" (correct: "state of charge") Dec 23, 2023
@daolis
Copy link
Owner

daolis commented Jan 3, 2024

Thanks for reporting it.
The bad think is...
This is more ore less a breaking change... If i change this value, the historical values are stored in ...Capacity, and the noew ones in ...Charge.

Migration Procedure (BUT NOT YET CHANGED IN ADAPTER!!)
I will update this if the change is done!!!

INFLUX: To keep old history...

  • Stop Adapter
  • Copy the measurement to new one. (stateOfCapacity -> stateOfCharge)
  • Delete old one.. (stateOfCapacity)
  • Install new adapter. Write to new state

@madmat17
Copy link
Author

madmat17 commented Jan 7, 2024

I know that this might be quite cumbersome, but one option could be to have a translation table for the data object names which the user can configure.
For instance having the adapter writing the discharge power of the battery to the object "dischargePower" per default (like it is right now), but the user could change that one to "Entladeleistung", "ontladingskracht", or "kisütési teljesítmény", ... or whatever object name in ioBroker is convenient for the user.

That would also enable users to maintain their existing database entries (like InfluxDB) in case they already have existing ones with different namings without setting up aliases in ioBroker.

Alternatively the users might set up aliases directly in ioBroker and have them being written to a database (I'm not that firm with ioBroker yet to confirm, whether that'd be working).

@daolis daolis added the bug Something isn't working label Jan 9, 2024
@daolis
Copy link
Owner

daolis commented Mar 4, 2024

Already implemented. Will come in next release.

@daolis daolis closed this as completed in 3a22f22 Mar 10, 2024
daolis added a commit that referenced this issue Mar 10, 2024
* [#34](#34) Added Battery registers: totalCharge, totalDischarge, batteryTemperature
* [#32](#32) Fixed: No data for ChargePower and CurrentDayChargeCapacity
* [#20](#20) Read alarm registers from inverter (alarms = bits, alarmsJSON = json array with alarms (name, id, level))
* [#29](#29) Added PVn Voltage and Current for available PV Strings
* Added initial documentation - WIP
* [#26](#26) Renamed stateOfCapacity to stateOfCharge\
  Migration of historical data: see [Migration of historical data (on state name change)](docs/migration.md)
* Blocked reading of registers - faster when fetching data from inverter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants