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:
1 |
http://auroramonitor.sourceforge.net/ |
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).
Click the download link. You will be taken to the Sourceforge project page:
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.
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’):
1 |
ls |
This will list all the files in the current folder – which should be your home folder, for the user ‘pi’:
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.
1 |
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:
1 |
unzip ./auroramon-1.07.zip |
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):
1 |
ls -al |
You should see more 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:
1 |
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:
1 |
sudo apt-get update --fix-missing |
Get the next required package:
1 |
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.
1 |
sudo reboot |
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:
1 |
cd ./auroramon-1.07/src |
Now we compile the source code ready for running. This can take a while so be patient for it to finish:
1 |
sudo make |
You should see something like this:
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.
1 |
./auroramon |
If all goes well you should see something this:
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:
1 |
sudo cp auroramon /usr/local/bin |
Change directory to the ‘autostart’ directory under the ‘pi’ home directory:
1 |
cd ~/.config/autostart |
Create a new file called ‘auroramon.desktop’:
1 |
sudo nano ./auroramon.desktop |
and add the following contents:
1 2 3 4 5 6 7 8 9 |
[Desktop Entry] Encoding=UTF-8 Type=Application Name=Auroramon Comment= Exec=auroramon StartupNotify=false Terminal=false Hidden=false |
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.
1 |
sudo reboot |
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:
1 |
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:
You want to take note of the port name for the USB connected FTDI Converter. On my computer the port is:
1 |
ttyUSB0 Â (Note: the last character is a zero) |
In Aurora Monitor click on the “Settings | Setup” menu item.
This will open the Setup dialog box:
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.
Location Setup
Click the “Settings | Location” menu item. The Location dialog will open.
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
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.
Inverter Setup
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.
PVOutput.org Setup
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:
1 |
sudo nano /boot/cmdline.txt |
Add this text:
1 |
dwc_otg.speed=1 |
immediately after the opening config setting:
1 |
dwc_otg.lpm_enable=0 |
Here is my edited file contents:
Now lets reboot the system and you should be ready to start monitoring!!
1 |
sudo reboot |
Final Steps
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.
You could also use an iPhone 4 charger brick too.
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 front 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.
This is what it looks like inside the inverter. There isn’t a whole lot of room to move, but it fits nicely:
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:
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.
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.
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).
Pingback: Raspberry Pi Setup to monitor Aurora PVI-5000 Solar Inverter – Part 2 | Monkeys and Gorillas()
Pingback: Raspberry Pi Setup to monitor Aurora PVI-5000 Solar Inverter – Part 1 | Monkeys and Gorillas()
Pingback: Fotovoltaico | Pearltrees()