Getting data from inverters via an RS485 connection

True, it’s not shown, but it’s an 8-bit app. It’s working like a champ on my WattNode as I write this and the WattNode uses 8-bit comms.

Could be many different things, adapter is bad, inverter doesn’t like it, no GND, etc
Will try and get modbus documentation from Solis (if they have any) but doubt that will help since I can’t get any data back

Did you try the holding registers?
Usually RS-485 works with just 2 wires, but you may indeed need a ground.

Yup no change with holding registers or changing the start from 0 to 1.
Well this adapter doesn’t have gnd on it so cannot try it.
Might try ordering the 3 pin one and see if it works, thanks for the help :slight_smile:

OK that app should work - there are no significant changes in the inverter registers from 4G to 5G

So go back to basics here

(i have not used that app but looks fairly straight forward)

You should be looking at holding registers.

Based on this document

Solis 3phase 4G Modbus registers.pdf (505.0 KB)

Show us some pics of the Rpi, RS485 adapter up close with wiring etc and how you have connected it to the inverter

Craig

Here’s a way to do the same thing via puTTY, without pageant:

https://www.oueta.com/windows-third-party/ssh-auto-login-with-putty-from-windows/

1 Like

So on the rpi I had it connected to A/B and then one of the ground pins on the GPIO


This new adapter just came in today and I will try it out shortly, wired it like so:


Will report back once I get it tested.

No change with this new adapter either. Tried multiple USB ports on the windows laptop and the pi also. I can see the tx/rx LEDs flash so data is being sent but no idea what to enter in the app address to test, even before entering anything the errors are just going up.


Also installed python and ran it via VS Code and still never get anything back

MinimalModbus debug mode. Create serial port COM8
here 0
MinimalModbus debug mode. Will write to instrument (expecting 9 bytes back): '\x01\x04\x0b¼\x00\x02²\x0b' (01 04 0B BC 00 02 B2 0B)
MinimalModbus debug mode. Clearing serial buffers for port COM8
MinimalModbus debug mode. No sleep required before write. Time since previous read: 287031937.00 ms, minimum silent period: 4.01 ms.
MinimalModbus debug mode. Response from instrument: '\x01\x84\x02ÂÁ' (01 84 02 C2 C1) (5 bytes), roundtrip time: 297.0 ms. Timeout for reading: 200.0 ms.

I am about 95% sure the code is just wrong because x02 means illegal data address, in relation to requests according to that pdf file with the registers, anyone know the correct values I can try?

FW of inverter is 330022, how about you @craigcurtin maybe they changed all the registers?

I took 3021 from the Python code in one of your posts earlier in this thread.

According to the 4G doc Craig attached to his post, register 3021 is reserved.
That’s in line with the illegal address error you’re seeing.

That same doc says register 3043 holds the mains frequnecy value.
Give it a try with 3043 in the address “box.” Given the -1 offset, and depending on the program’s
“start from 0 / start from one” setting, you may need to use 3042 vice 3043.

Will do and how about length and display options as above? 10 and Integer?
Also as soon as I hit the connect the button the Polls and Errors numbers keep going up, not sure if that’s right.
I tried a few of these from the code but none worked (from python)

Realtime_DCV = instrument.read_register(3021, numberOfDecimals=0, functioncode=4, signed=False) #Read DC Volts as Unsigned 16-Bit
	Realtime_DCI = instrument.read_register(3022, numberOfDecimals=0, functioncode=4, signed=False) #Read DC Current as Unsigned 16-Bit
	Realtime_ACV = instrument.read_register(3035, numberOfDecimals=0, functioncode=4, signed=False) #Read AC Volts as Unsigned 16-Bit
	Realtime_ACI = instrument.read_register(3038, numberOfDecimals=0, functioncode=4, signed=False) #Read AC Current as Unsigned 16-Bit
	Realtime_ACF = instrument.read_register(3042, numberOfDecimals=0, functioncode=4, signed=False) #Read AC Frequency as Unsigned 16-Bit

The doc says that particular register is an Input register, so change the value in the dropdown menu to input register vice holding register. It also says the offset is -1.
e.g. if the register address is 3043, you specify 3042 in the app.
The app has a setting that can do that. (start from 0 / start from 1)
I’d start with the length set to 2.
The doc says the data type is uint16, so the Integer bullet is the correct choice.

Nothing but errors as soon as I hit connect, before I even input anything in the other fields


Really doubt that 3 different adapters can be incompatible, this still feels like software problem.

Same result with 3043 in the address box?

Correct

The screenshot shows holding registers. Did you try it with Input registers selected?

One other thing to try is to prepend a 3 to the address. i.e. try 33043 in the address box.

I think you were right with the 3 in front:


So that looks like some legit data at least, and the errors stopped, next is to try and update the python to also pull data

Did you try adding a 3 to the address? e.g. 33043 vice 3043.

Yup see above and it got some data

Looks like that was the problem. Now you’ve got something to work with.

What do you get with address 33043?