tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
353 stars 60 forks source link

Please Add Energy Values #67

Closed thkaiser closed 1 year ago

thkaiser commented 1 year ago

Please Add the Energy Value like "pd.chgSunPower", "pd.chgPowerAC", 'pd.dsgPowerAC', 'pd.chgPowerDC' and 'pd.dsgPowerDC' on River-Max. I don't understand the code enough to add an energy class. Could you give an hint on this

Regards Thomas

vedranius commented 1 year ago

+1 for this! I'd like to monitor solar power input on my River 2 Max but I don't know how to add it into Energy as solar input. Thanks!

knyghtryda commented 1 year ago

@thkaiser I've created a PR #75 for the energy readings on the delta pro. Should be useful for you if you want to do the same for the River Max. I think it might just be a copy/paste job actually, but I can't actually test that on my side since I don't have a River Max.

tolwi commented 1 year ago

@knyghtryda it looks like those sensors should be SensorDeviceClass.POWER (MEASUREMENT/WATT), are you sure those are ENERGY (kWh, increasing) ? (see #82)

knyghtryda commented 1 year ago

@tolwi This is a mislabeling on Ecoflow's part. All the real "power" values are labeled with "watt". Here are some sample values from my Delta Pro:

      "pd.chgPowerAc": 9809,
      "pd.chgPowerDc": 0,
      "pd.chgSunPower": 2296,
      "pd.dcInUsedTime": 0,
      "pd.dcOutState": 1,
      "pd.dsgPowerAc": 7922,
      "pd.dsgPowerDc": 440,

Those are obviously not watt values.

tolwi commented 1 year ago

could be watt * 10 - https://github.com/tolwi/hassio-ecoflow-cloud/issues/19#issuecomment-1519063622

knyghtryda commented 1 year ago

I just grabbed the raw values from the diagnostic:

      "pd.chgPowerAc": 38499,
      "pd.chgPowerDc": 0,
      "pd.chgSunPower": 7128,
      "pd.dcInUsedTime": 0,
      "pd.dcOutState": 1,
      "pd.dsgPowerAc": 37039,
      "pd.dsgPowerDc": 440,

And here's my screenshot of the device dashboard:

Screenshot 2023-07-18 at 10 09 11 AM

A few things. One is that chgPowerAc/Dc etc. do not decrease (as far as I can tell) which means they are definitely not watts. Also, those values are definitely not correlated with the current Total in power, Total out Power, or Solar In power, which were the previously available power values.

Edit: One strange thing I'm seeing is that DC Out Power. That doesn't look right at all... I've not nothing hooked into DC at the moment.

Edit 2: Ok, DC Out Power definitely in 1/10 watt. The graph is tracking my solar input :P

Screenshot 2023-07-18 at 10 18 32 AM
thkaiser commented 1 year ago

Hi Tolwi, I'am a bit surprised. I tested the code and verified the correct working. Could you please integrate in the code, please. For reference you could also look into https://github.com/mmiller7/ecoflow-withoutflow/blob/main/cloud-mqtt/home-assistant_package_ecoflow_dm2k_mqtt.yaml which I used before. DC In Current was there with /100 and DC In Voltage with /10, but this doesn't affect the energy settings.

thkaiser commented 1 year ago

See Sun Energy and Power as an example Verlauf – Home Assistant.pdf