Libre Solar Community Forum

MPPT1210HUS ThingSet + Node-RED mini tutorial

Hi guys.

I’ve setup a small Node-RED flow to display values from the MPPT1210HUS; it can be easily adopted to other devices. It took me a moment to figure it out, so I thought I’m gonna share.

Here is the flow with all the values of the MPPT on the right:

The code of the first function node 'delete #mSerial ’ looks like this:

msg.payload = msg.payload.replace("#mSerial ", "");
return msg;

It is needed to be able put the output into a JSON parser. The JSON node has to be set to:

Convert between JSON String & Object

The function node ‘router’ directs the different payloads towards individual outputs:

tag1 = {payload: msg.payload.Device.rUptime_s}
tag2 = {payload: msg.payload.Device.rErrorFlags}
tag3 = {payload: msg.payload.Load.rMeas_A}
tag4 = {payload: msg.payload.Battery.rMeas_V}
tag5 = {payload: msg.payload.Solar.rMeas_V}
tag6 = {payload: msg.payload.Load.pOutDay_Wh}

return [msg,tag1,tag2,tag3,tag4,tag5,tag6];

Here is where you can add your own code. Make sure to adjust the number of outputs on the Setup tab. To find the path of a ThingSet parameter, follow this small guide and go to the section " Understanding the structure of a message"

And this is how the GUI looks like:


Hi Dan, thanks a lot for sharing, that looks really nice!

Do you also store the data in a database? We’ve done some experiments with Open Energy Monitor so far, but I finally switched to VictoriaMetrics + Grafana for monitoring.

Hi Martin,

I think if I add a database, I would use InfluxDB with Grafana.

For now I’m thinking about an offline solution with a RPi managing the data storage. Here I’ll use Node-RED, Redis and Python.

But maybe it would be nice to have a community server running so people could easily connect to it. The data could be used for analysis, comparison, learning and I guess many more things.


Thanks @dan1,

I’m building my own visual interface for the data. If I wanted to access the historical raw JSON data from ThingSet, would I want to use Node-RED to send data to InfluxDB, or would there be a simpler way to access the data from ThingSet via a web request?



The ThingSet data arrives in my case via USB, /dev/ttyUSB0. You could also write a small tool that gets data from serial/USB and puts it on your webspace.