johanmeijer / grott

Growatt inverter monitor
https://github.com/johanmeijer/grott/wiki
374 stars 103 forks source link

HA receiving MQTT data from grott, but not processing it? #498

Closed babipanghang closed 5 months ago

babipanghang commented 6 months ago

Good afternoon,

I'm not quite sure if this is an issue with GROTT, HA or Mosquitto, but please bear with me.

I have grott setup using a docker container, which appears to be working fine. The container logs messages with data, ending in something like this each time:

     - MQTT jsonmsg: 
             {"device": "REH1B170AP", "time": "2023-12-26T12:22:24", "buffered": "no",
             "values": {"recortype1": 0, "recortype2": 124, "pvstatus": 1, "pvpowerin":
             4753, "pv1voltage": 2384, "pv1current": 11, "pv1watt": 2622, "pv2voltage":
             2664, "pv2current": 8, "pv2watt": 2131, "pvpowerout": 0, "pvfrequentie": 0,
             "pvgridvoltage": 0, "pvgridcurrent": 0, "pvgridpower": 0, "pvgridvoltage2":
             0, "pvgridcurrent2": 0, "pvgridpower2": 0, "pvgridvoltage3": 0,
             "pvgridcurrent3": 0, "pvgridpower3": 302519177, "totworktime": 524288,
             "pvenergytoday": 118361923, "pvenergytotal": 255463250, "epvtotal": 25,
             "epv1today": 101118, "epv1total": 53893833, "epv2today": 12, "epv2total":
             52709, "pvtemperature": 573, "pvipmtemperature": 0}}
     - MQTT message message sent

And mosquitto (installed as a HA addon) has similar logs:

2023-12-26 12:20:23: New connection from 192.168.1.91:36925 on port 1883.
2023-12-26 12:20:23: New client connected from 192.168.1.91:36925 as automatic (p2, c1, k60, u'mqtt').
2023-12-26 12:20:23: Client automatic disconnected.

So as far as i can tell, everything is fine up to that point. However, GROTT does not appear as an MQTT device in HA, nor does it show any grott entities. I know MQTT is actually working fine, as i have other MQTT devices working without any issues.

Now i have installed both the Home Assistant custom component and the Grott Home Assistant with native MQTT integration . The latter set not to start, because i really don't need two grott installations, i just want proper processing of my MQTT messages. FYI, i also tried using grott as an integration, but the results were the same.

Now i'm at a loss on what is happening here. Anyone have a clue or any insights in how to debug this?

babipanghang commented 5 months ago

I'm sorry, it appears i have some way managed to not enable muppet3000's custom component. After some fiddling around, it just started working.