ginoledesma / sunpower-pvs-exporter

A Prometheus Exporter for the SunPower PVS monitoring system
MIT License
77 stars 27 forks source link

Field missing `p_mpptsum_kw` (2021.11 Build 60203) #12

Open jeeftor opened 2 years ago

jeeftor commented 2 years ago

I'm running: "SWVER": "2021.11, Build 60203"

Here is the fields:

{
      "ISDETAIL": true,
      "SERIAL": "E00122116029005",
      "TYPE": "SOLARBRIDGE",
      "STATE": "working",
      "STATEDESCR": "Working",
      "MODEL": "AC_Module_Type_G",
      "DESCR": "Inverter E00122116029005",
      "DEVICE_TYPE": "Inverter",
      "hw_version": "4400",
      "interface": "mime",
      "module_serial": "",
      "PANEL": "SPR-A415-G-AC",
      "slave": 0,
      "SWVER": "4.21.3",
      "PORT": "",
      "MOD_SN": "",
      "NMPLT_SKU": "",
      "DATATIME": "2022,01,24,21,08,06",
      "ltea_3phsum_kwh": "96.0818",
      "p_3phsum_kw": "0.2435",
      "vln_3phavg_v": "247.76",
      "i_3phsum_a": "0.98",
      "p_mppt1_kw": "0.2485",
      "v_mppt1_v": "39.92",
      "i_mppt1_a": "6.22",
      "t_htsnk_degc": "26",
      "freq_hz": "60.02",
      "stat_ind": "0",
      "origin": "data_logger",
      "OPERATION": "noop",
      "CURTIME": "2022,01,24,21,08,11"
    },

I don't see the p_mpptsum_kw field. Wondering if anybody else is seeing something similar :)

jeeftor commented 2 years ago

Looks like its a different AC_Module_Type

image
ginoledesma commented 2 years ago

Thanks… Looks like the newer micro inverters changed the field names as well.

I'll work on making the fields optional and expose the new ones. From your payload:

removed = ['p_mpptsum_kw']
added = ['PANEL', 'hw_version', 'interface', 'module_serial', 'p_mppt1_kw', 'slave']
jeeftor commented 2 years ago

I’m still not sure exactly how the new fields map otherwise I’d have made a pr

Sent from my iPhone

On Jan 24, 2022, at 4:17 PM, Gino Ledesma @.***> wrote:

 Thanks… Looks like the newer micro inverters changed the field names as well.

I'll work on making the fields optional and expose the new ones. From your payload:

removed = ['p_mpptsum_kw'] added = ['PANEL', 'hw_version', 'interface', 'module_serial', 'p_mppt1_kw', 'slave'] — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

dacarson commented 2 months ago

I’m still not sure exactly how the new fields map otherwise I’d have made a pr

At least for p_mpptsum_kw being renamed to p_mppt1_kw it seems to just be a rename. Renamed to better reflect that the value isn't a "sum" rather an instantaneous value "1".

Correcting just this would fix the NaN appearing for DC power that I mentioned in #15