z-master42 / solarflow

Integrate your Zendure products (Hub 1200, Hub 2000, Hyper 2000 and Ace 1500) into Home Assistant via MQTT. My attempt at instructions.
43 stars 4 forks source link

Only few values avaliable on Hyper2000 #35

Open gintonic26 opened 1 week ago

gintonic26 commented 1 week ago

Hello, I integrated my Hyper2000 using your tutorial yesterday —really well done and easy to follow. I let HomeAssistant automatically add all the values.

However, many of the values are showing as unavailable, and I'm unsure if this is expected behavior or if I made an error during the setup. Does anyone have more information or personal experience with the Hyper2000 who could confirm if this is normal?

unknown: sensor.acoutputpower switch.acswitch sensor.gridinputpower sensor.gridinputpower_2 sensor.packdata_2 sensor.passmode

working / changing switch.buzzerswitch - off sensor.electriclevel - 72% sensor.outputhomepower - 275w sensor.outputlimit - 275 sensor.outputpackpower - 13w sensor.packdata sensor.packinputpower - 193w sensor.packnum sensor.packstate sensor.remainouttime - 301 sensor.solarpower1 sensor.solarpower2 sensor.solarinputpower

implausibel sensor.socset - 1000% I guess it means battery state and should be 100%, the chariging level is sensor.electriclevel ?

Maybe someone can direct me on the values. There is a value for total solar energy: sensor.solarinputpower And there is a value for what is going into my home sensor.outputhomepower

Is there a value for what is stored / drawn from the battery?

Furthermore the "sensor.outputhomepower" shows really slow response, the "sensor.solarinputpower" however seems to refresh more than once per second. Anybody with the same observation?

z-master42 commented 1 week ago

As I wrote, the Zendure MQTT brokers only transmit values when they change. This means that the entities have no value when they are created for the first time, when the Mosquitto broker is restarted or when the Home Assistant is restarted. Depending on the entity, this can take a while.

Entities with _2 etc. do not actually exist. It looks to me as if Home Assistant has simply created a second entity for the same sensor. The problem has occurred several times before. However, I can't say why this happens.

socSet is the upper charge limit of the batteries and yes 1000 means 100.0 %. I don't know why the value is transmitted by Zendure in this way. The current fill level of the batteries is electricLevel, correct.

Please note that solarInputPower and OutputHomePower, like the other ...Power sensors, are not energy values (Wh) but power values (W).

The power with which the batteries are currently being charged is outputPackPower. The power with which the batteries are discharged in reverse is packInputPower.

New values are transmitted most frequently for the solar power entities, which is also correct.

jschroeter commented 1 week ago

I'm also using a Hyper and got some _2 sensors, but only for electricLevel and remainTimeOut.

Further I noticed that it seems like some sensors frequently get set to an empty string, e.g. packState switches between empty string, 0, 1 and 2, making it hard to see the real value in the UI. But in the logbook you can see it.

Bildschirmfoto 2024-09-12 um 10 29 09

To work around this I manually created another sensor which only changes when the value is set and is not an empty string. Quite annoying but this seems to work:

- platform: template
  sensors:
    battery_state:
      unique_id: "sensor.battery_state"
      friendly_name: "Battery state"
      value_template: >
        {% set hasValue = has_value('sensor.packstate') and states('sensor.packstate') != '' %}
        {{ states('sensor.packstate') | int if hasValue else this.state | default(0, true) }}
jschroeter commented 1 week ago

Some important values unfortunately don't update frequently, see https://github.com/Zendure/developer-device-data-report/issues/47.

z-master42 commented 1 week ago

PackState contains information about whether the batteries are currently being charged, discharged or are in standby mode. However, everything is also described here.

0: standby 1: input 2: output

I have created all the sensors manually so that in this case the entity shows me charging, discharging or standby directly.

gintonic26 commented 1 week ago

After the clarification, I can cope a little better with the values. In my eyes, however, Zendure has simply done a bad job, as the current values don't really matter. Nice to have for the display but you can't do much with it. Instead of displaying accumulated values, Zendure only displays the current values. In the app, the values are also displayed as total values.

The integral sensors are okay, but certainly not the most accurate.

My Hyper2000 is currently running with my Shelly3EM, so a connection to Tasmota would be desirable, as the values come directly from the smart electricity meter, but that's another story.

Unfortunately, the automation that pulls my values to 0 after a longer standstill phase doesn't work, so I drew 4 KWh from 2 batteries overnight ;)

I would just like to see the values clearly in my HomeAssistant Energy Dashboard, so values that only update every few minutes would be fine, as the dashboard only updates once an hour. I'll bring this up with Zendure, maybe we'll see an integration for HomeAssistant at some point.

z-master42 commented 1 week ago

Good luck.

Since MQTT is available, there is no reason for a separate HA integration. Zendure just needs to improve its data transmission.

jschroeter commented 1 week ago

In my eyes, however, Zendure has simply done a bad job, as the current values don't really matter. Nice to have for the display but you can't do much with it.

Agreed. I posted my current workaround here: https://github.com/Zendure/developer-device-data-report/issues/47#issuecomment-2346567622

Since so far it seems there is no activity from Zendure on this I'm thinking about trying https://github.com/reinhard-brandstaedter/solarflow-control, did someone try it already? Some people are working on integrating it with HA: https://github.com/reinhard-brandstaedter/solarflow-control/issues/204

I'll bring this up with Zendure

Thanks!

Since MQTT is available, there is no reason for a separate HA integration.

Well, I still think a real HA integration would be nice to not have the need to fiddle with all these details.