you1
Members
-
Joined
-
Last visited
Reputation Activity
-
you1 got a reaction from RoganDawes in SunSynk WiFi Dongle Hacking.I can provide a wireshark capture of the logger traffic, if anyone is interested to try and decipher it.
At the moment I'm pulling the modbus data directly from the inverter, so I'm not really motivated to use whatever the logger is pushing out.
-
you1 reacted to system32 in Sunsynk RS485 Modbus RTU request, bytes level1) 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]