Get your Raspberry PI up and running to visualize your solar system with Grafana, MQTT and Node Red!
Its important to understand that this is not magic stuff that will create all this wonderfull graphs for you! It will need you to do some work and also have some knowledge to do it. I will help out doing it to a degree that i can manage it but also make note that I need to make a living and this is something i do on my spare time. Setting up your Raspberry is on the other hand not difficult!
What is this ISO all about?
This iso is just a collection of good to have tools, to do automatization and visual graphs bundled into a package that will run on a Raspberry PI.
I have put together an ISO image with what i would consider a collection of tools that i think will do my day 2 day work easier working with my DIY solar system. It does not come bundled with fancy scripts that automatically takes all data from your equipment and draws up graphs. I do add some scripts that will start your work including some example dashboards and flows.
- Node Red
- Mosquito MQTT
- Apache (LAMP)
- VNC server
- Solar-SiS Or on NPM
What do i need?
- Raspberry PI 2 or 3 (Version 3 prefered)
- 8gb SD card (or bigger)
- Screen/Mouse or some way to get hold of its network configuration. (It runs DHCP on wired interface)
How to get it up and running!
There is plenty of guides out there on how to get raspian running so i will reffer to them:
- Begin with downloading my premade ISO from here:
- Write the image to the SD card in question with Etcher or Disk32 Writer. (See above installation manual)
Its now time to boot it up!
You need to have a way to set up network. I do prefer that you use a screen and follow this manual:
- Configure network among other things: https://www.raspberrypi.org/documentation/configuration/
- Find the IP address: https://www.raspberrypi.org/documentation/remote-access/ip-address.md
When you got the IP to the machine the fun will begin!
Lets first start and browse to the machine and you will get something like this:
This page will show you all installed components and how to reach them. This page will also (In near future) show you the version of my image that you are running and if there is an update.
Example scripts and how to?
Question is now. How simple should i do this? How much time should i spend making it bullet proof? Unfortunately i cannot spend all days on it since i need to pay my bills.
There are a couple of example scripts located in /energy-logger/
There is source code for all of them except the Batrium logger as of now. There is ongoing work for the Batrium logger being done and we dont want to release those parts until we are confident they do work and that it will not cause issues. We are all very keen that our Batteries are maintained properly! 🙂
To run any of those script you need to have a terminal. You can get to a terminal in 3 different ways.
- Ssh to the machine
- Use VNC to connect to the machine
- Monitor and keyboard
When you have the terminal up and running this is what you will see
Then i suggest that you go to the folder in question by typing: (<enter> means that you need to press the enter sign)
cd /energy-logger <enter>
There is currently 3 folders for the MPP product line. mpi, pcm and pip. They correspond to those 3 genres and uses the same code. Currently not much info to add but you need to configure the port and then start them. To start and stop them i suggest using the systemctl command.
systemctl <start/stop> solar_xxx
where xxx is pcm, pip or mpi.
The example code resides under:
Same as for the solar sis. It exist under /energy-logger/WatchmonUdpListener.
Start and stop it with systemctl and the command is batrium. It is per default automatically started.
The last piece of software included is the one fetching data from external meter:
To run this you run
sudo python mat.py
For automatic run of this you do
systemctl start meter
Automatic stop and start on reboot.
You need to enable the services for this. There is currently 4 setup
batrium, solar_mpi, solar_pcm, solar_pip and meter.
systemctl enable <name to enable>
systemctl disable <name to disable>
You can do this in Webmin!
Head to Github and send in suggestions or bugs. You can even help out with the code!
Other ways to help out?
- Become a Patreon member
- Send me some bucks on Paypal
- Subscribe to my youtube channel and like videos
- Buy stuff via my links
- Promote my channel on your places
- Just cheer on my and suggest and ask for things!
Dont forget about my helper at OpenGD on Github! Erik have helped me allot so cheer to him!
Fix bugs and features!
Links to buy stuff
External page to follow along the work:
Solar sis source code on Github:
Batrium source code: