muppet3000 / homeassistant-grott

Home Assistant Integration for Grott - MQTT
MIT License
65 stars 14 forks source link

Battery charge percentage - GROWATT-ARK-HV-12.8 #53

Closed rndxelement closed 8 months ago

rndxelement commented 8 months ago

Greetings,

I'm trying to read the battery charge of a GROWATT-ARK-HV-12.8 battery. The problem is, that the data read by grott only contains SOC=0 (State of Charge), although I know that the battery is close to fully charged. I'm helping a relative on this, so there might be other Growatt devices other than the battery sending data as well.

I suspect the problem is that the specific layout used is not yet supported by grott, but I'm not sure.

This is part of the output in HA: image I'm not well educated on those values, but they seem off to me. Also State of Charge is at 0,0%, although it should be close to 100%.

I see different kinds of layouts in the grott log:

T060104XSPH

     - Growatt packet received:
          <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.24.0.2', 35088), raddr=('47.91.67.66', 5279)>
     - Growatt original Data:
         \x00\x5f\x00\x06\x03\x3f\x01\x04\x1f\x35\x2b\x41\x22\x3e\x43\x77\x36\x5a\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x2c\x2f\x27\x42\x36\x75\x41\x5f\x47\x50\x74\x74\x47\x72\x6f\x77\x61\x74\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x76\x7d\x7f\x4c\x74\x63\x74\x62
         \x9c\x70\x23\x72\x69\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x54\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x08\x60\x7e\xe7\x72\x38\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x60\x70\x74\x41\x6b\x0a\x77\x9b\x74\x74\x47\x72
         \x6f\x77\x4c\xad\x74\x47\x72\x6f\x77\x61\x2e\x38\x47\x72\x6f\x68\x61\x74\x2f
         \xe4\x72\x6f\x77\x50\x74\x74\x23\x14\x6f\x77\x61\x6b\x74\x47\xf4\xe9\x77\x61
         \x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\xc6
         \x72\x6f\x77\x61\x74\x23\x4d\xd2\x6c\x85\x60\x23\x74\xbd\x73\x58\x65\xef\x74
         \x74\x47\x79\x6f\xd6\x61\x10\x7f\x5f\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x4c\x6a\x66\x4f\x6c\x37\x79\x7f\x77
         \x26\x76\x71\x75\x70\x47\x9f\x6e\x75\x64\x60\x74\x17\x72\x6a\x77\x36\x74\x71
         \x47\x72\x6f\xf7\x61\x74\x70\x22\x76\x8e\x77\x59\x74\x74\x38\x69\x6f\x77\x13
         \xac\x77\xaf\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x71
         \x77\x61\x2e\xd9\x47\x72\x6f\x68\x61\x74\x2d\xb7\x72\x6f\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x46\x72\x6c\xe4\x0d\x74\x75\x47\x71\xa8\xbd\x70\x8b
         \x65\xb8\x63\x90\x66\x9e\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x23\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61
         \x74\x74\x47\x72\x6f\x77\x61\x75\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x75\xbf\x7f\x2d\x74\x72
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61
         \x74\x74\x46\x60\x6a\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x8d\x90
         \xfa\x49\x74\x74\x46\xe2\x90\x88\xf7\x98\xe2\xab\xe4\x83\xe1\x8d\xe2\x98\xd1
         \x9e\xf9\x9b\xf7\x98\xe2\xab\xe4\x83\xe1\x8d\x74\x74\x47\x72\x7c\xfd\x71\x72
         \x74\x6e\x72\x6f\x04\xd4\x64\x6c\x47\x5b\x6f\x77\x61\x74\x64\x0f\x72\x46\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x75\x77\x61\x27\x04\x44\x89
         \x31\xd4\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61
         \x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6e\xdb\x61\xbc\x75\xf7
         \x72\x6f\x7d\xff\x6d\x10\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x59\x72\x6f\x2d\xcc\x74\x74\x47\x4a\x6f\x77
         \x1e\x6f\x74\x47\x00\xb7\x77\x61\x74\x75\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\xd2\x34
     - Grott automatic protocol detection
     - Grott data record length 839
     - layout   :  T060104XSPH
     - no matching record layout found, try generic
     - Record layout used :  T06NNNNXSPH
     - Growatt data decrypted V2
     - Grott Growatt data decrypted
     - Growatt plain data:
         005f0006033f010458474436434a3730443500000000000000000000000000000000000000004
         3584636423233303031000000000000000000000000000000000000000017090b0b060c0303e8
         046400060000000000000000002000000000000000000000000069140aa000570000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         000000000001040006196500fa0000000000002dd90000000000005a4c0000001f00005ba3000
         00031000064660000001f00008686000000000000000000000000000000000000000000000000
         000000000000000000000000000000810000000000570aa003f2015700fa0137128e0000000b0
         0a100640b1800000000000000000000000000000000000000000b1809380d430d380549011001
         0400ed010205140050000500570005000000800000046504e1003800007f1b000072d803e8000
         0000000000000000000000000001e00005aad0000001f000059f0000000000000000000000000
         00010003936c00010003c7ca11ff11ff11ff11ff0000000000000000000000000000000000510
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000100000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         0000000000007d0084c0006000000000000000000000000000000000000000000011205000000
         000000000000000000ffff8d2800000190ffff96ec96ec96ec96ec96ec96ec96ec96ec96ec96e
         c96ec00000000138a10060029000073b510180029000000001048002900000000000000000000
         0000001a0000537003fb5ea300000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000001ac00c801b000000a9e19640000000000000000000000000000000000000000001e000
         05aad0000003800007f1b000072d80000000100000000000000000000a555
     - Growatt new layout processing
         - decrypt       :  True
         - offset        :  6
         - record layout :  T06NNNNXSPH
     - Grott data record date/time processing started
     - date-time:  2023-09-11T11:06:12
     - Grott values retrieved:
         -  datalogserial        :  XGD6CJ70D5
         -  pvserial             :  CXF6B23001
         -  pvstatus             :  6
         -  pvpowerin            :  0.0
         -  pv1voltage           :  0.0
         -  pv1current           :  0.0
         -  pv1watt              :  209715.2
         -  pv2voltage           :  0.0
         -  pv2current           :  0.0
         -  pv2watt              :  0.0
         -  pvpowerout           :  0.0
         -  pvfrequentie         :  0.0
         -  pvgridvoltage        :  0.0
         -  pvgridcurrent        :  0.0
         -  pvgridpower          :  1703936.6
         -  pvgridvoltage2       :  650.1
         -  pvgridcurrent2       :  25.0
         -  pvgridpower2         :  0.0
         -  pvgridvoltage3       :  0.0
         -  pvgridcurrent3       :  1173.7
         -  pvgridpower3         :  0.0
         -  totworktime          :  446.0
         -  eactoday             :  203161.6
         -  pvenergytoday        :  203161.6
         -  eactotal             :  153740902.4
         -  epvtotal             :  2038644.6
         -  epv1today            :  168440627.2
         -  epv1total            :  203161.6
         -  epv2today            :  225692876.8
         -  epv2total            :  0.0
         -  pvtemperature        :  0.0
         -  pvipmtemperature     :  1.1
         -  pvboosttemp          :  16.1
         -  bat_dsp              :  284.0
         -  eacharge_today       :  8867048.0
         -  eacharge_total       :  1703959.7
         -  batterytype          :  5
         -  uwsysworkmode        :  56
         -  systemfaultword0     :  0
         -  systemfaultword1     :  32539
         -  systemfaultword2     :  0
         -  systemfaultword3     :  29400
         -  systemfaultword4     :  1000
         -  systemfaultword5     :  0
         -  systemfaultword6     :  0
         -  systemfaultword7     :  0
         -  pdischarge1          :  0.0
         -  p1charge1            :  0.0
         -  vbat                 :  3.0
         -  SOC                  :  0
         -  pactouserr           :  152128716.8
         -  pactousertot         :  0.0
         -  pactogridr           :  0.0
         -  pactogridtot         :  6553.9
         -  plocaloadr           :  335190886.3
         -  plocaloadtot         :  0.0
         -  spdspstatus          :  0.0
         -  spbusvolt            :  0.0
         -  etouser_tod          :  530841.6
         -  etouser_tot          :  0.0
         -  etogrid_tod          :  0.0
         -  etogrid_tot          :  0.0
         -  edischarge1_tod      :  0.0
         -  edischarge1_tot      :  0.0
         -  eharge1_tod          :  0.0
         -  eharge1_tot          :  0.0
         -  elocalload_tod       :  0.0
         -  elocalload_tot       :  0.0
     - MQTT jsonmsg: 
             {"device": "CXF6B23001", "time": "2023-09-11T11:06:12", "buffered": "no",
             "values": {"datalogserial": "XGD6CJ70D5", "pvserial": "CXF6B23001",
             "pvstatus": 6, "pvpowerin": 0, "pv1voltage": 0, "pv1current": 0, "pv1watt":
             2097152, "pv2voltage": 0, "pv2current": 0, "pv2watt": 0, "pvpowerout": 0,
             "pvfrequentie": 0, "pvgridvoltage": 0, "pvgridcurrent": 0, "pvgridpower":
             17039366, "pvgridvoltage2": 6501, "pvgridcurrent2": 250, "pvgridpower2": 0,
             "pvgridvoltage3": 0, "pvgridcurrent3": 11737, "pvgridpower3": 0,
             "totworktime": 3211264, "eactoday": 2031616, "pvenergytoday": 2031616,
             "eactotal": 1537409024, "epvtotal": 20386446, "epv1today": 1684406272,
             "epv1total": 2031616, "epv2today": 2256928768, "epv2total": 0,
             "pvtemperature": 0, "pvipmtemperature": 11, "pvboosttemp": 161, "bat_dsp":
             2840, "eacharge_today": 88670480, "eacharge_total": 17039597, "batterytype":
             5, "uwsysworkmode": 56, "systemfaultword0": 0, "systemfaultword1": 32539,
             "systemfaultword2": 0, "systemfaultword3": 29400, "systemfaultword4": 1000,
             "systemfaultword5": 0, "systemfaultword6": 0, "systemfaultword7": 0,
             "pdischarge1": 0, "p1charge1": 0, "vbat": 30, "SOC": 0, "pactouserr":
             1521287168, "pactousertot": 0, "pactogridr": 0, "pactogridtot": 65539,
             "plocaloadr": 3351908863, "plocaloadtot": 0, "spdspstatus": 0, "spbusvolt":
             0, "etouser_tod": 5308416, "etouser_tot": 0, "etogrid_tod": 0,
             "etogrid_tot": 0, "edischarge1_tod": 0, "edischarge1_tot": 0, "eharge1_tod":
             0, "eharge1_tot": 0, "elocalload_tod": 0, "elocalload_tot": 0}}
     - Grott MQTT topic used : energy/growatt
     - MQTT message message sent

T060119SPH

     - Growatt packet received:
          <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.24.0.2', 35088), raddr=('47.91.67.66', 5279)>
     - Growatt original Data:
         \x00\x01\x00\x06\x00\x38\x01\x19\x1f\x35\x2b\x41\x22\x3e\x43\x77\x36\x5a\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x63\x61\x60\x2c\x1f\x2a\x37\x2f\x39\x2c\x2c\x1f\x2a\x37\x2f\x39\x2c\x2c
         \x1f\x2a\x37\x2f\x39\x60\xcf
     - Grott automatic protocol detection
     - Grott data record length 64
     - layout   :  T060119SPH
     - no matching record layout found, try generic
     - Record layout used :  T060119SPH
     - Growatt data decrypted V2
     - Grott Growatt data decrypted
     - Growatt plain data:
         000100060038011958474436434a3730443500000000000000000000000000000000000000000
         0140014585858585858585858585858585858585858585814bb
     - Grott data ack record or data record not defined no processing done

T060116SPH

     - Growatt packet received:
          <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.24.0.2', 35088), raddr=('47.91.67.66', 5279)>
     - Growatt original Data:
         \x00\x06\x00\x06\x03\x3f\x01\x03\x1f\x35\x2b\x41\x22\x3e\x43\x77\x36\x5a\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x2c\x2f\x27\x42\x36\x75\x41\x5f\x47\x50\x74\x74\x47\x72\x6f\x77\x61\x74\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x76\x7d\x7f\x4c\x76\x43\x74\x61
         \x74\x74\x3b\x72\x6e\x5e\x29\x74\x74\x47\x4e\x6f\x13\x46\x64\x74\x47\x69\x37
         \x77\x61\x2d\x3c\x76\x5c\x5f\x77\x3b\x30\x35\x06\x72\x6a\x77\x63\x74\x74\x42
         \x0a\x6f\x4b\x61\x48\x74\x23\x72\x0b\x77\x61\x37\x2c\x01\x44\x2d\x45\x52\x44
         \x44\x76\x63\x68\x81\xec\x74\x75\x47\x28\x6f\x77\x61\x74\x54\x67\x3c\x0a\x02
         \x04\x54\x31\x29\x17\x1d\x10\x08\x11\x54\x67\x72\x6e\x79\xec\x74\x74\x40\x95
         \x6f\x7e\x61\x7f\x74\x4c\x72\x6a\x77\x77\x74\x75\x4a\x48\x7e\x92\x73\xb4\x67
         \xfd\x7e\x8c\x63\x5a\x66\x28\x53\x22\x6f\x77\x61\x74\x74\x47\x72\x6f\x7a\x5b
         \x65\x6a\x54\x24\x7c\xeb\x61\x60\x74\x53\x72\x7b\x77\x75\x74\x60\x47\x66\x6f
         \x73\x61\x70\x74\x47\x72\x6f\x77\x61\x74\x74\x56\x6c\x6f\x77\x38\x3c\x35\x06
         \x42\x5b\x47\x57\x44\x41\x47\x72\x6e\x46\x61\x70\x74\x47\x61\xf3\x77\x49\x65
         \x6a\x57\xbc\x61\x76\x6f\x25\x74\x53\x72\x7b\x67\x36\x7b\xe4\x47\x5a\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x77\x47\x72\x6e\xc3\x61\x8b\x3a\x67\x72
         \x90\x39\x41\x74\x8b\x09\x52\x6f\x88\x2f\x54\x65\x40\x84\xe2\x66\x66\x65\x73
         \x47\x72\x6f\x77\x61\x74\x77\xaf\x76\x0b\x77\xa9\x74\x74\x47\x72\x6f\x45\x60
         \xa2\x76\x78\x72\x6f\x77\x61\x66\x71\x43\x3e\x6d\xcb\x65\x38\x76\x1f\x72\x6f
         \x77\x61\x74\x74\x47\x73\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x71\x6f\x77\x61\x7e\x74\x4d\x72\x0b\x77
         \x05\x74\x75\x47\x72\x6f\x13\x61\x10\x74\x47\x72\x6e\x77\x61\x74\x74\x47\x72
         \x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x75\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x05
         \x74\x7e\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47
         \x72\x0b\x77\x05\x74\x75\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x77\x60\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x76\x0a\x73\x80\x35\x25
         \x0d\x41\x5f\x47\x51\x44\x46\x75\x43\x5b\x47\x51\x36\x23\x47\x72\x6f\x77\x61
         \x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74
         \x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61
         \x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f
         \x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47
         \x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74
         \x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x25\x36\x06\x13\x4f\x05\x3b\x31\x35\x26\x52
         \x63\xf0\xfa
     - Grott automatic protocol detection
     - Grott data record length 839
     - layout   :  T060103XSPH
     - no matching record layout found, try generic
     - Record layout used :  T060103XSPH
     - Growatt data decrypted V2
     - Grott Growatt data decrypted
     - Growatt plain data:
         00060006033f010358474436434a3730443500000000000000000000000000000000000000004
         3584636423233303031000000000000000000000000000000000000000017090b0b042c030000
         007c000129480000003c0064271000001b5800005948312e30005a44414100050002000005780
         03c003c006400640000435846364232333030311107f68d0001005a0000000020204e65756520
         456e6572676965202000010e8d000007e70009000b000b0005001600010d3a11e512c013ba0ce
         3143b125c145000000000000000000d3a111e1356139c00140014001400140014001400040004
         0000000000000000111e0000594841413034303630350000013100040000139c0028111e10ce0
         e010e510014001410570f900028000000000000000000000003000001b400ff4e2000ff4e2000
         ff4e2000ff4e201107f68d1107110700000000000003e8046400c800000000003201d6023f000
         000001205044c02bc044c02580000000000000001000000000000000000000000000000000000
         0000000000000000000000000000000000000000000000030000000a000a00640064000100000
         06400640000000100000000000000000000000000000000000000000000000100000000000000
         00000000000000000000000064000a00000000000000000000000000000000000000000000000
         00000000000000000000000000064006400010000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000001000000000
         00000000000046504e141514a3330303030323231343030425700000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         00000000000000000000000000000000000000000000000000000000000000000000000000000
         0000000000000000000000000000000005142416120725a454161200c879b
     - Grott data ack record or data record not defined no processing done

T060119SPH

     - Growatt packet received:
          <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.24.0.2', 52996), raddr=('47.91.67.66', 5279)>
     - Growatt original Data:
         \x00\x01\x00\x06\x00\x25\x01\x19\x1f\x35\x2b\x41\x22\x3e\x43\x77\x36\x5a\x77
         \x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72\x6f\x77\x61\x74\x74\x47\x72
         \x6f\x73\x61\x75\x45\xf6\x66
     - Grott automatic protocol detection
     - Grott data record length 45
     - layout   :  T060119SPH
     - no matching record layout found, try generic

So only packets with the layout T060104XSPH are actually processed.

As the records with the layout T060103XSPH seem to be of about the same size as the T060104XSPH records, I'd suspect that they might contain the battery data I am looking for.

The grott config looks like this:

# Specify grott monitor configuration
# Defaults are described
# Remove # and update the value to enable the setting
# Last updated: 2022-11-04
# Version 2.7.0

[Generic]
# Specify verbose for extended messaging
#verbose = True

# Specify minrecl for debugging purposes only (default = 100)
minrecl = 1

# Specify mode (sniff or proxy)(> 2.1.0 proxy is default)
#mode = proxy

# Specify port and IP address to listen to (only proxy), default port 5279, 0.0.0.0 ==> own ip address
#ip = 0.0.0.0
#port = 5279  

# To blocks commands from outside (to channge inverter and shine devices settings) specify blockcmd = True,
# Specify noipf = True if you still want be able to set the destination ip addres from growatt server (advice 
# only to use this for a short time)
#blockcmd = True 
#noipf = True

# Time = auto/server parameter enable/disable date/time retrieval from data record (server), default is 
# auto: grott decides which time is used (data record if valid otherwise Server) 
# If time = server Grott server time is alwas used
#time = auto 

# Sendbuf = True / False parameter to enable  / disable sending historical (buffered) data. Default is sendbuf = True.
#sendbuf = True 

# Compat is True and valoffset needs to be set if offset / growatt protocol has been changed. 
#compat = False
#valueoffset = 6

# Specify inverter id (not necessary in version >2.1.0 if compat = false!)
#inverterid = ABC1234567
# Specify the type of the inverter (default/sph/spf/max)
invtype = sph

# Decrypt is False if growatt communication is not encrypted (older inverters), (not necessary in version
# >2.1.0 if compat = false!)
#decrypt = True

[Growatt] 
# Server name/IP address and port of Growatt server
# specify only if the IP address of server.growatt.com is changed
# The address as of Nov 2022 is 47.91.67.66

#ip = server.growatt.com
#ip = 47.91.67.66
#port = 5279                                                        

[MQTT]
# Mqtt parameters definitions
# Be aware nomqtt = True means no MQTT processing will be done!!!!!!

#nomqtt = False
ip = 192.168.2.22
port = 1883
topic= energy/growatt
auth = True
user = ***
password = ***

[PVOutput]
# PVOutput parameters definitions

#pvoutput = True
#apikey = yourapikey 
# Data upload limit (in minutes)
#pvuplimit = 5
# Use this if you have one inverter
#systemid = 12345

# Use this if you have multiple inverters
#pvinverters = 2
#systemid1 = 12345
#inverterid1 = inverter1
#systemid2 = 67890
#inverterid2 = inverter2

#systemid99 = 99999
#inverterid99 = inverter99

[influx]
# Influxdb parameters definitions

#influx = False
#influx2 = False
#dbname = grottdb
#ip = localhost
#port = 8086
#user = grott
#password = growatt2020
#token  = "influx_token"
#org  = "grottorg"
#bucket = "grottdb" 

[extension] 
# grott extension parameters definitions

#extension = True
#extname = grottext
#extvar = {"var1": "var1_content", "var2": "var2_content"}

The last ~10000 lines of the log file: https://pastebin.com/qZwQPvMP

The setup is HA OS with the Grott addon from egguy and your Grott custom integration.

I'd greatly appreciate any help, thanks!

muppet3000 commented 8 months ago

Hi,

Thanks for the detailed information, looking through it I can see that the messages going into Grott from your inverter are showing the SoC as 0, all my integration does is read the values Grott puts into MQTT and then format and present them. Therefore the place to log this issue is over in the following GitHub repo: https://github.com/johanmeijer/grott/issues

Please feel free to link to this ticket and leave this one open until it's resolved.

rndxelement commented 8 months ago

Hi,

thanks for the quick reply! I thought so too, so a while ago I filed an issue in that repo: https://github.com/johanmeijer/grott/issues/407

Let's wait :)

rndxelement commented 8 months ago

I managed to solve it by switching to the 2.8 beta branch of grott and using invtype=spa. I'll close this issue. Thanks for your help and the great HA integration @muppet3000 !