Solution: Reading Solax SK-SU5000(E) inverters & SDM630V2 Modbus Power Meters

In addition to Robert’s comment, I would add: you might need an RS485 interface as well.
(Your inverter’s Modbus interface could be RS-232 or RS-485.
But of the two, RS-485 is the one used more often in a Modbus environment)

It should work with your inverter (please let me know if it does it does not).

The Solax inverters (at least the ones I’ve used) use Modbus/TCP. Connect it to your network via the ethernet port (the wifi interface is completely different), assign an IP and hostname to it via DHCP, and add the hostname to the list of inverters in config.toml.

Completely forgot about Modbus/TCP.
Thanks, Deece! thumbsup

Thanks @Robert.Wall @Bill.Thomson @deece

The Solax inverter model I have is connected by WI-Fi and does not have any open ports. I’ve done a full nmap scan.

RS-485 is available but in use my another meter. Can I connect an RS-485 to USB adapter to the same cabling?

Thanks again, I am a newbie to this tech!

You can connect it - RS485 allows that - but you can only have one controller on the bus. It’s likely that whatever the other meter is talking to is the controller, so that would need to be programmed to read your inverter as well.

Just read this again! The inverter I have has a Wi-Fi USB adapter and no LAN port. There is a LAN USB adapter available but it is pricey!

I will try the RS-485 route first :slight_smile:

The modbus port for the meter won’t expose any useful information, it’s there as a replacement for using CT transformers for power measurements.

Looking at the manual, there is an RS485 port next to it, which looks like a good candidate.

You’ll need to tweak the SolaxModbus class to use RTU rather than TCP, if it works, let me know and I’ll put some effort into supporting it

I’ve got an RS485 to USB adapter arriving today, I’ll give it a go ASAP and let you know!

Don’t forget your 120 Ohm terminating resistors :slight_smile: probably already built in on the inverter side, but you may need one on the adapter side. Some adapters have SMD so you can install our directly on the board.

So much to learn :upside_down_face: Thanks for the heads up!

Hi @deece

I’m having the following problem running the script:

pi@emonpi:~/PowerScraper $ python power_scraper.py
Traceback (most recent call last):
  File "power_scraper.py", line 37, in <module>
    from Inputs.SolaxWifi import SolaxWifi
ImportError: No module named Inputs.SolaxWifi

I cannot use Modbus so I’m trying with wifi. I have a Raspberry Pi with EmonCMs installed with a USB WiFi dongle connected to the Solax inverter. I have tested the connection with:

curl -X POST http://5.8.8.8/?optType=ReadRealTimeData

And receive data okay. So I think something is wrong with the script. I cloned the project from Git and have all the folders.

Any ideas?

Thanks

Max

You need Python 3 perhaps.

pi@emonpi:/opt/openenergymonitor $ python
Python 2.7.16 (default, Apr  6 2019, 01:42:57)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
pi@emonpi:/opt/openenergymonitor $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
pi@emonpi:/opt/openenergymonitor $

I think you can just execute the script ./power_scraper.py because of the hash bang (#!/usr/bin/python3).

Python is complaining about a missing module.

Typically, one would install said module via Python pip

e.g.
sudo pip3 install SolaxWifi IF both Python2 and Python3 are installed
otherwise,
sudo pip install SolaxWifi IF Python3 is installed and Python2 is not installed.

The actual name used to install the module may be different. It may or may not contain
upper case letters, or it might be called something else altogether.

I don’t know python that well but know there is a big difference between Python 2.x and 3.x.

there is a sub folder called inputs and the line refers to that.

The hash bang points to python3 but @maximundo started the script with the python 2 interpreter.

Pretty sure that will be the issue.

Too right you are. :wink:

In addition to the Solax module, he needs the toml and the twisted modules too. Viz:

import toml

from twisted.internet import task, reactor
1 Like

Does this need to be pip3 for python3 module?

Sure enough does. Good catch! :wink:

Depends on whether or not his system has both Python2 and Python3 installed.

Post edited. Tnx!

1 Like

Seems pip3 isn’t installed. Trying to do that now without luck, so far.

sudo apt-get install python3-pip

Google is your friend.

thumbsup