Click here to read Part 1 of this setup guide.
Click here to read Part 2 of this setup guide.
This post is meant to provide additional information to the excellent work done by Whirlpool Forums user ‘goldiexxxx’ and the guides he has published. For full info and details see http://forums.whirlpool.net.au/forum-replies.cfm?t=1965598 and http://forums.whirlpool.net.au/forum-replies.cfm?t=2116394
NB: these instructions might be helpful to anyone else who is running on Mac OS X
Visit the main Raspberry Pi website for additional information: http://www.raspberrypi.org/
If you have followed the steps in Part 2 of this guide, you should be ready to install the Aurora Monitoring software on your configured Raspberry Pi. You will have remote access setup and configured via SSH (command line) and VNC (graphical). Lets dive straight in.
Install Aurora Monitor Software
Connect to your Raspberry Pi using VNC Viewer and open the web browser (Midori), then type in the following URL:
Download Aurora Monitor
Across the top of the screen you will see the download link for the latest version (v1.07 at the time of writing).
Download Aurora Monitor Software
Click the download link. You will be taken to the Sourceforge project page:
Aurora Monitor Zip File Download
Click on the auroramon-1.07.zip to start the download process. You will then be presented with a Save As… dialog box. Click the “Save As” button. This will allow you to choose where to save the file.
Save As Dialog
Next you will see the following File Manager style window. Make sure that the ‘pi’ username is selected in the left hand panel. This is whats called the Home directory of the current user – you should be logged in as the username ‘pi’ (this is the default). Click the “Save” button to save the zip file to this folder.
Unzip Aurora Monitor .Zip File
Next, open an LXTerminal window… we’re going back to the command line for a while. Type the command (note: it’s a lower case ‘L’ character followed by an ‘s’):
This will list all the files in the current folder – which should be your home folder, for the user ‘pi’:
ls command output
You should see the downloaded zip file in the list: auroramon-1.07.zip.
Install Zip Tools
If there isn’t a compatible zip/unzip tool installed on the Raspberry Pi, we can install one first. Skip ahead to the next paragraph below to try the unzip step and if it says “Zip: command not found“, come back here and type the following command to download and install the zip and unzip tools. Then repeat the unzip step again. Note: running this command if you already have the zip tools installed will not damage anything. It will check the version installed and upgrade it if necessary.
sudo apt-get install zip unzip
Already Have Zip Tools
If you have the unzip tool installed, or you want to test it out first, type the following command to unzip the downloaded file:
You should see some text scroll by as the tool runs. If there are now errors, run the ‘ls’ command again, this time with these extra arguments (lower case ‘L’ again):
You should see more detailed file listing:
Detailed File Listing
At the top of the listing you will see the existing zip file, but there will also be a new directory with the same name, minus the .zip extension: auroramon-1.07. This directory is where the Aurora Monitoring software has been extracted to. Our next task will be to download a package that is required for Aurora Monitor to run, and then we will finish the installation of the Aurora software.
Download WX Widgets Packages
Type the following commands in the open LXTerminal window:
sudo apt-get install libwxgtk2.8-0
Check to see if any of the files in the WX package require updating or missing. This will actually check for any missing packages on the whole system, so might take a little while:
sudo apt-get update --fix-missing
Get the next required package:
sudo apt-get install libwxgtk2.8-dev
You should be able to continue straight to the next section but if you encounter any issues, try doing a reboot make sure all the changes are applied correctly and then try to continue again.
Compile Aurora Monitor Software
Open LXTerminal once again. We are going to change directory to the /src folder in the auroramon-1.07 directory. Type the following command:
Now we compile the source code ready for running. This can take a while so be patient for it to finish:
You should see something like this:
Compile Aurora Monitor Source Code
Start Aurora Monitor
Now you are ready to run Aurora Monitor for the first time. If this fails, try rebooting again (sudo reboot). Make sure you are in the auroramon/src directory again if you reboot the system.
If all goes well you should see something this:
Aurora Monitor – 1st Run
Close Aurora Monitor by clicking on the ‘File | Quit’ menu option.
Configure Aurora Monitor to Start at System Bootup
You should still be in the auroramon-1.07/src directory. Copy the “auroramon” executable file (this is what was created by the compile step above) to system programs directory:
sudo cp auroramon /usr/local/bin
Change directory to the ‘autostart’ directory under the ‘pi’ home directory:
Create a new file called ‘auroramon.desktop’:
sudo nano ./auroramon.desktop
and add the following contents:
Save the file by pressing Ctrl+X, and then ‘Y’ to confirm the save, and finally press ‘enter’ to confirm the filename ‘auroramon.desktop’.
Lastly reboot the system so make sure that Aurora Monitor starts up automatically upon reboot. Give it a minute or two for the system to startup and then reconnect with VNC Viewer.
Configure Aurora Monitor Settings
If Aurora Monitor is not running when you reconnect with VNC Viewer, you will need to go back and review the previous steps and try to find out where the error is.
Serial Port Setup
The first thing you will want to do is determine the Serial Port that the RS-485 to USB Converter is registered under. This is required when configuring the Aurora Monitor. Type the following command in an LXTerminal window:
dmesg | grep tty
Note that the character between the dmesg and grep is the pipe symbol. It is often found on the same key as the backslash (\) character, but requires the Shift to be pressed as well. You should see something like the following output:
List Serial Ports
You want to take note of the port name for the USB connected FTDI Converter. On my computer the port is:
ttyUSB0 (Note: the last character is a zero)
In Aurora Monitor click on the “Settings | Setup” menu item.
Aurora Monitor Setup Menu
This will open the Setup dialog box:
Aurora Monitor Setup Dialog
Change the Serial Port to the correct one that was displayed in the ‘dmesg’ output. eg: /dev/ttyUSB0. The Inverter address is 2 by default on Aurora Solar inverters. Click OK to save the settings.
Click the “Settings | Location” menu item. The Location dialog will open.
Location Config Dialog
You need to enter the Latitude and Longitude for your current location to allow for correct plotting of the solar insolation graph.
How do you find out your latitude and longitude? That’s a good question! I used this blog post as a guide.
- Go to Google Maps (http://maps.google.com.au)
- Type in your address and then zoom in to a decent level so you can see your house or building nice and easily in the centre of the screen.
- Right click on your house and choose the option “What’s Here?”
- A green arrow should appear where you right clicked. Click it!!
- The latitude and longitude will be displayed above the arrow
Latitude & Longitude
Note: Aurora Monitor lists the longitude first and then the latitude, but in Google Maps they are listed with latitude first, then longitude.
You want to use the values in the red square. These are measurements in Degrees, Minutes and Seconds. So using the values above, I would set my location as follows:
- Latitude: -31:57:28
- Longitude: 115:51:49
Enter your values and click OK to save them.
Latitude & Longitude Values
Click the “Settings | Inverter” menu item. The Inverter dialog will open.
Clicking the checkbox will auto retrieve energy data from the inverter in 5 minute intervals.
Click the “Settings | PVOutput.org” menu item. The PVOutput dialog will open.
Once you have configured your own PVOutput account from the website, then you can enter your account ID and API key. Aurora Monitor will automatically upload your data to your website account every 5 mins while the inverter is working during daylight hours. Please donate to PVOutput.org to show your support for this [currently] free service.
As for the remaining settings – Charts, Historgrams & Extra Readings – feel free to investigate them and play around with these settings.
Final Configuration Setting
In the original setup guide by ‘goldiexxxx’ he makes mention about a USB/Comms lockup issue with conflicting ports. This was in part to the session that the VNC viewer was connecting to the Raspberry Pi with. The following fix resolves this issue.
Open a new LXTerminal window and enter the following command:
sudo nano /boot/cmdline.txt
Add this text:
immediately after the opening config setting:
Here is my edited file contents:
Now lets reboot the system and you should be ready to start monitoring!!
All that’s left to do now is hook up your Raspberry Pi to your inverter via the Serial to USB Converter so that it can start monitoring your power output.
The images and notes that ‘goldiexxxx’ has in his setup guide covers this brilliantly, so I won’t duplicate his work here. Whether you are on a Mac, Windows or other system, the physical hardware setup is essentially the same. You can connect with a modified RJ-45 cable or directly into the RS-485 terminal block. This really is just personal preference.
Good luck with your setup and Happy Generation!!
Photos of Final Setup
My inverter is mounted in the carport on the wall. There is a power point on the wall just nearby so I was keen to make use of this in the most efficient way. When you have the Raspberry Pi setup with a keyboard, mouse and screen, you need to have a powered USB hub connected to be able to utilise all these different peripherals. Not to mention that you also have the Wireless Adapter to plug in and the RS-485 to USB adapter.
Once you have remote access to the Pi setup (via the wireless adapter), the only other cables or connections you need are:
- Power Cable (from a USB enabled power source)
- RS-485 to USB Adapter
With the wireless adapter already taking up 1 USB port, your RS-485 to USB will fill the remaining one. If we set things up this way though, we somehow need to power the device from another USB based power source. I could have used the powered USB hub that was provided with the kit, but that means that there is a large power brick to be plugged into the power point on the carport wall, plus there is extra cabling to connect the hub to the Pi and then the hub itself.
So I thought I would try something different… what about my spare iPhone 5 charger brick? This is a very small USB charger but it works perfectly well.
iPhone 5 Power Brick
You could also use an iPhone 4 charger brick too.
iPhone 4 Charger
I could plug it straight into the wall, run the cable directly to the inverter and plug it into the Raspberry Pi inside. This would remove the need for the hub to be included in the deployment. It would save on space too. So here is what the final setup looks like:
NOTE: In this photo, you can see that the Inverter is powered on. This was only during final testing and at no time was I reaching inside or touching anything with it turned on and the cover off. This is definitely dangerous and you are risking electric shock if you do so. At all times make sure the AC Isolator switch is turned off, as well as the DC Isolator switch before opening the front panel and reaching inside the Inverter!!
With the font panel closed on the inverter, there is no wireless signal, so I positioned the wireless antenna to poke down through the cable gland. This works fine and I can connect from anywhere in the house to check on its health.
Wireless Antenna exposed through cable gland
This is what it looks like inside the inverter. There isn’t a whole lot of room to move, but it fits nicely:
Raspberry Pi inside Inverter
RS-485 Cable Setup
This is often a source of frustration and confusion. For connecting from the Inverter motherboard to the RS-485 to USB converter I used a generic computer network cable (CAT 5). This has by default the RJ-45 connectors on each end. This is the correct size to fit in the two adapter ports on the motherboard, however if you do this, some network cables don’t have the correct pins wired up that are needed for data communication from the inverter.
So instead I snipped off each plug at the end of the cable and used 3 of the 4 available wires:
Cable Connection Options
NOTE: Don’t forget to push the termination switch on the left of the RJ-45 sockets into the DOWN position, as shown in the image above.
- Terminal Block Position 3 – RTN – White and Blue Striped Wire
- Terminal Block Position 4 – +T/R – Solid Orange Wire
- Terminal Block Position 5 – -T/R – Solid Blue Wire
- The Orange and White Striped Wire is unused and I actually ended up clipping it off from each end so it wasn’t in the way.
Wiring Hookup RS-485 Adapter Plug
RS-485 to USB Wiring Orientation
Once I figured out which wire was meant to go into which plug on the RS-485 to USB adapter everything worked perfectly. Data will start flowing immediately to your Raspberry Pi and Aurora Monitor will start graphing it, and if configured, start sending it up to the pvoutput.org website too.
Aurora Monitor Live Data
Hopefully if you’re bothered reading this far, you also have a screen in Aurora Monitor something similar the one above. Thanks for reading and if you have any questions, please don’t hesitate to leave a comment, drop me a line on twitter or via email (jenart at gmail dot com).