Integration Service and Enphase Envoy


#1

I have been using the standard pvoutput enphase automatic upload via the standard settings for my new home’s solar system. I’ve grown very tired of the numerous outages and data delays every day from Enphase even when they are up and running. Hitting the Enphase api using the Integration Service isn’t my plan for the same reasons.

I had a raspberry pi configured for the Powerwall in my previous home to feed pvoutput and that worked well. I updated the OS and loaded the latest version of the Integration Service. I setup enphase.ini to point to my local Ephase Envoy IQ. After trial and error, I have gotten the services to run without error, and turned off the automatic upload; however, I do not see any data hitting pvoutput. So, more research…

I am able to hit the webserver directly using http://envoy/production.json to see the json data without entering any credentials (host name added to hosts file). So that’s the URL that I’m using. As you’ll see in the log file, everything seems to be good as there are no errors; however, it seems to just be “waiting for data” that it never gets and therefore there are no data logs generated.

Questions:

  • Does the Integration Service work with the latest version of Envoy?
  • Does the Integration Service consume json or some previous version of the Envoy?
  • Is there another solution that I should use? I’m comfortable with detailed configurations, but I’m not a developer.

Thanks in advance for any thoughts.

Bill

Enphase.ini (key settings):
url=http://envoy.production.json
direction=in (and another service with direction=out)
poll=300
no api key, no enlighten system ID
other settings are default

pvoutpout.ini (key settings):
key=<my api key>
sid=707647
dir=/home/pi/logs
format=enphase
direction=in (and another service with direction=out)
other settings are default

Log File:
2020-06-08 12:51:58,770 INFO [Thread-0] (WebClient.java:133) - >>> http://pvoutput.org:80/service/r2/getsystem.jsp?donations=1
2020-06-08 12:51:59,259 INFO [Thread-0] (Controller.java:2136) - <<< ZSolar2,8710,92009,26,335,Panasonic N335 VBHN335SA17,26,460,Enphase IQ7X-96-2,SW,10.0,Low,20191007,33.097841,-117.26744,5;;1
2020-06-08 12:52:01,261 INFO [Thread-0] (WebClient.java:133) - >>> http://pvoutput.org:80/service/r1/getstatus.jsp?d=20200608
2020-06-08 12:52:01,496 INFO [Thread-0] (Controller.java:2050) - <<< 20200608,12:50,NaN,NaN,NaN,0,NaN
2020-06-08 12:52:01,499 INFO [Thread-0] (Controller.java:323) - --------------------------
2020-06-08 12:52:01,501 INFO [Thread-0] (Controller.java:324) - System Name: ZSolar2
2020-06-08 12:52:01,503 INFO [Thread-0] (Controller.java:325) - System Size: 8710
2020-06-08 12:52:01,505 INFO [Thread-0] (Controller.java:326) - Timezone: America/Los_Angeles
2020-06-08 12:52:01,506 INFO [Thread-0] (Controller.java:327) - Donation Mode: true
2020-06-08 12:52:01,508 INFO [Thread-0] (Controller.java:328) - Max History: 90
2020-06-08 12:52:01,509 INFO [Thread-0] (Controller.java:329) - Status Interval: 5-min
2020-06-08 12:52:01,542 INFO [Thread-0] (Controller.java:330) - Status Date Time: Mon Jun 08 12:50:00 PDT 2020
2020-06-08 12:52:01,544 INFO [Thread-0] (Controller.java:331) - Upload Temperature: false
2020-06-08 12:52:01,545 INFO [Thread-0] (Controller.java:332) - Upload Voltage: true
2020-06-08 12:52:01,546 INFO [Thread-0] (Controller.java:333) - Energy Generation: -1
2020-06-08 12:52:01,547 INFO [Thread-0] (Controller.java:334) - Energy Consumption: -1
2020-06-08 12:52:01,548 INFO [Thread-0] (Controller.java:335) - Create Local Graph: false
2020-06-08 12:52:01,549 INFO [Thread-0] (Controller.java:336) - Retry Limit: 30 to 40
2020-06-08 12:52:01,551 INFO [Thread-0] (Controller.java:337) - --------------------------
2020-06-08 12:52:01,609 INFO [Thread-0] (Controller.java:372) - Loaded Reader 1: enphase
2020-06-08 12:52:01,610 INFO [Thread-0] (Controller.java:373) - Log Directory 1: [/home/pi/logs]
2020-06-08 12:52:01,612 INFO [Thread-0] (Controller.java:384) - Loading Config 1: enphase.ini
2020-06-08 12:52:01,621 INFO [Thread-0] (SimpleLogReader.java:428) - Read 0 log entries
2020-06-08 12:52:01,623 INFO [Thread-0] (AHttpLogReader.java:80) - URL 1: http://envoy/production.json
2020-06-08 12:52:01,625 INFO [Thread-0] (AHttpLogReader.java:97) - Poll Frequency: 300 seconds
2020-06-08 12:52:01,834 INFO [Thread-0] (AHttpLogReader.java:112) - Rule: if(power < 10) power = 0
2020-06-08 12:52:01,846 INFO [Thread-0] (AHttpLogReader.java:189) - Id: 0, sensor: 0, channels: [], direction: Export, calibration: 1.0
2020-06-08 12:52:01,857 INFO [Thread-1] (WebClient.java:243) - >>> http://envoy:80/production.json
2020-06-08 12:52:01,857 INFO [Thread-0] (ADataLogReader.java:348) - Output stop at 1170 minutes
2020-06-08 12:52:01,864 INFO [Thread-0] (Controller.java:435) - Found 1 Sensors
2020-06-08 12:52:01,866 INFO [Thread-0] (Controller.java:536) - Added Reader: enphase0
2020-06-08 12:52:01,869 INFO [Thread-0] (ADataLogReader.java:348) - Output stop at 1170 minutes
2020-06-08 12:52:01,871 INFO [Thread-0] (Controller.java:560) - Log File: enphase0 [EPH0-2020-06-08.log]
2020-06-08 12:52:01,872 INFO [Thread-0] (Controller.java:572) - Export Sensor: 0, id: 0
2020-06-08 12:52:01,895 INFO [Thread-0] (Controller.java:579) - Service: [http://pvoutput.org:80/service/r2/addbatchstatus.jsp] Test: false, End: 19:30
2020-06-08 12:52:01,896 INFO [Thread-0] (Controller.java:587) - Loaded 1 Readers (Import: 0, Export: 1)
2020-06-08 12:52:03,532 INFO [Thread-0] (Controller.java:1524) - Records restored from status.log : 25814
2020-06-08 12:52:05,533 INFO [Thread-0] (Controller.java:731) - Startup Complete: Waiting for data…
2020-06-08 12:57:04,544 INFO [Thread-1] (WebClient.java:243) - >>> http://envoy:80/production.json
2020-06-08 13:02:05,576 INFO [Thread-1] (WebClient.java:243) - >>> http://envoy:80/production.json
2020-06-08 13:07:06,340 INFO [Thread-1] (WebClient.java:243) - >>> http://envoy:80/production.json
2020-06-08 13:12:08,245 INFO [Thread-1] (WebClient.java:243) - >>> http://envoy:80/production.json


#2

The service is actually looking for http://envoy_host/production without the .json which responds with a html web page with the current power.

The JSON format url isn’t supported and would require changes to the service make work.


#3

@bankstownbloke

When I refactor the enphase.ini file for http://envoy/production it fails authentication. When I try it in a web browser, I am prompted for credentials. I have entered the default envoy account info and it fails. So, it looks like this won’t work without development to read the json. Could I suggest this an a new idea or request?

Then I tried to use the Enphase API version of the Integration Service. The enphase ini file is only asking for the key which I can find in my Enlighten login under the Account page. This is also not working. With a little research it appears that they now require a key and a user_id.

  1. Does the Integration Service support this method with the new URL requirements from Enphase?
  2. If so, does anyone know how I can get the proper key and user_id? I tried the developer site and registered for an API key. I’ve tried many variations to get this to work in a web browser and I am unable to get data from the API. I’d appreciate some step-by-step instructions on how to get this so that I can try the API integration Service.

Thank you. Bill


#4

Change this topic to an idea for development.

Please paste the sample json output from http://envoy:80/production.json here


#5

Thank you bankstownbloke!

// 20200610072558
// http://envoy.local/production.json

{
“production”: [
{
“type”: “inverters”,
“activeCount”: 26,
“readingTime”: 1591799066,
“wNow”: 548,
“whLifetime”: 7858565
},
{
“type”: “eim”,
“activeCount”: 1,
“measurementType”: “production”,
“readingTime”: 1591799147,
“wNow”: 682.335,
“whLifetime”: 7638016.299,
“varhLeadLifetime”: 0.101,
“varhLagLifetime”: 3140999.522,
“vahLifetime”: 9785831.692,
“rmsCurrent”: 7.685,
“rmsVoltage”: 244.993,
“reactPwr”: 534.737,
“apprntPwr”: 942.447,
“pwrFactor”: 0.72,
“whToday”: 386.299,
“whLastSevenDays”: 315436.299,
“vahToday”: 4096.692,
“varhLeadToday”: 0.101,
“varhLagToday”: 3853.522
}
],
“consumption”: [
{
“type”: “eim”,
“activeCount”: 1,
“measurementType”: “total-consumption”,
“readingTime”: 1591799147,
“wNow”: 425.085,
“whLifetime”: 4935398.71,
“varhLeadLifetime”: 2811005.902,
“varhLagLifetime”: 3191461.255,
“vahLifetime”: 9052092.608,
“rmsCurrent”: 1.402,
“rmsVoltage”: 245.04,
“reactPwr”: -979.935,
“apprntPwr”: 343.447,
“pwrFactor”: 1.0,
“whToday”: 2417.71,
“whLastSevenDays”: 196090.71,
“vahToday”: 5764.608,
“varhLeadToday”: 4282.902,
“varhLagToday”: 3854.255
},
{
“type”: “eim”,
“activeCount”: 1,
“measurementType”: “net-consumption”,
“readingTime”: 1591799147,
“wNow”: -257.25,
“whLifetime”: 2765084.66,
“varhLeadLifetime”: 2811005.801,
“varhLagLifetime”: 50461.734,
“vahLifetime”: 9052092.608,
“rmsCurrent”: 6.284,
“rmsVoltage”: 245.088,
“reactPwr”: -445.198,
“apprntPwr”: 771.091,
“pwrFactor”: -0.32,
“whToday”: 0,
“whLastSevenDays”: 0,
“vahToday”: 0,
“varhLeadToday”: 0,
“varhLagToday”: 0
}
],
“storage”: [
{
“type”: “acb”,
“activeCount”: 0,
“readingTime”: 0,
“wNow”: 0,
“whNow”: 0,
“state”: “idle”
}
]
}


#6

Try the following patch that supports the JSON format -

Patch steps -

  1. Download the above file
  2. Stop the Integration Service
  3. Make a backup of file <install_directory>\lib\org.pvoutput.integration.jar
  4. Copy org.pvoutput.integration_1.5.5.jar to <install_directory>\lib
  5. Rename the file to org.pvoutput.integration.jar
  6. Edit enphase.ini and update lines -
    • url=http://envoy.local/production.json
    • voltage=production.rmsVoltage
    • direction=out
  7. Start the Integration Service

Default output parameters when omitted in enphase.ini -

  • energy=production.measurementType@production.whToday
  • power=production.measurementType@production.wNow

Default consumption parameters when omitted in enphase.ini -

  • energy_in=consumption.measurementType@total-consumption.whToday
  • power_in=consumption.measurementType@total-consumption.wNow

Either energy or power may be turned off, but at least one should be enabled -

  • power=off
  • energy=off
  • power_in=off
  • energy_in=off

Extended Parameter support e.g -

  • v7=consumption.measurementType@net-consumption.pwrFactor
  • v8=storage.wNow

The @ notion matches a node where name=value and uses the proceeding key value e.g.

  • consumption.measurementType@net-consumption.pwrFactor
    • Find the consumption where measurementType value equals “net-consumption” and pick the “pwrFactor” value.

Note that Integration Service only supports a single direction. If both generation and consumption is required then a second integration service needs to be installed and configured with direction=in


#7

Install multiple Integration Services -


#8

@bankstownbloke
Thank you! I’ll give a try and let you know how it goes. I really appreciate this!

Bill