Solar and stats

I finally got round to getting solar installed at the house. Due to the dormers, I ouldn’t really fit much on the main roof. I did manage to squeeze 1.5kW of panels onto the garage.

Red Electrical came and installed everything very quickly and neatly, very impressed with their work and support in deciding what equipment to go with.

The solar inverter that I went with is a Solis mini 1500 4g by Ginlong. Basically, a single MPPT grid tie inverter that will handle up to 1.5kW. The 4g just means its the fourth generation of their kit. Its a fairly cheap but decent chinese model, and has the option of a wired or wireless monitoring stick. This is where the fun starts!


Now, I like to gather stats about power usage (and just about anything else really), and I rather liked the idea of using data directly from the inverter rather than the more typical way of using clamp meters such as those from Open Energy Monitor, which I have used before. The idea being that data from the inverter will be more accurate than a passive monitoring system.

Of course, it wasn’t going to be that easy. The monitoring stick is designed to push data out to a remote server and you access the data via a portal. The portal isn’t actually that bad, it seems the system is used and rebranded by a number of manufacturers, but this wasn’t good enough for me. I wanted the data fed into my home automation system (OpenHAB), similar to how I’d set up my off grid system.

Thankfully, at least the monitoring stick does support sending to an alternate IP address and port. The problem is, the protocol is not documented anywhere and the manufacturer will not release it. I searched for quite a while under various names and brands and found a few people who had tried to do similar. The newest work in github was from graham0, but was two years old and for a different version of the firmware. However, it did give me a starting point.


So, pointing the secondary address of the monitoring stick to my desktop, I started examining the data being sent. There was a choice of a few protocols, but the one that seemed to give the best data was listed as SolarMAN-1.

What I was receiving was a 270 byte string. In HEX this was:


The XXXXXX part are the serial number of the inverter. I figured this out first as it was actually sent in plain ascii. Good start, at least I was getting something.

I worked on the assumption that the rest of the data was encoded similar to the previous protocols as worked out by graham0, I started looking for various 2 and 4 byte blocks. Temperature was quickly found as the first two bytes after the serial number. The rest of the data took a few days to crack. As I logged more of the rawdata to a file, I started pattern matching trends and data to the graphs that the main monitoring portal was producing.


In the end, I managed to write a program to take in the data and spit out usable stats. My next step will be to pipe this data into my MQTT server. Then OpenHAB can then access it much like my previous solar experiences. I have released the code on github, incase anyone else has a similar setup or wants to extend it. The raw data actually seems to support dual MPPT inverters, and theres a lot of data in there that I haven’t figured out yet.

So far I’m pretty certain that I’ve got the following stats correct:

  • Temperature
  • DC Volts (from panels)
  • DC Current (from panels)
  • AC voltage (grid supply)
  • AC Current (how much is fed into the grid)
  • AC Frequency (should be around 50Hz)
  • kWh produced today
  • kWh produced in total

I’ll continue work on it and see what other stats I can pull out, but from this I should be able to calculate most other things.

Is it worth it?

As its only a small solar install, the ROI is going to be quite long compared to the solar on the previous house (only have another year or so and they should be paid off). However, I do think solar is great thing to have. Now if only I could justify a powerwall…

8 Replies to “Solar and stats”

  1. Yes I have the same unit for my 2.5k panels. I don’t have your wonderful tech knowledge, but I would like to get into it and read how much my electric stove is using to cook dinner, which is naturally after the sun is off the panels.
    So far, I’ve tried as per their information pamphlet, but getting nowhere..
    Any helpful advice please. Claire

    1. If you’re wanting to measure how much a device is using then you really need something to measure at that point. The stats I get from the solar just show how much energy it is generating, not how much the house (or individual appliance) is consuming. Going from your email and IP address, I’m guessing you’re in australia, so I can’t really advise on what products are available over there unfortunately. A quick look shows this up:

      But its only rated to 2.4kW, so it depends on the cooker and how much power it consumes. You’d have to look up the model number and get the max power draw of the cooker. The same website also offers energy monitors, some of which support solar too and will read the information using simple clamp meters and display it on a nice wireless display. A much simpler solution unless you are diving deep into the home automation minefield. 😛

      Also, I’ve found that the stats module for the inverter is rather poor and constantly crashes. I need to find some time to revisit it.

      1. Hi my take on this might be slightly different, having a smart meter installed id like to take stats from that and from directly from the inverter, if the inverter hits above a certain threshhold ( ie my running costs for the house are around 1kw) I’d like to be able to switch on battery charging (car batteries in the garage) either by a relay or signal to wifi plug switches to charge the batteries this can be used to power other things, I seem to be contantly paying in 2kws to the grid most of the day

        1. Easy enough to do with something like OpenHAB or Home Assistant. All the data from various things (solar invertor, smart meter, charger) feed into the home automation and you set up rules and triggers in there to turn things on/off depending on loads.

          Of course, it relies on the various systems being able to talk to the home automation. Some may do it natively, others you may have to bridge in some way.

          Once you have the data all in one place, the rest is (relatively) easy.

  2. Impressive. I also have a Ginlong Solis and like to use the same second IP address for monitoring and storing the Inverter data.
    However I am blank on Linux and PI stuff but did some (wifi) projects on ESP8266.
    What I ran into is that my ESP seems to receive no data or even is not being connected to by the GinLongWIFI Stick.
    Any suggestions?

    1. I’ve had lots of issues with the ginlong stick (mine is hardwired, not wifi) and getting it to report data. Its not the most reliable bit of kit.

      Ideally I’d like to get rid of it and talk to the inverter directly, but thats a fairly major project and I’ve too many other things on the go. (as always)

  3. Darren,

    I am about to bite the bullet and move my inverters from the WIFI stick to Modbus/RS485 – will send you over the details when it is done so you can retrofit it to your setup. Are you still using Openhab ? I use Node-Red and Home Assistant


    1. That would be great. I gave up on the wifi stick ages ago as it was just so unreliable.

      Yeah, still using openhab quite happily. Did try HA, but the Google Assistant support was a pain. (either pay, or jump through a whole bunch of hoops)

Leave a Reply to Craig Curtin Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.