Arno Uhlmann
Members
-
Joined
-
Last visited
Reputation Activity
-
1) Make sure you set the Modbus ID for SunSynk as per this post:
https://powerforum.co.za/topic/8451-sunsynk-inverter-monitoring/page/21/#comment-124091
Mine reset itself to ID=0 after a firmware upgrade.
2) The serial side of "open_serial / read / write" probably needs some work
On my tests, the read seems to return incorrectly every other time - may be because the ttyUSB0 has another app running on it.
I've attached a simple python3 app to test with:
#!/usr/bin/python3 # Simple test app for reading SunSynk 8k via Modbus # pip3 install minimalmodbus import minimalmodbus device = minimalmodbus.Instrument("/dev/ttyUSB0", slaveaddress=1, debug=True) device.serial.baudrate = 9600 # Baud device.serial.timeout = 1.0 # seconds print(device) result = device.read_registers(registeraddress=182, number_of_registers=3) print(result) ######################################################### $ python3 test1.py MinimalModbus debug mode. Create serial port /dev/ttyUSB0 minimalmodbus.Instrument<id=0x768304d0, address=1, mode=rtu, close_port_after_each_call=False, precalculate_read_size=True, clear_buffers_before_each_transaction=True, handle_local_echo=False, debug=True, serial=Serial<id=0x768304f0, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=1.0, xonxoff=False, rtscts=False, dsrdtr=False)> MinimalModbus debug mode. Will write to instrument (expecting 11 bytes back): 01 03 00 B6 00 03 E4 2D (8 bytes) MinimalModbus debug mode. Clearing serial buffers for port /dev/ttyUSB0 MinimalModbus debug mode. No sleep required before write. Time since previous read: 1413018911.60 ms, minimum silent period: 4.01 ms. MinimalModbus debug mode. Response from instrument: 01 03 06 04 C8 14 EE 00 63 E4 CD (11 bytes), roundtrip time: 0.1 ms. Timeout for reading: 1000.0 ms. [1224, 5358, 99]
-
Arno Uhlmann got a reaction from system32 in Sunsynk RS485 Modbus RTU request, bytes levelDear system32,
the ModBusSN index is set to 01, the inverter is defined as "slave" and not in parallel. Thank you for your link to the property menu, the ModBus settings are well hidden.
But there is still no response to my small 8 bytes request. I tested the signal just to the RJ45 plug sitting inside the inverter.
I am using 9600,8N1 with my atmel ATMega324 and my RS485 circuit works fine together with our Lumel power meter.
If there is nothing else to check, I will try to do it with your Python script ...
Thank you for your support,
Arno