Openinverter Gateway Growatt Shinewifi-x

Hello,
maybe someone can help. I don’t get it. I’ve got the MIC-2000-TL-X and the Shinewifi-x with Openinverter Gateway. I can connect to the Dongle and see the data.
I tried to understand the manual on here for MQTT. I changed my “configuration.yaml”.
But there is only the “Growatt.TotalGenerateEnergy” on the Dashboard. How can i add more sensors? I don’t understand much of this code-thing.

Hi, since you have only added that sensor to your configuration.yaml, you get only “Growatt.TotalGenerateEnergy”.
This also means that you have established the connection and configuration to make your inverter communicate with HA. :+1:

It seems you have used Version for protocol 1.24 right?

Yes should be 1.24. I just checked out the “Growatt.TotalGenerateEnergy” shows nothing in home assistant.
I’m not sure if home assistant talks to the growatt-stick. Maybe i just buy a shelly and install it into the powerline of the inverter. That is much easier.

So i got a shelly, programed the folowing. if growatt power ist more than 400w for 10 minutes, then switch another shelly on.
But this is not working. I can’t figure out why. growatt power was over 500w all the time.

'1739461364743'
alias: Last ein
description: ''
triggers:
  - type: power
    device_id: 75eb5d8a98d6e05bef6f0e49df1f2fcb
    entity_id: 5c70e32b825a3f2c638e4213139f5630
    domain: sensor
    trigger: device
    above: 400
    for:
      hours: 0
      minutes: 10
      seconds: 0
conditions: []
actions:
  - type: turn_on
    device_id: 8effc04911bb8f67e73c6af1538676b0
    entity_id: 835e309460bb289cde846d76b7aa5f13
    domain: switch
mode: single

How did you cook up that trigger to be like that?!?

Your trigger should be:

trigger: numeric_state

I managed to show the Total Energy (there was a configuration error in the Growatt inverter settings).
But the AC Power is not working.

Hi, if you want help:

  1. don’t post yaml code as a picture
  2. show the full code for that sensor

Sorry,
my yaml:

> # Loads default set of integrations. Do not remove.
> default_config:
> 
> # Load frontend themes from the themes folder
> frontend:
>   themes: !include_dir_merge_named themes
> 
> automation: !include automations.yaml
> script: !include scripts.yaml
> scene: !include scenes.yaml
> 
> ########neustartba                       
> shell_command:
>   ba_restart185: curl -X POST http://192.168.1.185/api/system/restart
>   ba_restart235: curl -X POST http://192.168.1.235/api/system/restart
>   ba_restart157: curl -X POST http://192.168.1.157/api/system/restart
>   ba_restart136: curl -X POST http://192.168.1.136/api/system/restart
>   ba_restart180: curl -X POST http://192.168.1.180/api/system/restart
> 
> sensor:
>   - platform: average
>     name: 'Averagepv15'
>     duration:
>       minutes: 15
>     entities:
>       - sensor.growatt_inverter_switch_0_power
> 
> 
> mqtt:
>   sensor:
>     - state_topic: "energy/solar"
>       unique_id: "growatt_wr_total_production"
>       name: "Growatt.TotalGenerateEnergy"
>       unit_of_measurement: "kWh"
>       value_template: "{{ float(value_json.TotalGenerateEnergy) | round(1) }}"
>       device_class: energy
>       state_class: total_increasing
>       json_attributes_topic: "energy/solar"
>       payload_available: "1"
>       availability_mode: latest
>       availability_topic: "energy/solar"
>       availability_template: "{{ value_json.InverterStatus }}"
>       
> template:
>   - sensor:
>       - name: "Growatt inverter AC Power"
>         unit_of_measurement: "W"
>         state: "{{ float(state_attr('sensor.growatt_inverter', 'OutputPower')) }}"

Check

{{ float(state_attr('sensor.growatt_inverter', 'OutputPower')) }}

in

Open your Home Assistant instance and show your template developer tools.

i used the values from here for protocol 1.24.
i’m not a programmer so i don’t realy understand this text. i also tried the code for protocol 3.05, it creates more values in my homescreen, but these are not working because i don’t have 3.05 with my stick.

Do you have a sensor.growatt_inverter ?

yes the sensor is there (helper). If i click on settings, there is this: " This entity does not have a unique ID"

This notice is not related to the issue.

Entering this template should return a result:

There is an error. Seems something is missing.

template

I’m not good with these templates…
Try:

{{ state_attr('sensor.growatt_inverter', 'OutputPower') }}

The answer is “null” maybe “zero” in english. I didn’t manage to change the HA to english language. So here is the screenshot for the german answer to this template.

the sensor shows unknown all day (before it was “not available”).

I guess there is something missing and i think the documentation on github for protcoll 1.24 is not correct. I also read about to get the json-values directly out of the inverter, but i have no idea how to do this.