Welcome to Ken Clifton’s blog.

If you are a student you will be most interested in the “teaching” category content. Please feel free to explore the “About” and “Resume/CV” links at top of this page.  If you are interested in RECs please see the renewable energy credits link.  The Salisbury Post did a front page story on our solar PV facilities that ran on February 8, 2011.

We are excited about renewable energy! This site is run on solar generated electricity.  We have solar PV and solar thermal renewable energy facilities approved by the State of North Carolina at our home.    See the renewable energy link for more information. If you are interested in biomass or CO2 neutral home heating, please read the Salisbury Post newspaper article published on February 11, 2007 for more information.  My presentation made to several groups on biomass is also available.

If you are a student, I look forward to working with you during the Spring 2017 semester at RCCC!  I am teaching Python 3 classes on line, at the NC Research Campus and at the North Campus in Salisbury this Spring.

Please consider becoming an organ donor.  I have vision to maintain this site and work thanks to two corneal transplants.  Without those transplants I would be blind.


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 save-events.py ‘’

On Windows the command to run this script is:
python save-events.py

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.


Video with Dr. Parker at UAB

So fortunate to be helped by Dr. John Parker. I give thanks every day for the gift of vision and for the skill and kindness of Dr. Parker. I think of my eye donors every day. Please remember to become an organ / eye donor to help so many others.


Energy United & Advanced Energy – EV Workshop Presentation

On June 5, 2015 I spoke at the Energy United / Advanced Energy Electric Vehicle Workshop about my family’s experience of driving electric for the past 3 years.  The workshop was great, there was a BMW i3, a Tesla Model S, my Volt, an electric dune buggy, and an electric bicycle.

June 5, 2015 Presentation

Download a copy of the presentation to view the slides. In short it has been a very rewarding three years. We had the first Nissan LEAF in Western North Carolina, delivered in November of 2011. Our first charging station was provided by Duke Energy as part of their Charge Carolina’s EV Charging Station pilot. The charging station is still being used every day.

My wife and I both traded our LEAFs in on Chevrolet Volts in 2013. I very much wish we had started out with the Volts. Having said that, we appreciate them much more coming from the LEAF experience.

Since the last upgrade to our solar PV, we are able to charge both cars and run the house pretty much offset by solar energy. In fact, during the month of May 2015 we produced 48 kWh more than we used to run the house and two cars.


March is National Eye Donor Month!

March 2015: National Eye Donor Month







As a recipient of two corneal transplants I think of my donors every day. Please consider becoming a donor to give the gift of sight to someone.
I would be blind and unable to maintain this site without such an unconditional act of love by two people and their families.
You can read my story of two corneal transplants on this site at: http://www.kenclifton.com/wordpress/my-vision/through-the-eyes-of-others/


NC Renewable Energy Credits Available for Solar Set-Aside

NC Renewable Energy Credits Available for the Solar Set-Aside

We have two Renewable Energy Facilities registered in the NC-RETS Renewable Energy Portfolio Tracking System.  Both facilities are located inside North Carolina and produce power from certified and calibrated metered systems.  I will consider selling solar PV and metered solar thermal RECs to North Carolina Power Companies, Co-Ops or municipalities who are also registered in the NC-RETS system.

Follow this link ( https://portal2.ncrets.org/myModule/rpt/myrpt.asp?r=204 ) to see a current listing of the NC-RETS Bulletin board, currently about 25 RECs are available for transfer / sale.  Look for facilities GEN259 and GEN266 .



Another Step on the Journey

On October 28th I received the gift of sight from a person who selflessly donated their eyes so that others might see. Kat and I are gearing up for the next transplant surgery. We are very thankful for the prayers of so many. A simple “thank you” is just not enough for the many expressions of thoughtfulness made in so many different ways during this difficult time.

My computer time continues to be very limited as I am recovering, but Kat has been wonderful to read many messages to me. Here is the text of a letter I wrote to the family of my eye donor, the identity of whom I will never know. This letter was mailed to the Eye Bank last week:

Subject: Please Convey My Sincere, Heartfelt Thanks

Dear Sir/ Madam,

Words cannot express the difference your loved one’s gift of vision has made in my life, and to my family. My entire life I have had useful vision in only one eye due to a birth defect. Beginning in 2007 I began to lose that vision due to a corneal disease called Fuch’s Corneal Dystrophy.

Fuch’s disease not only causes loss of vision, but in its later stages extremely painful blisters can erupt on the eyes, causing severe pain. For the last six months I have suffered from multiple blisters on both eyes. The pain and loss of vision are a terrible combination.

This October, at the age of 54 my vision was so bad I had to stop my college teaching due to the loss of vision. I could no longer work to support my two young children, aged 7 and 13. This was a very stressful time for my family.

By the grace of God, I found a very gifted surgeon at the University of Alabama, Callahan Eye Hospital. Dr. Parker was able to perform a transplant for me on October 28th that not only restored my vision to 20/20, but also took away the terrible pain in one of my eyes. Your loved one’s gift changed my life.

I am scheduled to receive another corneal transplant soon. Our hope is that it will eliminate the pain and restore some vision in my other eye with the birth defect. That eye also has multiple blisters from Fuch’s disease.

Thanks to the caring donation of the eyes of a kind, selfless person I am able to see. I can’t describe the powerful explosion of color, beauty and light that I have seen this week. When we returned home I was able to see the faces of my two children again. In January of 2015, I hope to return to teaching at the Community College to continue making a difference in the lives of hundreds of students.

Please know that your loving donation of sight has made a HUGE difference, and has touched many lives.

With Sincere, Heartfelt Thanks

(for a complete story of my two corneal transplants please visit: http://www.kenclifton.com/wordpress/my-vision/through-the-eyes-of-others/ )


New Challenges, But Not My Last Post

The last few months have been very difficult. I have struggled from one day to the next in a good bit of “extreme” pain as my vision is slowly taken away by Fuch’s Corneal Dystrophy. Much of my limited computer time is done with the help of a magnifying glass or the accessibility tools. Last week I turned over all my Fall classes at RCCC to other professors.

I remain steadfast in my faith that God has directed me to a wonderful transplant surgeon. My hope is that soon I will once again be able to “see” my children grow up for a few more years and to see many more happy moments with my wonderful wife Kat.

Even when faced with the vision challenges we added another 3 kW of solar in the summer of 2014. What stronger statement could I make than to undertake a solar project while in the midst of a potentially life-changing event? Make no mistake, I had a laser-like focus to ensure the project would provide continuously increasing benefits to my family for many years to come.

Lastly, I want to say thank you to all my students of the past 23 years! I hope that each of you will continue to be life-long learners. The best things in life come through faith, perseverance and hard work. I know we worked hard together in my classes.


Thanks for Attending the Basics of Solar Thermal @ RCCC

Thank you to everyone who attended
“The Basics of Solar Thermal” class today at RCCC !
Don’t forget the Solar Electric Generation Class next Friday, May 2nd from 10AM-12 Noon.
Walk-in(s) on May 2nd are permitted, but please register
to ensure the class gets run!
The link for class content is below the photo
The Basics of Solar Thermal


Video: The True Cost of Gasoline

Sometimes the truth hurts a lot. But then again, so does COPD and not being able to breathe. Watch this video on the true cost of gasoline.