Growatt / Grott integration: how to add missing values?

Hi,
I use home assistant on a Pi 4, with a running Grott / MQTT installation.
My Growatt inverter is a MOD 4000TL3-XH with Smart Meter and battery.

Following values are not shown in entities, but I would really need them for my dashboard.

  • Load Consumption Energy - Today
  • Load Consumption Energy - Total

I found this in: /homeassistant/custom_components/grott/sensors/sensors_mqtt.py


 {
    "name": "Load Consumption Energy - Today",
    "device_class": SensorDeviceClass.ENERGY,
    "unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
    "state_class": SensorStateClass.TOTAL_INCREASING,
    "icon": "mdi:home-lightning-bolt",
    "func": lambda js: js['values']["elocalload_tod"],
    "divider": 10,
    "unique_name": "mqtt_064",
  },
  {
    "name": "Load Consumption Energy - Total",
    "device_class": SensorDeviceClass.ENERGY,
    "unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
    "state_class": SensorStateClass.TOTAL,
    "icon": "mdi:home-lightning-bolt",
    "func": lambda js: js['values']["elocalload_tot"],
    "divider": 10,
    "unique_name": "mqtt_065",
  },

Any Idea, how I can add both values?

Growatt / Grott integration: values missing, how to add?

At the moment it is dark so my MQTT shows nothing …not sure if I also receive this data
But … if it is in MQTT then you can just add a sensor for that

I think there are different templates for different inverter models and MOD is not yet defined?
In grott (2.7) configuration I added for “inverter mapping” {“XXXXXXXXXX”:“mod”} for testing and nothing came back.
With {“XXXXXXXXXX”:“sph”} I got a now 87 entities for 2 devices.

  • Load Consumption Energy fields are showing up but actually strange values
  • Also Battery fields are now present
    Without any entry I got 49 entities and also 2 devices.

But I am not sure if the mapping template of SPH is working well also for MOD inverters.

Where can I find the mapping templates, and maybe any hint how to reverse engineer them to get MOD integrated?

In the log I found also this lines…

  • Growatt packet received:
    <socket.socket fd=5, family=2, type=1, proto=0, laddr=(‘xxxxxxxxx’, 5279), raddr=(‘xxxxxxxxxxx’, 12216)>
    • Data less then minimum record length, data not processed

My mqtt output from grott does not have these, if I look at the grottconf.py, they only apply in special cases but I am not knowledgeable enough to define ‘which’.
I would raise a question with grott (the server part, not the fron-end you refer to above)
There are more forks, not sure which you used
johanmeijer/grott: Growatt inverter monitor (github.com)

indeed that is the fork I am using, worked best for me.
Will give a try, search the discussions on this part… thanks