Cool project! I'm trying to communicate with a Tracer 4210a and it mostly works, except that the Modbus interface stops responding periodically for hours on end.
Have you ever run into that issue?
And I'm curious about this observation:
What happens when you try? Does it crash or just not respond?
I'm reading multiple addresses at once, and I wonder if that could be my issue. This is the stripped down Python code I'm using from a Pi:
from pymodbus.client.sync import ModbusSerialClient as ModbusClient
port = "/dev/ttyUSB0"
client = ModbusClient(method = 'rtu', port = port, baudrate = 115200)
# read 6 registers starting at 0x3000
result = client.read_input_registers(0x3000, 1, unit=1)
pvVolts = float(result.registers / 100.0)
pvAmps = float(result.registers / 100.0)
batteryVolts = float(result.registers / 100.0)
batteryAmps = float(result.registers / 100.0)
print "pvvolts=", pvVolts
print "pvamps=", pvAmps
print "batteryvolts=", batteryVolts
print "pvcurrent=", batteryAmps
time.sleep(1) # pause before reading the next register
# read the battery SOC
result = client.read_input_registers(0x311A, 1, unit=1)
batterySOC = result.registers
print "batterySOC=", batterySOC
This works well for awhile, and then will start have connection issues seemingly randomly. If I read the batterySOC (the second register reading) it seems to have issues more frequently.
It's driving me nuts!
I'm trying to make it so the fridge in my RV runs off electricity when the battery is full (the SOC is > 95%) and the panels are putting out more than X watts. Its all running beautifully and my Pi flips a relay that makes the fridge run on electricity for awhile, which saves a lot of propane, but then the whole thing will stop working for a day. Ugh.
I wrote some more on it here:
And here's someone else communicating with a Tracer controller:
I'm currently trying to read the data from the back of the MT50 remote monitoring box from an Arduino.