pv – a Python library to monitor/control PV Inverters
After having the solar electricity system installed, I can monitor the energy output of the inverter using Pro Control. However, because the software runs on Windows, I’d have to have a PC turned on just for that purpose wasting quite a bit of energy. So, my goal is to use a low-power embedded Debian box (which is usually on) to do the monitoring. Instead of just writing an application to do the job, I’ve decided to write a library others can use to write their own custom logging software.
pv can be found at http://pv.codeplex.com/, and should work for you if you have a Carbon Management Solutions CMS-2000 or Schneider Electric SunEzy 600E (judging from a sample protocol exchange).
I’ll have to give full credit to the folks at http://www.solarfreaks.com/cms2000-inverter-rs232-serial-port-hack-cms-2000-rs232-t271.html who did the initial work on reverse engineering the communication protocols. Building on what has already been done on working out the protocol, and doing a bit of reverse engineering myself, the library supports sending arbitrary data frames for further exploring, as well as the known protocols.
JinbaIttai wrote a Perl script to poll the inverter, but unfortunately I don’t particular like Perl. So, I decided to write my own in my language of choice – Python. Also, a word of thanks to Ingmar for providing a sample of the protocol for the SunEzy 600E.
There are still quite a number of data fields that remains a mystery – getting a hold of the protocol from the CMS-10000 would really, really help.
Here’s a list of the features in the library:
- Craft custom frames to be sent to the serial port
- Reads inverter parameters and status information
- Verifies checksum for received frames
- Enumerates all known messages for quick reference
The module comes with a working example. Just run the package like so:
The code for this sample can be found in __main__.py.
-
Simon Chan
-
Peter
-
Peter
-
Wombatworks
-
http://www.edmundtse.com/ Edmund Tse