Curt Blank's

Solar Powered Home

Communicating with the Aurora Inverter
aurora 1.8.7 now released
Click for Download Link

Read the Release notes
New -q, --energy-sent Option
Milwaukee Solar Powered Home Energy Sent Sample
Energy Sent Sample Graph

Being a UNIX System Administrator and a heavy Linux user, I was not overly joyed to hear that the Aurora Inverter came with software to monitor it that ran on Windoze. Whoopee. So, a few weeks before the system was due to be installed I contacted Tron Melzl over at Magnetek to see if they would give me the communication specs on how to communicate with the Aurora via the RS-232 or RS-485 interfaces.

Tron got a hold of a Communications Serial Protocol document and sent if off to me, not really knowing if that was what I was looking for, but that was indeed the ticket. So a few days after the Aurora was installed and running I set out to write a "C" program to communicate with and download the data from the Aurora.

Getting the basic communication to work was a little frustrating at first but nothing out of the ordinary when doing something like this. Since the Linux Server that would eventually do the data downloading and data presentation was already hard at work gathering the Weather Station data and publishing it, I couldn't very well haul it out of my computer room and cart it down to the basement to develop this unless I wanted to lose Weather data.

So, the alternative was to use my Laptop (running Linux) but the problem there was it did not have a Serial Port. Hence one part of the frustration. So a trip to BB got me one of their Dynex USB to Serial Port adapters. All fine and well, I tested it on Windoze with the Aurora Communications software provided by Magnetek and it worked. The next step was to see if it worked with Linux.

I did a little Google'n first and found a reference that the Prolific Technology, Inc. PL2303 chipset that it uses may come in a PL2303X variant which one person then indicated that the Linux pl2302.c driver code would need modification. Unfortunately, both the PL2303 and the PL2303X showed up as PL2303's so you couldn't tell if you had the 'X' variant or not. I wasn't against modifying the Linux source code, I've modified the Linux source before and still have to for some devices, but I thought I'd give it a try as is first.

My first roadblock was when I discovered that I did not have a /dev/ttyUSB0 device when the adapter was connected. That made me realize that I did not have the pl2303.c code compiled into my kernel (all my servers have complied kernels and are not out of the box). All my kernels are gen'd lean since they're not used like a desktop (Laptop included, I know that don't make sense but it's used pretty much the same way all the time) and have specific purposes, so gen'ing a new kernel was the first step.

That done, the task at hand was then started. The nice part about doing this on the Laptop was that I was able to recline on my leather couch and code away! Once the framework of the code was in place I'd have to take a jaunt down to the basement every once in a while and connect the Laptop to the Aurora and see if they were on speaking terms yet.

This part entailed a bit of trial and error in having the code configure the Serial Port correctly once it opened it. The Magnetek documentation specified speed, parity and stop bits, but left out handshaking, CTS, RTS, etc. so a little experimentation was necessary. Keep in mind that at this point I wasn't even sure the USB/Serial dongle was working in my Linux kernel. It appeared to be because by using a Breakout Box I could see the Laptop was talking to the Aurora, but the Aurora was not answering. And this was the scenario that I believe could happen with the 2303X device, where it looked like it was working but really wasn't.

Seeming to be somewhat stuck at the moment, I placed a call over to Tron at Magnetek and explained my situation and asked if he could find any more information as to the proper configuration of the Serial Port on the computer end. He said he'd try, and I kept pluggin' along trying things, and then about 15 minutes after I spoke with Tron I had it working. So I called Tron back and told him I got it, not to waste his time looking for the info.

After that it was rather straight forward, add all the different queries for the various data, format the data for presenting it or for logging to a data file, and test setting the Aurora date and time. I got a little tired of going up and down the stairs so I ran a 100ft 4-wire telephone cord (the same cord I was planning on using for the serial connection) from the Aurora in the basement, up the stairs, through the kitchen and dining room, to the living room. Now I could sit in my recliner and code AND test away.

One thing to be noted on setting the date and time: When you set the date and time on the Aurora Inverter, that function has the side effect of clearing all the produced KWh data it has recorded except for the Total Produced over lifetime. This side effect is not documented anywhere so beware when using it.

Next I moved the code from my Laptop to the server it was destined to run on and connected the Aurora to its Serial Port. That seemed to work fairly flawlessly, so that evening after the Aurora was done for the day I ran the cord permanently in the basement and up through the wall to the Linux Server. Then over the course of the next week or so I developed the web pages and associated perl and ksh scripts that deal with munging and displaying the information for all to see.

The link below will allow you to download the "C" program I wrote to communicate with the Aurora and download its data. The program is pretty simple and a simple "make" command will compile it for you. There are some informational files included to aid in using this program.

To the left is a screenshot of the help screen of the aurora communications and data download program, click on the image for a readable version.

To the right is a screenshot of the Energy Produced data, again click on the image for a larger version.


To the right is a screenshot of the DSP Info data, again click on the image for a larger version.

To the right is a screenshot of various other commands that query the Aurora, again click on the image for a readable version.

Above is a screenshot of of using the "-c" columnize option for saving the data in a file. Note the "OK" at the end of the data line, that denotes that all communictaion with the Aurora was successful when querying for the various data. If any communications encountered a problem like during startup in the morning or during shutdown in the evening, the OK will not be present at the end of the data line. The COLUMNS.key file, included in the distribution, details the column fields. Again, click on the image for a readable version.

Download aurora-1.8.7.tar.gz
md5 checksum here
Read the Release notes
Aurora is now in Ubuntu starting with 10.04 LTS

Solar Powered Home Home

All content Copyright 2006-2014 Curtronics.com Curtis J. Blank
May not be used in any form without permission

Tux, the Dancin' Fool - Hit ESCAPE to stop the dancin' Best yet! Apache Web Server Tux, the Dancin' Fool - Hit ESCAPE to stop the dancin'