Weewx and Tristar MPPT Controller Integration

Hey everyone,
Developed a solution that I think really ends up being very powerful for my off grid cabin at 10k feet in Colorado. It runs truly off grid utilizing solar and satellite internet. I spend chunks of time up there, but am often away, so I wanted to keep track of things in the most energy efficient manner I can and check in on the place, as well as just virtually visit when stuck at work :-)....
So I centralized on a Raspberry Pi to act as a server there that uses very little power (about 6w most of the time max). I started running a program called weewx on there to provide a view and logging of the weather for me. This program logs the data, generates web pages, and provides graphs, gauges, and skins to create customized views. This all runs on the pi.
I was using the internal tristar web page to check on the charge status, but it is very limited, doesn't allow me to customize the view, and doesn't provide me any kind of ability to query the log in interesting ways. So last time I was up there, I had the great idea of combining the two. So I ended up writing a data service for weewx that queries the tristar modbus interface and gathers the data at the same time it grabs the weather data. This all gets stored in the sql database on the pi, so I have a record every five minutes. Then I can use the built in skinning capabilities of the weewx program to create any web page I want. Here is my current example:

There is lots of documentation out there on configuring, installing, customizing, and using weewx, but here is a link to my github repo with the code and instructions on how to add in the tristar support.
Thought I would share my efforts as so far it has been way more reliable than the tristar internal web server (which crashed all the time) and a lot cleaner to view/access. Kind of nice to get the whole picture of what is going on at the cabin in one screen.
Jim Olsen
Developed a solution that I think really ends up being very powerful for my off grid cabin at 10k feet in Colorado. It runs truly off grid utilizing solar and satellite internet. I spend chunks of time up there, but am often away, so I wanted to keep track of things in the most energy efficient manner I can and check in on the place, as well as just virtually visit when stuck at work :-)....
So I centralized on a Raspberry Pi to act as a server there that uses very little power (about 6w most of the time max). I started running a program called weewx on there to provide a view and logging of the weather for me. This program logs the data, generates web pages, and provides graphs, gauges, and skins to create customized views. This all runs on the pi.
I was using the internal tristar web page to check on the charge status, but it is very limited, doesn't allow me to customize the view, and doesn't provide me any kind of ability to query the log in interesting ways. So last time I was up there, I had the great idea of combining the two. So I ended up writing a data service for weewx that queries the tristar modbus interface and gathers the data at the same time it grabs the weather data. This all gets stored in the sql database on the pi, so I have a record every five minutes. Then I can use the built in skinning capabilities of the weewx program to create any web page I want. Here is my current example:

There is lots of documentation out there on configuring, installing, customizing, and using weewx, but here is a link to my github repo with the code and instructions on how to add in the tristar support.
Thought I would share my efforts as so far it has been way more reliable than the tristar internal web server (which crashed all the time) and a lot cleaner to view/access. Kind of nice to get the whole picture of what is going on at the cabin in one screen.
Jim Olsen
Tagged:
Comments
https://github.com/jim-olsen/weewx_tristar
Jim Olsen
There is a package for the raspberry pi for security camera software, although I found its motion detection to be less than adequate for my needs. So I also run a small fanless windows machine running blue iris software that only draws 0.25 amps. So I have my full server needs up and running for weather, cameras, and vpn / remoting access all for about 0.5amps at 12v…..
I used to use the internal web page in the Morningstar, but it crashed all of the time and wouldn't come back up without a full reset, and it was pretty limited. The weewx interface stores all of the data in a local sql database, so I will have data for every five minutes, along with the weather, for as long as I want....
Jim
Jim
Jim
I can imagine lots of fun can be had once that data is available like that. I could use the data with ifttt to control loads when I am gone from the cabin. For example, I could turn on the power to my window air conditioner when in absorb or float, and when my input panel wattage is greater than output wattage to the batteries, by an amount greater than the air conditioner uses. I could use averages of the readings and/or time delays too so it is not kicking on and off to much. That would keep the cabin temp (and humidity) right by using excess solar power, and not affect the battery charging. A mini-split with a heat pump sounds better and better too.
Pretty inspiring stuff, Jim.
There is definitely a lot of automation you can do with this information.
Jim