solis-sensor icon indicating copy to clipboard operation
solis-sensor copied to clipboard

Missing 'Charge' & 'Discharge' entities

Open HarryFlatter opened this issue 1 year ago • 7 comments

First of all, many thanks for providing the missing entities that I reported in #334 :-)

I now believe there are 4 battery 'Charge' and 'Discharge' entities missing from the integration.

For 'Charged' the integration provides:

sensor.solis_daily_energy_charged sensor.solis_total_energy_charged

but nothing for Month or Year

For 'Discharged' the integration provides:

sensor.solis_daily_energy_discharged sensor.solis_total_energy_discharged

but nothing for Month or Year

The missing figures do seem to be available according to the Solis app & web portal.... Capture

HarryFlatter avatar Jan 08 '24 10:01 HarryFlatter

Hi, any update on these missing entities? Thx

HarryFlatter avatar Mar 07 '24 10:03 HarryFlatter

@HarryFlatter @hultenvp The API needed for this is /v1/api/stationDetail. This info only shows as 0 when using the /v1/api/InverterDetail.

The entity names in the API are: "batteryChargeMonthEnergy": 85.0, "batteryChargeMonthEnergyStr": "kWh", "batteryChargeYearEnergy": 741.0, "batteryChargeYearEnergyStr": "kWh",

Hope this information helps in getting them added to the integration.

viking2010 avatar Mar 08 '24 11:03 viking2010

Many thanks for that @viking2010. Really helpful.

Not being a 'coder', presumably this would be a change for @hultenvp to make?

Would this also go for the missing 'Discharge' entities too? eg. "batteryDischargeMonthEnergy": 85.0, "batteryDischargeMonthEnergyStr": "kWh", "batteryDischargeYearEnergy": 741.0, "batteryDischargeYearEnergyStr": "kWh",

HarryFlatter avatar Mar 08 '24 11:03 HarryFlatter

Whoops, I forgot to put those in!! But yes, absolutely right. To confirm, they are:

"batteryDischargeMonthEnergy": 82.0, "batteryDischargeMonthEnergyStr": "kWh", "batteryDischargeYearEnergy": 758.0, "batteryDischargeYearEnergyStr": "kWh",

I will take a look at it but I'm not the worlds greatest coder either, and understanding someone elses code doesn't always come easy!! Ultimately, this is something Hultenvp would be able to do though.

viking2010 avatar Mar 08 '24 12:03 viking2010

@HarryFlatter: I only see the requested attributes in inverterDetail and inverterDetailList (API v2.0). Not in plantDetail However, if @viking2010's statement is correct then adding them will have no effect (note: I don't have a hybrid system, so cannot test battery values myself)

@viking2010: Can you check if inverterDetailList gives the correct values?

hultenvp avatar Mar 22 '24 12:03 hultenvp

UPDATE TO THE BELOW: The entities below are also available in inverterDetail. My python script was pointing at inveterDetail (the api reference with the typo!) and it's not in there. So, the same entities as those below are available and show the correct values in both inverterDetail and inverterDetailList.

------ORIGINAL MESSAGE------ @hultenvp Hi, I can confirm that inverterDetailList does show the battery stats being requested above, but the entity name is different to the ones listed in my previous posts. They are:

"batteryMonthChargeEnergy": 230.0, "batteryMonthChargeEnergyStr": "kWh" "batteryMonthDischargeEnergy": 236.0 "batteryMonthDischargeEnergyStr": "kWh"

"batteryYearChargeEnergy": 886.0 "batteryYearChargeEnergyStr": "kWh" "batteryYearDischargeEnergy": 912.0 "batteryYearDischargeEnergyStr": "kWh"

There's even details for the charge/discharge from "yesterday": "batteryYesterdayChargeEnergy": 10.3 "batteryYesterdayChargeEnergyStr": "kWh" "batteryYesterdayDischargeEnergy": 12.1 "batteryYesterdayDischargeEnergyStr": "kWh"

It's interesting that the "Yesterday" figures are to 1 decimal place, yet the current day's entities are whole numbers only, rounded up! Wish Solis would sort that out!

Hope that helps you out @hultenvp! More that willing to do some testing when you need it!

viking2010 avatar Mar 22 '24 23:03 viking2010

Was offline for quite a while, will start picking up tickets again in the coming time

hultenvp avatar Aug 27 '24 11:08 hultenvp