Help with Grott

Hi All,

Fairly new to Home Assistant and was wondering since the Growatt API has stopped working has anyone been successfully in getting Grott working?

I would like to setup Grott and haven’t been successful yet.

What I’m using and what I’ve done so far
HA OS on Vmware 8.0
It has MQTT already in use on it as I’ve got a few solar projects running on it
I install grott on a ubuntu VM and started it as a service
Changed the IP address on the Growatt datalogger
Grott on that ubuntu server sees traffic from the datalogger
Now I just need to get the data from that Grott server to Home Assistant?

Thanks

1 Like

Yes…two options, either create the sensors from mqtt or try this
muppet3000/homeassistant-grott: Home Assistant Integration for Grott - MQTT (github.com)
These are mine via yaml config

mqtt: 

  sensor:
    - state_topic: energy/growatt
      value_template: "{{ value_json['device'] }}" 
      unique_id: growatt_serial
      name: Growatt - Serial number
      icon: mdi:select-inverse

    - state_topic: energy/growatt
    # If you like to have the date in another format, please change "timestamp_custom('%d-%m-%Y')"
    # For more information: https://docs.python.org/3/library/time.html#time.strftime
      value_template: "{{ as_timestamp(strptime(value_json['time'], '%Y-%m-%dT%H:%M:%S')) | timestamp_custom('%d-%m-%Y') }}" 
      unique_id: growatt_date
      name: Growatt - Date
      icon: mdi:calendar

    - state_topic: energy/growatt
    # If you like to have the date in another format, please change "timestamp_custom('%H:%M:%S')"
    # For more information: https://docs.python.org/3/library/time.html#time.strftime
      value_template: "{{ as_timestamp(strptime(value_json['time'], '%Y-%m-%dT%H:%M:%S')) | timestamp_custom('%H:%M:%S') }}" 
      unique_id: growatt_time
      name: Growatt - Time
      icon: mdi:clock-digital

    - state_topic: energy/growatt
      value_template: >
        {% if (value_json['values']['pvstatus'] | int == 0) %}
          Waiting
        {% elif (value_json['values']['pvstatus'] | int == 1) %}
          Normal
        {% elif (value_json['values']['pvstatus'] | int == 2) %}
          Fault
        {% else %}
          Unknown
        {% endif %}
      unique_id: growatt_status
      name: Growatt - State
      icon: mdi:power-settings

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv1watt'] | int / 10 }}" 
      unique_id: growatt_string1_watt
      device_class: power
      unit_of_measurement: "W"
      name: Growatt - String 1 (Watt)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv1voltage'] | int / 10 }}" 
      unique_id: growatt_string1_voltage
      device_class: voltage
      unit_of_measurement: "V"
      name: Growatt - String 1 (Voltage)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv1current'] | int / 10 }}" 
      unique_id: growatt_string1_current
      device_class: current
      unit_of_measurement: "A"
      name: Growatt - String 1 (Current)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv2watt'] | int / 10 }}" 
      unique_id: growatt_string2_watt
      device_class: power
      unit_of_measurement: "W"
      name: Growatt - String 2 (Watt)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv2voltage'] | int / 10 }}" 
      unique_id: growatt_string2_voltage
      device_class: voltage
      unit_of_measurement: "V"
      name: Growatt - String 2 (Voltage)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pv2current'] | int / 10 }}" 
      unique_id: growatt_string2_current
      device_class: current
      unit_of_measurement: "A"
      name: Growatt - String 2 (Current)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvpowerin'] | int / 10 }}" 
      unique_id: growatt_actual_input_power
      device_class: power
      unit_of_measurement: "W"
      name: Growatt - Input watt (Actual)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvpowerout'] | int / 10 }}" 
      unique_id: growatt_actual_output_power
      device_class: power
      unit_of_measurement: "W"
      name: Growatt - Output watt (Actual)

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvfrequentie'] | int / 100 }}" 
      unique_id: growatt_grid_frequency
      unit_of_measurement: "Hz"
      name: Growatt - Grid frequency
      icon: mdi:waveform

    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvgridvoltage'] | int / 10 }}" 
      unique_id: growatt_phase_voltage
      device_class: voltage
      unit_of_measurement: "V"
      name: Growatt - Phase voltage
      
    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvenergytoday'] | int / 10 }}" 
      unique_id: growatt_generated_energy_today
      device_class: energy
      state_class: total
      unit_of_measurement: "kWh"
      name: Growatt - Generated energy (Today)
      icon: mdi:solar-power
      
    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvenergytotal'] | int / 10 }}" 
      unique_id: growatt_generated_energy_total
      device_class: energy
      state_class: total
      unit_of_measurement: "kWh"
      name: Growatt - Generated energy (Total)
      icon: mdi:solar-power
      
    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['epvtotal'] | int / 10 }}" 
      unique_id: growatt_epv_total
      device_class: energy
      state_class: total
      unit_of_measurement: "kWh"
      name: Growatt - EPV (Total)
      icon: mdi:solar-power
      
    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['epv1today'] | int / 10 }}" 
      unique_id: growatt_epv_today
      device_class: energy
      state_class: total
      unit_of_measurement: "kWh"
      name: Growatt - EPV (Today)
      icon: mdi:solar-power


    - state_topic: energy/growatt
      value_template: "{{ value_json['values']['pvtemperature'] | int / 10 }}" 
      unique_id: growatt_inverer_temperature
      device_class: temperature
      unit_of_measurement: "°C"
      name: Growatt - Inverter temperature

i.e. I am assuming that the MQTT server is having those topics from your grott server

As obviously many newbies I have spent hours of frustration with Homeassistant and Grott.
I am a semi retired electrical master engineer of 62 years and have my 10kVA PV 1fase 230V System in Spain set up with 10kWh Lifepo4 from Pylontec plus 10kWh from Orientpower on 2 new SPF 5000 and am controlling the load or demand side with 5 SSR plus some Shelly and ESP.

My question is should I give up on GROTT and HOMEassistant and switch all analog ?

I get problems with depression from GROTT and Home Assistant as I have already spent 100+ hours and several month on it and it seems this is not likely to work ever.

1 Like

can somebody set up Grott for 200€ for me via teamviewer? the young German HA guy who I know was not able to achieve much or did not really want to work.

So… I am not too young myself but no clue whar Orientpower Pylontec SSR etc…
The idea of grott is to receive the data via a shine-thing or sniff network, then put that to a MQTT
Assuming you are using a shine-thing then is this connected to the same network (segment) as your grott server? Have you installed grott as a separate container? Any logs from grott? If grott is starting up correctly and connects to MQTT…can you send me the config?
Have you been able to change the server IP to the grott one on the shine-thing?

1 Like

I’m also stumbling on having any data from my Growatt inverter. The yaml config which is mentioned, where is this stored?

So, I have the container version and in the persistent volume there is a grott.ini.
Aside the mapping to mqtt and mapping to the growatt could (if one wants this) most was left as-is

Please specify what HA version you use, how you set Grott up etc. difficult guessing
EDIT: this is my setup
My growatt connects via shine stick to a wifi range extender
My grott is a container on my HA server (also container version)
The shine stick is configured to map to my grott container…this was the most tricky thing I found
On the same HA server I also have MQTT and grott connects to that
If you reached this point then from there on it is simple as HA can get the data from MQTT

Apparently one can skip the connection shine > grott by sniffing network trffic but never tried it

1 Like

Thanks for this. I used your yaml.

But I have two inverters with different device serial number and now they end up in the same entities.
Do you know how to seperate them into a different entity per ‘device’?

Do they show these 2 inverters show with different topics in MQTT? use mqtt explorer (if not already doing so) to analyse this

1 Like

no, it’s one and the same topic.

Oct 15 16:42:22 energy/growatt {“device”: “TP…”,
Oct 15 16:42:22 energy/growatt {“device”: “FZ…”,

donot understand, if it is one topic than I would have expected one json rep of it, does it switch from one to the other?

Damn, I missed the mqttinverterintopic=“True” configuration option. I’ll check it now.

Noting that I have no direct exp. with 2 inverters and how they are pushed to mqtt …but did you alter the grott.ini to handle multiple inverters too?

Yes, ofc

[Generic]
invtype=default
invtypemap = {‘G…’: ‘sph’, ‘TP…’: ‘sph’, ‘5F…6’: ‘default’}

[MQTT]
mqttinverterintopic = True

But it’s still publishing to the energy/growatt topic witout /device added to the topic sadly

Can you please post the whole json obfuscating any identifier?

Alomg this below the topic should have the id added
Multi Inverter support · johanmeijer/grott Wiki (github.com)

Sure

[Generic]
invtype=default
invtypemap = {'GPxx': 'sph', 'TPxx': 'sph', '5Fxx': 'default'}
ip = x.x.x.x
port = 5279

[Growatt]

[MQTT]
mqttinverterintopic = True
ip = x.x.x.x
port = 1883
topic = energy/growatt
auth = True
user = xxx
password = xxx

[PVOutput]

[influx]

[extension]

Not the ini or yaml but the json .i.e the topic in MQTT… trying to see how grott build this