Saving / Archiving the Enphase Envoy Event Log

Enphase Envoy EMU

The Enphase Envoy (EMU) uploads data from their solar micro-inverters to the Enphase Enlighten cloud service.  Only a few major events are available to users through the Enlighten cloud service.  A complete history of the last 500 events are available locally on the Envoy.   Five hundred events can be overwritten by pretty quickly!  This means that information over a day or two old cannot be retrieved by mere mortals, except possibly by Enphase technical support staff.

I created this Python script to archive events as comma-delimited (.csv) files to the folder where the script is stored.  Events are saved with the name:  envoy-eventlog-yyyymmdd-hhmmss.csv (where yyyy is the four-digit year, mm is the two-digit month, and dd is the two-digit day, followed by the hhmmss timestamp).

Archived Event Logs in a folder

I chose this naming convention to allow sorting of the event log files.  The .csv files open into nicely formatted columns with named headings in Libre Office Calc or Microsoft Excel.

Running the Script

The script requires one argument when run, the IP address of the Envoy. In the following examples an address of for the Envoy is used.

Here is a sample command on Linux to run the script (notice Python3 and quotes):
Python3 ‘’

On Windows the command to run this script is:

The script enumerates any existing envoy-eventlog files that are in the same location as the script, then reads the last row in the last event log to find the last saved ‘Event ID.”  The script will only save events that occur after that event id to prevent duplication of data.

I suggest scheduling the script to run at least once or twice per day to archive events from the Envoy.  On Linux a cron table entry, or a scheduled task on Windows can easily be used automate the process.


latest version of the script here (zip archive)

Requirements to Run this Script

I have tested this script on Linux and Windows 7, 8 and 10 with Python version 3.43
The script should also work on a Mac as long as Python 3.1 or greater is installed — remember that both Linux and Macs mostly come with the older version of Python, something like Python version 2.7, so you will not have the other version of Python unless you install it.   Remember this script requires Python version 3.1 or higher  to work!  No additional libraries are required.

I do not have an Envoy-S.  My two solar sites have the older version of the Envoy running software R3.12.34 (2e8bfe).  It would be interesting for someone with a later Envoy-S to comment here to let me know if the script works with those units.

Challenges Getting this to Work

Several helpful Internet postings have mentioned that the events are available as JSON data at http://[envoy ip address]//datatab/event_dt.rb

Well, the true answer is yes and no…  On my Envoy, using Firefox or Python’s urllib, I can retrieve this file, but it never updates.  The information is only refreshed when the actual eventlog page on Envoy is retrieved.  This is in spite of reviewing the actual requests made when the eventlog page is visited in a browser and implementing every single request parameter.

After many hours of testing, and changing parameters, I finally just decided to fake an actual request for the eventlog page prior to retrieving the JSON data table.  This solved the refreshing of the data, although it is not as clean as I would prefer.

Free to Use or Modify with Attribution of the Author

Use the script as you see fit.  Any recognition for my time spent developing this is appreciated. Please let me know if you modify the script so that I can implement fixes.   Please consider becoming an organ donor.   I am able to create this script thanks to eyes donated by the kindness of two families that I may never know.

2 Comments to “Saving / Archiving the Enphase Envoy Event Log”

  1. By Ken Clifton, January 2, 2017 @ 2:15 pm

    Thanks to RegGuheert over on MyNissanLeaf for helping to test this out. I added the following enhancements to the original script:

    1. Increased the urlopen timeout to allow slower Envoy(s) to respond
    2. The script will now not create any archive file if there are no new events
    3. Added try…except error handling on urlopen to display connection errors
  • Enphase Envoy-S Eventlog Archiver | KENCLIFTON.COM — June 11, 2017 @ 4:37 pm

  • RSS feed for comments on this post. TrackBack URI

    Leave a Reply