Thanks a lot, I’ve submitted a PR to implement these changes to make PowerScraper compatible with PyModbus 2.3.0
On a separate topic does anyone know the MAC address range for a Solax inverter? I’m trying to remotely located a Solax inverter on a large network, it would be very useful to have an insight into what sort of MAC address range I should be looking for. Does anyone know of a way to identify an inverter e.g web request responce to a particular port?
Normal as in normal or normal as in Agile? if you aren’t on Agile and haven’t yet, use the emonCMS App to compare your usage against what it would have cost on Agile. You may be surprised (I was).
I m just on a Normal Fixed Tariff ( USwitch Octopus 12M Fixed )
I have yet to look into any of the emon stuff yet. As I wanted to wait till I got battery control working, which I have now.
If you are using emonCMS, install the ‘App’ and do a comparison. I have no PV/Battery etc and my effective rate for the last 4 months would have been 10p/kWh as opposed to the 14p I am paying.
How I can read values from SMD630V2 smart meter when it is connected directly via Modbus wires to Solax X3 Hybrid inverter? I can easily read values from the inverter via the Modbus TCP connection. I’m using Loxone Miniserver with the Modbus server instance. This is not a problem, register numbers converted from hex to decimal are working. But I don’t understand how I can read values from SMD630V2 smart meter via inverter over Modbus TCP connection.
That’s because the 630 uses Modbus RTU which is raw serial data. i.e. it’s not encapsulated
in a TCP frame like Modbus TCP.
In fact, that’s essentially what Modbus TCP is. i.e. a Modbus RTU packet in a TCP frame.
A Modbus RTU to Modbus TCP gateway attached to the 630 should enable you to poll the 630 from your Modbus TCP connection.
I dont have the orignal node-red stuff as I moved over to this config a few years ago. If I remember correctly you just add the node red modbus and then you can read the registers.
Paul
I have just updated to the latest code and I am getting an error when trying to launch the program
sudo ./power_scraper.py
:0: UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'verify_ip_address' from 'service_identity.pyopenssl' (/usr/lib/python3/dist-packages/service_identity/pyopenssl.py)'. Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
Setting up EmonCMS
not connected
not connected
err [Failure instance: Traceback: <class 'KeyError'>: 'max-power'
/usr/local/lib/python3.7/dist-packages/pymodbus/framer/socket_framer.py:181:_process
/usr/local/lib/python3.7/dist-packages/pymodbus/client/asynchronous/twisted/__init__.py:126:_handleResponse
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:460:callback
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:568:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/home/pi/PowerScraper/Inputs/SolaxModbus.py:198:solaxRegisterCallback
./power_scraper.py:58:outputActions
/home/pi/PowerScraper/Outputs/SolaxBatteryControl.py:135:send
/home/pi/PowerScraper/Outputs/SolaxBatteryControl.py:62:setInverterPower
]
err [Failure instance: Traceback: <class 'KeyError'>: 'max-power'
/usr/local/lib/python3.7/dist-packages/pymodbus/framer/socket_framer.py:181:_process
/usr/local/lib/python3.7/dist-packages/pymodbus/client/asynchronous/twisted/__init__.py:126:_handleResponse
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:460:callback
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:568:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/home/pi/PowerScraper/Inputs/SolaxModbus.py:198:solaxRegisterCallback
./power_scraper.py:58:outputActions
/home/pi/PowerScraper/Outputs/SolaxBatteryControl.py:135:send
/home/pi/PowerScraper/Outputs/SolaxBatteryControl.py:62:setInverterPower
]
^CShutdown
Just a heads up, I had 2 of my inverters fail recently with “Inv EEPROM fault”. Solax didn’t have replacements or engineers, so they sent me 2 of the new X1 hybrids + approximately equivalent hybrid batteries to replace my LG Chems which were not compatible (48V vs high voltage for the new inverters).
The latest patches reduce the number of writes to EEPROM to try and avoid this.
If you do get the fault, Solax will tell you to update the firmware on the inverter. This failed on both of mine, and bricked the units, which is why they replaced them.
If they do send out new hardware, great, if not, this is how I was able to repair my failed units:
Bad manager flash
Shut down the inverter & remove the cover
Remove the manager board, it’s the bottom one with the ethernet ports on it
Use an SWD programmer with ST-Util to flash the firmware manually. The SWD programmer should be connected to the JTAG port next to the display connector.
Bad Master Inverter Flash
Remove the inverter control board directly above the manager board.
There are 2 JTAG ports in the lower left. The horizontal one is for the slave controller (you don’t need to touch this), and the vertical one is for the master.
Connect an XDS100V2 or V3 programmer (cheap clones available from China) to the master port, and flash the inverter master firmware.
Fix INV EEPROM fault
You should be confident with SMD soldering to attempt this
Remove the inverter control board directly above the manager board.
Remove the failed EEPROM chip U1 next to the JTAG connectors
Replace it with a new Atmel AT24C08C chip
Reinstall the board & bring the inverter up
Reset Manager EEROM & Inverter EEROM in the settings
Restart the inverter
This should allow you to bring the inverter back online in the event of a failure.
Shipping from China can be slow, so I would recommend ordering a few cheap pieces in advance & keeping them aside in case something bad does happen: https://www.aliexpress.com/item/32719963657.html