LeJeko / homebridge-enlighten-power

Homebridge plugin to simulate a CO2 air quality accessory
MIT License
2 stars 1 forks source link

Suggestion to get wNow from production[0] #2

Closed wouterpotters closed 4 years ago

wouterpotters commented 4 years ago

Suggestion to get wNow from production[1] to production[0]. Currently the plugin always reports the current production as 0 Watts, even if there is sun and powerproduction (checked on envoy.local)

For me the envoy production.json looks like this (new installation June 2020, unmetered enphase envoy-s with 9 Enphase Microinverters and 9 panels, Firmware: R4.10.35):

 {
   "production":[
      {
         "type":"inverters",
         "activeCount":9,
         "readingTime":1592207066,
         "wNow":434,
         "whLifetime":63554
      },
      {
         "type":"eim",
         "activeCount":0,
         "measurementType":"production",
         "readingTime":1592207068,
         "wNow":0.0,
         "whLifetime":0.0,
         "varhLeadLifetime":0.0,
         "varhLagLifetime":0.0,
         "vahLifetime":0.0,
         "rmsCurrent":-0.0,
         "rmsVoltage":230.466,
         "reactPwr":0.0,
         "apprntPwr":-0.0,
         "pwrFactor":0.0,
         "whToday":0.0,
         "whLastSevenDays":0.0,
         "vahToday":0.0,
         "varhLeadToday":0.0,
         "varhLagToday":0.0
      }
   ],
   "consumption":[
      {
         "type":"eim",
         "activeCount":0,
         "measurementType":"total-consumption",
         "readingTime":1592207068,
         "wNow":-4.552,
         "whLifetime":0.0,
         "varhLeadLifetime":0.0,
         "varhLagLifetime":0.0,
         "vahLifetime":0.0,
         "rmsCurrent":-0.46,
         "rmsVoltage":238.219,
         "reactPwr":-0.0,
         "apprntPwr":-109.566,
         "pwrFactor":-1.0,
         "whToday":0.0,
         "whLastSevenDays":0.0,
         "vahToday":0.0,
         "varhLeadToday":0.0,
         "varhLagToday":0.0
      },
      {
         "type":"eim",
         "activeCount":0,
         "measurementType":"net-consumption",
         "readingTime":1592207068,
         "wNow":-4.552,
         "whLifetime":0.0,
         "varhLeadLifetime":0.0,
         "varhLagLifetime":0.0,
         "vahLifetime":0.0,
         "rmsCurrent":0.46,
         "rmsVoltage":245.971,
         "reactPwr":-0.0,
         "apprntPwr":59.334,
         "pwrFactor":-0.12,
         "whToday":0,
         "whLastSevenDays":0,
         "vahToday":0,
         "varhLeadToday":0,
         "varhLagToday":0
      }
   ],
   "storage":[
      {
         "type":"acb",
         "activeCount":0,
         "readingTime":0,
         "wNow":0,
         "whNow":0,
         "state":"idle"
      }
   ]
}
LeJeko commented 4 years ago

Hi @wouterpotters. I made this plugin for a friend and in his case, the [1] isn't reports always 0 Watt and is more revealing:

{"production":[ { "type":"inverters", "wNow":5007, }, { "type":"eim", "wNow":5766.563, .......

So I rather added an option that allows you to choose the type in version 1.0.1.

wouterpotters commented 4 years ago

Sounds even more robust. Tnx! On 26 Jun 2020, 00:11 +0200, LeJeko notifications@github.com, wrote:

Hi @wouterpotters. I made this plugin for a friend and in his case, the [1] isn't reports always 0 Watt and is more revealing:

{"production":[ { "type":"inverters", "wNow":5007, }, { "type":"eim", "wNow":5766.563, ....... So I rather added an option that allows you to choose the type in version 1.0.1. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.