Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

RS485 to PI cable confusion

Featured Replies

Hello, I'm very new to solar and home automation. I've got a SunSynk 8kw inverter, 1 SunSynk battery attached and a SunSynk wireless dongle.

I want to set up a connection from the inverter to a Raspberry PI to run home assistant.

I've done a lot of reading, but seem to be missing something. The RS485 Port  on my SunSynk system appears to be Ethernet:

20221001_0948222.jpg.b0e73e9575de991ab9ab9b689caccef1.jpg


I'm stuck on where i connet to the inverter to the Raspberry PI.
I've found cables like these: https://amzn.eu/d/aXz53Cn which appear at least to have the right Ethernet connector.
I'm failing to see how the cables/suggestions i see like this https://amzn.eu/d/ab1Nvkw would connect into the inverter without additional steps.
Is an additional cable required to run from the USB attached cables into the inverter? If so what is the cable and can they be purchased?


Is someone able to point me in the right direction? 

Thanks!

The 1st adapter you linked should do the trick.
Make sure to use the (BMS 485) port the bottom right one usually does not work nicely, from my testing anyway.

That second one you linked to is real el-cheepo one I tried three of them and all 3 failed to work reliably.

On 2022/10/02 at 10:49 AM, ASN said:

I'm stuck on where i connet to the inverter to the Raspberry PI.

Yes it the plug is RJ45(some people might refer to it as ethernet but you can use the plug for many things), the wires still carry a RS485 signal. A chip like the MC2551 can decode the signal and give you the modbus request/response. Most of the USB-RS485 converters contain this chip or another that will perform the same function.

It might be much quicker to buy locally

https://www.robotics.org.za/index.php?route=product/product&product_id=5947&search=rs48

 

Look at the documentation of the homeassistant plugin, described in detail

https://github.com/kellerza/sunsynk

 

Edited by iiznh

  • Author

Hi,
Thanks for the quick responses:
 

Quote

It might be much quicker to buy locally

https://www.robotics.org.za/index.php?route=product/product&product_id=5947&search=rs48

 

Look at the documentation of the homeassistant plugin, described in detail

https://github.com/kellerza/sunsynk


Yes i've read this aad again the steps that connect the ethernet port seem glossed-over.
I believe you need to wire that yourself? This is the bit that appears to be taken for granted, you've linked a device that clearly isn't an rj45 connection.

Quote

The 1st adapter you linked should do the trick.
Make sure to use the (BMS 485) port the bottom right one usually does not work nicely, from my testing anyway.

Since this cable actually has the RJ45 connector to USB it feels like this has done the work of re-wiring an RJ45 connector to the expected in/out of the inverter.
I'll start buying things and trying to connect them.

I think the confusion stems from the devices that are clearly not RJ45 connectors?
 

4 hours ago, ASN said:

Since this cable actually has the RJ45 connector to USB it feels like this has done the work of re-wiring an RJ45 connector to the expected in/out of the inverter.

Each inverter is different and connects to different pins, you might end up buying a ethernet cable and cutting off the end to connect it to your Can485-USB converter.

I have a working cable, if anything is not clear then ask. Not sure what is not clear about RJ45. The sunsync could have used dupont or jst connectors and achieved the same result. You still need to connect the correct pins to RX,TX and GROUND

  • Author

Yes thanks got the cable and as expected i've got timeout errors so it it likely is wired incorrectly? 

I apreciate it's clear to a lot of people in this thread: 

and here: https://pypi.org/project/sunsynk/ but not to me.
This forum post suggest sunsynk uses pin 7 and 8: https://energytalk.co.za/t/sunsynk-pylontech-rs485/988
The cable i have uses pin 4 and 5.

This post: https://www.sunsynk.org/forum/techical-support/use-of-eastron-modbus-meter-instead-of-ct/dl-0db695ea-c6a4-4dbe-9a9a-5d391bb5f0ad?postId=62978bce4a9e110012c0ce86&searchTerm=rs485 suggests from the word document that pins 4 and 5 are right, so the timeout error im getting is a configuration issue.
I continue to dig. I'm currently using Modbus poll on windows 10 as i'm waiting for a raspberry PI to arrive  to install home assistant.
Although the cable *may* be correct, the timeout error suggest otherwise, though it does say "could be cause by wiring or configuration" which as error descriptions go isn't that helpful.

Edited by ASN

  • Author

OK, So i'm getting write errors, so step forward from before.
Mapping values in modbus has my mind blown, if anyone has done this any help would be greatly appreciated. I think the Raspberry Pi repo has this done already so it's "almost" plug and play but modbus poll for windows not so much!

I've attached a reference file but can't see how this maps in modbus poll: https://www.modbustools.com/modbus_poll.html

I'll keep reading.

sunsynk_modbus - no chinese.docx

@ASN

So I'm retrieving values from the USB-RS485 adapter with Nodered(Linux). You can basically use any computer/OS/Software but I think the linux drivers just work out the box, no need to install anything. Modbus is a standard, send command, receive answer, check crc & decode bytes in answer to get data. Inverter needs to be Slave and have a modbus ID. There are several libraries in JavaScript(NodeRed), Python, C++ etc available to do modbus. It should be a simple as calling a function and decoding the answer.

Windows you might need to install a driver before the RS485 adapter might work or show up on a com port, I do not use it so sorry cannot help.

Pin 1,2,3 connected to B A and ground

Edited by iiznh

  • Author

Thanks for the input.
To avoid confusion creating the cable i opted to remove the wireless dongle from the inverter and connect a cable via the rs232.
I have a realtime connection now using home-assistant.
Because this is a managed plant i want to reconnect the wifi dongle at some point so i'm going to buy some equipment for creating the cable. I'll keep you posted on progress switching from rs232 to rs485.
Slowly but surely getting there! 
 

  • Author

I decided in the end to chop up an Ehternet cable as originally suggested, wired into the pins as suggested.
Easily done, and immediately picked up in home-assistant.
This stepped is glossed over (arguably because it's so easy in reality).
The steps are:
1 - cut end off ethernet cable

2 - strip wires on pin 1/2/3

3 - connect wires to modbus serial usb converter

I think a lot of the issues/posts i see in other threads relate to not knowing if the home-assistant is ready to collect the data, and therefore it could be eiter cable/software config/converter.
For me, starting with a cable guaranteed to work meant it was just plug and play.

  • 1 year later...
On 2022/10/16 at 3:42 PM, ASN said:

I decided in the end to chop up an Ehternet cable as originally suggested, wired into the pins as suggested.
Easily done, and immediately picked up in home-assistant.
This stepped is glossed over (arguably because it's so easy in reality).
The steps are:
1 - cut end off ethernet cable

2 - strip wires on pin 1/2/3

3 - connect wires to modbus serial usb converter

I think a lot of the issues/posts i see in other threads relate to not knowing if the home-assistant is ready to collect the data, and therefore it could be eiter cable/software config/converter.
For me, starting with a cable guaranteed to work meant it was just plug and play.

 

Thanks this is super helpful, I'm in the same boat as you. So if I just get a generic CAT5 cable with a RJ45 on one end, that'll go into the Sunsynk, but I'm not sure what pin 1, 2 and 3 are. The CAT5 cable I got is wired according to T568A, so what wires go to B/D and GND?

Any idea?

 

https://kellerza.github.io/sunsynk/guide/wiring#rs485-wiring

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.