• Have you tried out dark mode?! Scroll to the bottom of any page to find a sun or moon icon to turn dark mode on or off!

diy solar

diy solar

Getting data from TS-MPPT

Glock24

Solar Enthusiast
Joined
Aug 6, 2024
Messages
294
Location
Managua, Nicaragua
Hello,

I would like to know if there's a tutorial on how to read data from a Morningstar TS-MPPT charge controller and and log the data in a plain text file or send it to something like InfluxDB.

MS View can get data in real time, so it must be possible to do it another way.

I would like to use a SBC for this. If someone could send me in the right direction I'll be grateful.

I also have a Fangpusun BMV-700 (Victron clone) Smart Shunt. If I could get the data out of this too it'll be awesone.
 
To get the data from the TS-MPPT60 it needs to get processed before it is usable and I don't know how to do that in InfluxDB.

Luckily I found a Python script that gets the data and passes it to InfluxDB already processed. It was a couple years old and needed some adjusting to newer python versions, it is now working form me.

I'll post it later in case it helps anyone.
 
It's nice to have a graphical representation of daily PV production, I only had consumption via IotaWatt's internal logging. I've had no time to tinker much with Grafana but I'll get more into it when I get the chance. I'll also integrate the IotaWatt's data into InfluxDB/Grafana so I can see consumption and production in one graph.

Here's today's harvested energy.
1726185182417.png
 
To get the data from the TS-MPPT-60 I used this script:


But I had to modify it to get it to work on Debian 12 with latest InfluxDB. The modified script is attached. The changes are:

Line 22:
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
Changed to:
from pymodbus.client import ModbusTcpClient as ModbusClient

Line 37:
rr = client.read_holding_registers(0,80,unit=1)
Changed to:
rr = client.read_holding_registers(0,80,slave=1)
 
Last edited:
Well, it turns out InfluxDB is kind of shitty, reporting suddenly stopped working and it was because the VM filled all the RAM and the OS was killing the InfluxDB process constantly. After some reading I learned Influxdb is very very resource hungry and inefficient.
While looking for alternatives I found VoctoriaMetrics which seems promising. I'll be updating this thread when I get it running.
 

diy solar

diy solar
Back
Top