muppet3000 / homeassistant-grott

Home Assistant Integration for Grott - MQTT
MIT License
73 stars 17 forks source link

PV3 missing on tl3 configuration #6

Closed shocker2 closed 1 year ago

shocker2 commented 1 year ago

Hello, The values I have for home assistant:

image

Values on Grott

image

For example the PV3 is missing.


grott        |                   {"device": "hidden", "time": "2023-05-12T16:42:12", "buffered": "no",
grott        |                   "values": {"datalogserial": "hidden", "pvserial": "hidden",
grott        |                   "recortype1": 0, "recortype2": 124, "pvstatus": 1, "pvpowerin": 53067,
grott        |                   "pv1voltage": 5011, "pv1current": 31, "pv1watt": 15534, "pv2voltage": 4114,
grott        |                   "pv2current": 28, "pv2watt": 11519, "pv3voltage": 6846, "pv3current": 38,
grott        |                   "pv3watt": 26014, "pvpowerout": 53007, "pvfrequentie": 4998,
grott        |                   "pvgridvoltage": 2312, "pvgridcurrent": 77, "pvgridpower": 17802,
grott        |                   "pvgridvoltage2": 2371, "pvgridcurrent2": 81, "pvgridpower2": 19205,
grott        |                   "pvgridvoltage3": 2345, "pvgridcurrent3": 76, "pvgridpower3": 17822,
grott        |                   "Vac_RS": 4057, "Vac_ST": 4070, "Vac_TR": 4041, "pvenergytoday": 404,
grott        |                   "pvenergytotal": 46818, "totworktime": 13197357, "epv1today": 126,
grott        |                   "epv1total": 13133, "epv2today": 79, "epv2total": 12158, "epvtotal": 44057,
grott        |                   "pvtemperature": 718, "pvipmtemperature": 769, "pvboottemperature": 674,
grott        |                   "temp4": 0, "uwBatVolt_DSP": 0, "pbusvolt": 3533, "nbusvolt": 3503}}```
muppet3000 commented 1 year ago

Thanks, I based it on my own system (SPH) so may not have had all the values available for mapping. So, to be clear, it's all the ones titled 'pv3' that are missing right?

If that's the case it won't be too hard for me to add them in.

If you're able to give me an explicit list of the specific ones you're missing I can add them in when I'm next working on it.

shocker2 commented 1 year ago

Thanks, I based it on my own system (SPH) so may not have had all the values available for mapping. So, to be clear, it's all the ones titled 'pv3' that are missing right?

If that's the case it won't be too hard for me to add them in.

If you're able to give me an explicit list of the specific ones you're missing I can add them in when I'm next working on it.

pvstatus (online/offline) pvenergytotal (not sure if that’s mapped as PV-All Energy - Total). PV3 Current PV3 Energy - Today PV3 Energy - Total PV3 Power PV3 Voltage totworktime

Also, I can see the "epv1today" not sure if you are taking the values from here and not from PV3 as I can see the "epv3" is missing from the list, and this might be the case for the missing data. Also not sure what the "e" stands for as it's not export, maybe energy :)

muppet3000 commented 1 year ago

Hahaha, don't try and make any guesses about why things are called certain names, it's absolute chaos!

The names you've provided are the ones you want them to show up as/what they used to be called in the old integration. Can I get the names that they appear as in grott as then I can map them on to the new naming scheme.

I'll try and take a look at implementing this over the weekend.

shocker2 commented 1 year ago

Hahaha, don't try and make any guesses about why things are called certain names, it's absolute chaos!

The names you've provided are the ones you want them to show up as/what they used to be called in the old integration. Can I get the names that they appear as in grott as then I can map them on to the new naming scheme.

I'll try and take a look at implementing this over the weekend.

Indeed, I was trying to see any documentation for the names, and seems that there is none (or at least I cannot find it).

values to be mapped: In general:

pvstatus
pvenergytotal
totworktime

the 3rd phase

pv3voltage
pv3current
pv3watt

for those two not sure what needs to be mapped, I think the values are missing

PV3 Energy - Today
PV3 Energy - Total
muppet3000 commented 1 year ago

pv3voltage - added as PV3 Voltage pv3current - added as PV3 Current pv3watt - added as PV3 Power epv3today - added as PV3 Energy - Today epv3total - added as PV3 Energy - Total

If I could get some feedback on what pvenergytotal should display and I'll add that one in too.

(Please can you test this out for me? It's on the 'main' branch if you're ok with using that on HACS).

shocker2 commented 1 year ago

Values are now automatically added, I'll check with the total values to see if everything is correct.

image

shocker2 commented 1 year ago

Everything is correct now. PV-All Power = PV1 Power + PV2 Power + PV3 Power, thank you!

I have checked the "pvenergytotal" and this represent the total number of energy produced since the installation.

In logs: pvenergytotal : 4774.6 In app is the 4.8MWh image

Now there is one small bug, I cannot see the: epv3today and epv3total but that's missing from Grott. I have raised https://github.com/johanmeijer/grott/issues/339 for this. Not sure if you can already update the config or if it will conflict if there is a missing value.

Thank you!

muppet3000 commented 1 year ago

and this represent the total number of energy produced since the installation.

Thanks for the update.

I've already added epv3today and epv3total to the config so whenever they appear in grott they'll start appearing in the HA integration as well.

I'll add in pvenergytotal next time I'm at my desk.

shampeon commented 1 year ago

My MIN-XH-US inverter has a PV4 input as well.

    - Grott values retrieved:
         -  pvserial             :  BGxxxxxx
         -  pvstatus             :  1
         -  pvpowerin            :  306.2
         -  pv1voltage           :  0.0
         -  pv1current           :  0.0
         -  pv1watt              :  0.0
         -  pv2voltage           :  73.7
         -  pv2current           :  4.0
         -  pv2watt              :  306.2
         -  pv3voltage           :  0.0
         -  pv3current           :  0.0
         -  pv3watt              :  0.0
         -  pv4voltage           :  0.0
         -  pv4current           :  0.0
         -  pv4watt              :  0.0
         -  pvpowerout           :  256.4
         -  pvfrequentie         :  60.0
         -  pvgridvoltage        :  246.2
         -  pvgridcurrent        :  1.1
         -  pvgridpower          :  256.8
         -  pvgridvoltage2       :  0.0
         -  pvgridcurrent2       :  0.0
         -  pvgridpower2         :  0.0
         -  pvgridvoltage3       :  0.0
         -  pvgridcurrent3       :  0.0
         -  pvgridpower3         :  0.0
         -  vacrs                :  246.2
         -  vacst                :  0.0
         -  vactr                :  0.0
         -  ptousertotal         :  60.0
         -  ptogridtotal         :  0.0
         -  ptoloadtotal         :  366.7
         -  totworktime          :  10975.8
         -  pvenergytoday        :  0.1
         -  pvenergytotal        :  477.5
         -  epvtotal             :  3.1
         -  epv1today            :  0.0
         -  epv1total            :  0.6
         -  epv2today            :  0.1
         -  epv2total            :  0.9
         -  epv3today            :  0.0
         -  epv3total            :  0.6
         -  etousertoday         :  16.2
         -  etousertotal         :  6242.9
         -  etogridtoday         :  7.0
         -  etogridtotal         :  11731.7
         -  eloadtoday           :  16.3
         -  eloadtotal           :  6713.0
         -  deratingmode         :  14
         -  iso                  :  65530
         -  dcir                 :  0.0
         -  dcis                 :  0.0
         -  dcit                 :  0.0
         -  gfci                 :  0
         -  pvtemperature        :  40.0
         -  pvipmtemperature     :  40.0
         -  temp3                :  37.7
         -  temp4                :  0.0
         -  temp5                :  48.4
         -  pbusvoltage          :  393.2
         -  nbusvoltage          :  0.0
         -  ipf                  :  20000
         -  realoppercent        :  2
         -  opfullwatt           :  0.0
         -  standbyflag          :  0
         -  faultcode            :  0
         -  warningcode          :  309
         -  systemfaultword0     :  0
         -  systemfaultword1     :  0
         -  systemfaultword2     :  0
         -  systemfaultword3     :  0
         -  systemfaultword4     :  0
         -  systemfaultword5     :  2
         -  systemfaultword6     :  1139
         -  systemfaultword7     :  0
         -  invstartdelaytime    :  300
         -  bdconoffstate        :  1
         -  drycontactstate      :  0
         -  edischrtoday         :  0.2
         -  edischrtotal         :  577.7
         -  echrtoday            :  0.0
         -  echrtotal            :  910.1
         -  eacchrtoday          :  0.1
         -  eacchrtotal          :  1160.0
         -  priority             :  1
         -  epsfac               :  60.0
         -  epsvac1              :  246.2
         -  epsiac1              :  0.0
         -  epspac1              :  0.0
         -  epsvac2              :  0.0
         -  epsiac2              :  0.0
         -  epspac2              :  0.0
         -  epsvac3              :  0.0
         -  epsiac3              :  0.0
         -  epspac3              :  0.0
         -  epspac               :  0.0
         -  loadpercent          :  0.0
         -  pf                   :  1000.0
         -  dcv                  :  0
         -  bdc1_sysstatemode    :  513
         -  bdc1_faultcode       :  0
         -  bdc1_warncode        :  0
         -  bdc1_vbat            :  53.2
         -  bdc1_ibat            :  0.0
         -  bdc1_soc             :  93
         -  bdc1_vbus1           :  386.3
         -  bdc1_vbus2           :  317.6
         -  bdc1_ibb             :  0.0
         -  bdc1_illc            :  0.0
         -  bdc1_tempa           :  37.8
         -  bdc1_tempb           :  38.6
         -  bdc1_pdischr         :  0.5
         -  bdc1_pchr            :  0.0
         -  bdc1_edischrtotal    :  577.7
         -  bdc1_echrtotal       :  910.1
         -  bdc1_flag            :  3
         -  bdc2_sysstatemode    :  30
         -  bdc2_faultcode       :  9
         -  bdc2_warncode        :  246
         -  bdc2_vbat            :  2.8
         -  bdc2_ibat            :  22.6
         -  bdc2_soc             :  1
         -  bdc2_vbus1           :  0.4
         -  bdc2_vbus2           :  9.7
         -  bdc2_ibb             :  9.2
         -  bdc2_illc            :  0.3
         -  bdc2_tempa           :  0.0
         -  bdc2_tempb           :  1680.0
         -  bdc2_pdischr         :  105119744.0
         -  bdc2_pchr            :  0.0
         -  bdc2_edischrtotal    :  0.0
         -  bdc2_echrtotal       :  0.0
         -  bdc2_flag            :  0
         -  bms_status           :  289
         -  bms_error            :  0
         -  bms_warninfo         :  0
         -  bms_soc              :  93
         -  bms_batteryvolt      :  53.1
         -  bms_batterycurr      :  0.0
         -  bms_batterytemp      :  28.1
         -  bms_maxcurr          :  0.0
         -  bms_deltavolt        :  127.5
         -  bms_cyclecnt         :  105
         -  bms_soh              :  100
         -  bms_constantvolt     :  56.8
         -  bms_bms_info         :  0
         -  bms_packinfo         :  3
         -  bms_usingcap         :  0
         -  bms_fw               :  0
         -  bms_mcuversion       :  0
         -  bms_commtype         :  0
muppet3000 commented 1 year ago

Hi All, just circling back to this one, I'm adding the PV4 entries as suggested by @shampeon after that I think this can be closed.

The pvenergytotal field is being implemented as part of #8

muppet3000 commented 1 year ago

This functionality is now available on the main branch for testing (you can select this in the re-download menu in HACS)

muppet3000 commented 1 year ago

Has anyone been able to confirm this works? I'm closing this so that it can be marked as included in the next release.

shocker2 commented 1 year ago

Still waiting for the bug fix on https://github.com/johanmeijer/grott/issues/339 but for PV4 i cannot confirm as I only have 3 phases :)

muppet3000 commented 1 year ago

@shampeon - Are you able to confirm this as you seem to have PV3 & PV4 on the output you showed above.

shampeon commented 1 year ago

PV4 values are there, but missing the Energy - Total and Energy - Today values, presumably because they're missing from upstream (i.e. johanmeijer/grott#339).

Screen Shot 2023-06-20 at 2 02 58 PM
muppet3000 commented 1 year ago

Yeah if they're not available in MQTT yet then they won't appear. From my perspective it's enough to consider this one closed from my end, they should automagically appear in HA once they're being pushed in Grott.

LightMoon commented 9 months ago

I didn't want to open a new issue so I decided to piggyback. I am not able to see PV3 data, the steps I followed were bit different. I reckon at the time this issue was opened the grott-home-assistant-add-on hadn't been available.

The steps I have done: 1- installed grott-home-assistant-add-on by @egguy and set it up per @muppet3000 guideline - ignored the configuration step.

  1. https://github.com/muppet3000/homeassistant-grott/blob/main/docs/setup/grott.md#grott-add-on
  2. https://www.splitbrain.org/blog/2023-11/03-growatt_and_home_assistant

2 - Proceeded with the installation of homeassistant-grott integration.

What I am missing here?

Screenshot 2023-12-14 at 3 37 35 pm Screenshot 2023-12-14 at 3 37 52 pm
muppet3000 commented 9 months ago

I didn't want to open a new issue so I decided to piggyback. I am not able to see PV3 data, the steps I followed were bit different. I reckon at the time this issue was opened the grott-home-assistant-add-on hadn't been available.

The steps I have done: 1- installed grott-home-assistant-add-on by @egguy and set it up per @muppet3000 guideline - ignored the configuration step.

  1. https://github.com/muppet3000/homeassistant-grott/blob/main/docs/setup/grott.md#grott-add-on
  2. https://www.splitbrain.org/blog/2023-11/03-growatt_and_home_assistant

2 - Proceeded with the installation of homeassistant-grott integration.

What I am missing here?

Screenshot 2023-12-14 at 3 37 35 pm Screenshot 2023-12-14 at 3 37 52 pm

You're probably not missing anything, please can you post the logs from grott so I can see what your system is actually publishing to grott. This integration simply consumes what's on the MQTT messages, so if it's not being published then it can't be consumed. With those logs I should be able to work it out for you.

LightMoon commented 9 months ago

@muppet3000 Thanks for assisting me in figuring this out. here are the logs I could get from grott-home-assistant-add-on - https://pastebin.com/kGyUipSH - https://pastebin.com/viKSD2Ss

and Log from Home Assistance Core

Screenshot 2023-12-15 at 11 06 39 am
muppet3000 commented 9 months ago

@LightMoon - Looking at the logs, this is the important bit, this is what Grott is getting from your inverter:

         -  pvserial             :  SPM2DBE044
         -  voltage_l1           :  244.5
         -  voltage_l2           :  0.0
         -  voltage_l3           :  0.0
         -  Current_l1           :  16.0
         -  Current_l2           :  0.0
         -  Current_l3           :  0.0
         -  act_power_l1         :  -3310.5
         -  act_power_l2         :  0.0
         -  act_power_l3         :  0.0
         -  app_power_l1         :  3684.2
         -  app_power_l2         :  0.0
         -  app_power_l3         :  0.0
         -  react_power_l1       :  1683.3
         -  react_power_l2       :  0.0
         -  react_power_l3       :  0.0
         -  powerfactor_l1       :  -0.9
         -  powerfactor_l2       :  0.0
         -  powerfactor_l3       :  0.0
         -  pos_rev_act_power    :  -3310.5
         -  pos_act_power        :  -3310.5
         -  rev_act_power        :  -3310.5
         -  app_power            :  3684.2
         -  react_power          :  1683.3
         -  powerfactor          :  -0.9
         -  frequency            :  50.0
         -  L1-2_voltage         :  0.0
         -  L2-3_voltage         :  0.0
         -  L3-1_voltage         :  0.0
         -  pos_act_energy       :  333.2
         -  rev_act_energy       :  1860.2

So what ones of those aren't showing for you on home assistant? Looking at the code for this integration they all seem to be mapped through.

I think there's some other logs that are missing, if you're running a metered system you get two lots of output like how I've pasted above, is there another lot of output which contains things like ppv2 or pv2watt?

If you can get another log output that contains the other stuff that would help me to understand what hasn't been mapped.

Looking at your screen grab from above I'm certain there will be a log entry with something looking similar to above but with either ppv2 or pv2watt in it.

LightMoon commented 9 months ago

@muppet3000 Spot on! I restarted the addon and tailed the logs with this command ha host logs --identifier addon_1ef934e0_grott-beta -f, ppv2 and pv2watt showed up in the logs! - https://pastebin.com/pCbGbyd2

Screenshot 2023-12-16 at 9 21 20 am Screenshot 2023-12-16 at 9 21 33 am Screenshot 2023-12-16 at 9 25 06 am Screenshot 2023-12-16 at 9 25 36 am
muppet3000 commented 9 months ago

Looking at those logs you're missing anything in them for pv3:

 "values": {"datalogserial": "XGD6CM31UN", "pvserial": "SPM2DBE044",
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvstatus": 1, "pvpowerin": 51774, "pv1voltage": 1430, "pv1current": 69,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pv1watt": 9962, "pv2voltage": 4130, "pv2current": 86, "pv2watt": 35653,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvpowerout": 0, "pvfrequentie": 0, "pvgridvoltage": 2484, "pvgridcurrent":
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          0, "pvgridpower": 0, "pvgridvoltage2": 0, "pvgridcurrent2": 0,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvgridpower2": 2365980672, "pvgridvoltage3": 15672, "pvgridcurrent3": 72,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvgridpower3": 580583424, "Vac_RS": 45, "Vac_ST": 0, "Vac_TR": 27140,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvenergytoday": 30096, "pvenergytotal": 9, "totworktime": 3879,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "epv1today": 33, "epv1total": 12641, "epv2today": 0, "epv2total": 0,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "epvtotal": 0, "pvtemperature": 492, "pvipmtemperature": 492,
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          "pvboottemperature": 0, "uwBatVolt_DSP": 449, "pbusvolt": 4179, "nbusvolt":
Dec 15 21:00:20 homeassistant addon_1ef934e0_grott-beta[400]:                          0}}

I would recommend logging a bug in either of these two repos to get some assistance with why this isn't being picked up for your system: https://github.com/egguy/grott-home-assistant-add-on or https://github.com/johanmeijer/grott/