wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some AlphaESS, Growatt, Sofar, Solinteg, Solis, SRNE, Swatten)
317 stars 101 forks source link

Possible Missing Solis Data Value #238

Closed J14111 closed 1 year ago

J14111 commented 1 year ago

on the Solis official portal it shows you the power going to the battery in watts/kw but I cant find this parameter exposed, its possible its missing or they calculate the value from the volts/amps?

wills106 commented 1 year ago

You have "Battery Power" which is two way.

You also have "Battery Charge Today" & "Battery Discharge Today"

J14111 commented 1 year ago

Thanks I will look at that

J14111 commented 1 year ago

As its two way and it doesnt seem to be + or - do you know how I can differentiate as its messing my graphs up

There must be seperate values available for charging/discharging?

wills106 commented 1 year ago

Does 2022.12.7b1 have Battery Input / Output Energy the correct way round?

J14111 commented 1 year ago

I will test thanks

wills106 commented 1 year ago

add '_charge' to the end of it.

Do you see battery_input_energy and battery_output_energy though?

J14111 commented 1 year ago

Seems good so far will have to check once the sun goes down :)

image

J14111 commented 1 year ago

It does not work correctly, Battry Input energy works the same as "Battery Power" used to, it shows both in and out. Battery Output Enegry shows nothing at all

wills106 commented 1 year ago

it doesnt seem to be + or -

Doesn't already provide that you want though? "Battery Charge Today" & "Battery Discharge Today"

Edit: I guess that will only be total increasing though.

wills106 commented 1 year ago

There is a register that tells you if the battery is charging or discharging. I guess you could try and build that into a template sensor so you know if "Battery Power" should be positive or negative.

J14111 commented 1 year ago

that would be perfect do you know what its presented as in HA or do you need to add it first?

wills106 commented 1 year ago

I don't know if it will work or not? But try 2022.12.7b2

I have renamed battery_power_charge back to the original battery_power. It this works I'll set "battery_power" & "battery_charge_direction" both to hidden / disabled by default.

"battery_charge_direction" should be 0 when charging and 1 when discharging

J14111 commented 1 year ago

Thanks it shows as a 1% now and the battery is currently discharging, is that what you expect?

image

wills106 commented 1 year ago

Well, it's not meant to be 1% (only 1). That's because I copied and pasted without checking 🤣 But other than that yes.

So "Battery Output Energy" should display a value and "Battery Input Energy" should be 0. Is that correct?

wills106 commented 1 year ago

2022.12.7b3 corrects the % and the incorrect 'DEVICE_CLASS_BATTERY'

J14111 commented 1 year ago

Well, it's not meant to be 1% (only 1). That's because I copied and pasted without checking 🤣 But other than that yes.

So "Battery Output Energy" should display a value and "Battery Input Energy" should be 0. Is that correct?

Yes that appears to be working now but I wont know for sure until I see sun tomorrow and the batteries charge, thanks so much for all your help. I will let you know how it goes.

image image

wills106 commented 1 year ago

If it works fine I'll release it as a proper release and I'll also disable the view of "battery_power" & "battery_charge_direction" as they don't need to be visible.

J14111 commented 1 year ago

The sun has come up and it works like a charm thanks so much!

So Charge Direction 1 = battery discharging and 0 = battery charging?

image image

wills106 commented 1 year ago

Yes that matches what I said here https://github.com/wills106/homeassistant-solax-modbus/issues/238#issuecomment-1351581196