July 15, 20224 yr Hi, could anyone please assist with the correct pinout for the solarman stick (DB9)? Apparently it has RS232, RS485 and some other connections available. Below I have a photo of the pinouts I've gathered up to now, but the pinout in yellow is incorrect as I tried it and it did not work. Would like to try it on a Voltronic inverter. Thanks
August 3, 20224 yr Hi Jopie Here is the information you are after, it is a standard rs232 ports 2 rx and 3 tx Power is on pins 5 0v , 9 +12v data seen using standard python print. 0103 0000 0001 840a seen many times before the next transmisions tx from dongle 0103 0000 0014 45c5 0103 003b 0029 f5d9 0103 0065 0010 5419 0103 0096 0010 a42a 0103 00a6 002d 65f4 0103 00a6 002d 65f4 0103 00a6 002d 65f4 0103 0014 0027 45d4 0103 0000 0001 840a 0103 0000 0001 840a 0103 0016 0003 e40f 0110 0016 0003 0616 0803 0f12 28d8 c401 1000 1600 0306 1608 030f 1228 d8c4 then that repeats. then on the other channel response from the mppt 0103 0200 0239 8500 0103 2800 0201 0000 0131 3931 3230 3130 3033 3100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 003e bb00 0103 5202 0000 2e00 0000 002b 5400 0000 0000 0000 0000 0000 0009 ac00 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0016 6200 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0064 8300 0103 2000 0000 0000 0000 0000 0000 0000 0000 0000 e600 0000 0000 0000 0000 0000 0000 00f4 3000 0103 2000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0092 7a00 0103 4e00 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0030 3000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0014 fe00 0103 0200 0239 8500 repeat.
August 8, 20224 yr Btw that is modbus the logger expects data to be in certain registers. so unless it lines up I think you are not going to have much success. You could create a proxy and that could work. It depends what you are trying to achieve. Python test script example to send command to serial port and print the response. import serial,os,sys import serial.tools.list_ports as port_list def crc16(data: str, poly: hex = 0xA001) -> str: ''' CRC-16 MODBUS HASHING ALGORITHM ''' crc = 0xFFFF for byte in data: crc ^= ord(byte) for _ in range(8): crc = ((crc >> 1) ^ poly if (crc & 0x0001) else crc >> 1) hv = hex(crc).upper()[2:] return crc def test(): ser = serial.Serial('/dev/tty????', baudrate='9600') request = [1, 0x3,0x0,0x00,0,0x10] ser.flush() chksum = crc16( "".join(map(chr,request))) chksumBytes = chksum.to_bytes(2,"little") data = [int(chksumBytes[0]),int(chksumBytes[1])] print (request+data) ser.write(request+data) c = ser.read(3) count =(c[-1]) loops = count/2 for x in range(0,int(loops)+1): c = ser.read(2) print (c.hex())
August 8, 20224 yr Hi sorry to gate crash your thread, but would it be possible to have a two way splitter from the inverter that connects to the logger as well as have a hard wire to a rasberry pi.
August 8, 20224 yr 24 minutes ago, Gerrie said: Hi sorry to gate crash your thread, but would it be possible to have a two way splitter from the inverter that connects to the logger as well as have a hard wire to a rasberry pi. RS232/serial is not "multidrop" - it's point-to-point Having said that, you may be able to create a man in the middle setup of even a hardware sniffer/spy cable for RS232. https://www.compuphase.com/electronics/rs232split.htm
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.