Sunsynk + Home Assistant

1. Only works with the old dongle.

2. Works cabled directly.

And no it doesn’t plug into Ethernet, it just uses RJ45 as an interface. It’s a serial connection.
Ok. I bought a usb to rs485 but wires exposed at the end. It's a victron 5m cable.

Is there a diagram for pins and colors?
 
Just an update. I made use of said cable above and crimped Orange, Yellow and Black to pins 1,2,3 on the RJ45.
I made use of KellerZa repo which worked straight away but with some timeout issues which i thought wasnt refreshing the data quick enough.

i added more sensors and did some tests and data seems to be coming quicker on MQTT now.

example of my KellerZa Sunsynk Yaml which i edited from the add-on:

YAML:
PORT: ""
DEVICE: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A10KD3ZH-if00-port0
DRIVER: umodbus
SUNSYNK_ID: "2209133222"
SENSOR_PREFIX: ""
SENSORS:
  - total_pv_power
  - total_battery_charge
  - total_battery_discharge
  - total_grid_export
  - total_grid_import
  - battery_soc
  - battery_temperature
  - grid_voltage
  - battery_power
  - inverter_power
  - load_power
  - grid_power
  - battery_voltage
  - overall_state
  - grid_connected_status
  - total_active_energy
  - total_pv_energy
  - rated_power
  - pv1_power
  - pv2_power
READ_SENSORS_BATCH_SIZE: 60
NUMBER_ENTITY_MODE: auto
PROFILES: []
MODBUS_SERVER_ID: 1
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: admin
MQTT_PASSWORD: <pwd>
DEBUG: 2
 

Attachments

  • Screenshot 2023-01-27 at 14.30.06.png
    Screenshot 2023-01-27 at 14.30.06.png
    62.2 KB · Views: 58
Hi to all, I wonder if someone could offer some advice please.

I purchased one of these units (https://www.robotics.org.za/USB-RS485-PL2303) from Micro Robotics on Monday, as they did not have stock of the one mentioned on KellerZA's GitHub page (https://www.robotics.org.za/W17286).

I crimped a RJ45 cable (based on the T568B standard), I then connected everything as follows:
LAN cable Pin 1 (white/orange stripe) to Pin 1 on the adaptor (TX- D-/B)
LAN cable Pin 2 (orange) to Pin 2 on the adaptor (TX+ D+/A)
LAN cable Pin 3 (white/green stripe) to Pin 5 on the adaptor (GND)

I connected the RJ45 side to my Sunsynk 8kW inverter's RS485 port, and the USB end to my Windows 11 Desktop.
Windows recognized the USB-to-RS485 adaptor and proceeded to install the driver (which is dated 2022/05), according to Windows 11 "This device is working properly".

I associated the RS485 USB adaptor with my "Home Assistant" VM running in VMware Workstation, and booted the VM.

I had already installed the "Modbus TCP to Modbus RTU Gateway Add-on", as well as the "Sunsynk Inverter Add-on", and configured everything (by following the relevant guides which to the best of my knowledge is correct).

After fiddling for several hours, and looking at the log file for ModBus, it doesn’t seem as though it is able to talk to/connect to the inverter via the RS485 port.

My intention with this setup (I am sure like most) is to pull load-shedding schedules from either Eskom or ESP, and using this information auto-configure my inverter by reading the current status of the battery/PV panels, and adjust the settings according to the load-shedding schedules.

I assume either the adaptor I bought from Micro Robotics is not going to work under Windows 11 using VMware Workstation, or I am maybe missing a crucial step in configuring one of the above add-ons correctly.

Any comments or advice would be most appreciated, thanks in advance.
 
Last edited:
Hi to all, I wonder if someone could offer some advice please.

I purchased one of these units (https://www.robotics.org.za/USB-RS485-PL2303) from Micro Robotics on Monday, as they did not have stock of the one mentioned on KellerZA's GitHub page (https://www.robotics.org.za/W17286).

I crimped a RJ45 cable (based on the T568B standard), I then connected everything as follows:
LAN cable Pin 1 (white/orange stripe) to Pin 1 on the adaptor (TX- D-/B)
LAN cable Pin 2 (orange) to Pin 2 on the adaptor (TX+ D+/A)
LAN cable Pin 3 (white/green stripe) to Pin 5 on the adaptor (GND)

I connected the RJ45 side to my Sunsynk 8kW inverter's RS485 port, and the USB end to my Windows 11 Desktop.
Windows recognized the USB-to-RS485 adaptor and proceeded to install the driver (which is dated 2022/05), according to Windows 11 "This device is working properly".

I associated the RS485 USB adaptor with my "Home Assistant" VM running in VMware Workstation, and booted the VM.

I had already installed the "Modbus TCP to Modbus RTU Gateway Add-on", as well as the "Sunsynk Inverter Add-on", and configured everything (by following the relevant guides which to the best of my knowledge is correct).

After fiddling for several hours, and looking at the log file for ModBus, it doesn’t seem as though it is able to talk to/connect to the inverter via the RS485 port.

My intention with this setup (I am sure like most) is to pull load-shedding schedules from either Eskom or ESP, and using this information auto-configure my inverter by reading the current status of the battery/PV panels, and adjust the settings according to the load-shedding schedules.

I assume either the adaptor I bought from Micro Robotics is not going to work under Windows 11 using VMware Workstation, or I am maybe missing a crucial step in configuring one of the above add-ons correctly.

Any comments or advice would be most appreciated, thanks in advance.
Just as a follow up to my post above, this is the error I am seeing in the "Sunsynk Inverter Add-on" log file:
------------------------------------------------------------------------------------------------------------
2023-02-01 17:31:54,065 ERROR Read Error: (1,3,5) [Errno 5] I/O error
2023-02-01 17:31:54,065 INFO ############################################################
2023-02-01 17:31:54,065 INFO No response on the Modbus interface, try checking the wiring to the Inverter, the USB-to-RS485 converter, etc
2023-02-01 17:31:54,065 INFO ############################################################
2023-02-01 17:31:54,065 CRITICAL This Add-On will terminate in 30 seconds, use the Supervisor Watchdog to restart automatically.
------------------------------------------------------------------------------------------------------------
 
Hi to all, I wonder if someone could offer some advice please.

I purchased one of these units (https://www.robotics.org.za/USB-RS485-PL2303) from Micro Robotics on Monday, as they did not have stock of the one mentioned on KellerZA's GitHub page (https://www.robotics.org.za/W17286).

I crimped a RJ45 cable (based on the T568B standard), I then connected everything as follows:
LAN cable Pin 1 (white/orange stripe) to Pin 1 on the adaptor (TX- D-/B)
LAN cable Pin 2 (orange) to Pin 2 on the adaptor (TX+ D+/A)
LAN cable Pin 3 (white/green stripe) to Pin 5 on the adaptor (GND)

I connected the RJ45 side to my Sunsynk 8kW inverter's RS485 port, and the USB end to my Windows 11 Desktop.
Windows recognized the USB-to-RS485 adaptor and proceeded to install the driver (which is dated 2022/05), according to Windows 11 "This device is working properly".

I associated the RS485 USB adaptor with my "Home Assistant" VM running in VMware Workstation, and booted the VM.

I had already installed the "Modbus TCP to Modbus RTU Gateway Add-on", as well as the "Sunsynk Inverter Add-on", and configured everything (by following the relevant guides which to the best of my knowledge is correct).

After fiddling for several hours, and looking at the log file for ModBus, it doesn’t seem as though it is able to talk to/connect to the inverter via the RS485 port.

My intention with this setup (I am sure like most) is to pull load-shedding schedules from either Eskom or ESP, and using this information auto-configure my inverter by reading the current status of the battery/PV panels, and adjust the settings according to the load-shedding schedules.

I assume either the adaptor I bought from Micro Robotics is not going to work under Windows 11 using VMware Workstation, or I am maybe missing a crucial step in configuring one of the above add-ons correctly.

Any comments or advice would be most appreciated, thanks in advance.
What dongle do you have? Isn't it easier just pulling the data from the dongle in to HA?
 
Hi to all, I wonder if someone could offer some advice please.

I purchased one of these units (https://www.robotics.org.za/USB-RS485-PL2303) from Micro Robotics on Monday, as they did not have stock of the one mentioned on KellerZA's GitHub page (https://www.robotics.org.za/W17286).

I crimped a RJ45 cable (based on the T568B standard), I then connected everything as follows:
LAN cable Pin 1 (white/orange stripe) to Pin 1 on the adaptor (TX- D-/B)
LAN cable Pin 2 (orange) to Pin 2 on the adaptor (TX+ D+/A)
LAN cable Pin 3 (white/green stripe) to Pin 5 on the adaptor (GND)

I connected the RJ45 side to my Sunsynk 8kW inverter's RS485 port, and the USB end to my Windows 11 Desktop.
Windows recognized the USB-to-RS485 adaptor and proceeded to install the driver (which is dated 2022/05), according to Windows 11 "This device is working properly".

I associated the RS485 USB adaptor with my "Home Assistant" VM running in VMware Workstation, and booted the VM.

I had already installed the "Modbus TCP to Modbus RTU Gateway Add-on", as well as the "Sunsynk Inverter Add-on", and configured everything (by following the relevant guides which to the best of my knowledge is correct).

After fiddling for several hours, and looking at the log file for ModBus, it doesn’t seem as though it is able to talk to/connect to the inverter via the RS485 port.

My intention with this setup (I am sure like most) is to pull load-shedding schedules from either Eskom or ESP, and using this information auto-configure my inverter by reading the current status of the battery/PV panels, and adjust the settings according to the load-shedding schedules.

I assume either the adaptor I bought from Micro Robotics is not going to work under Windows 11 using VMware Workstation, or I am maybe missing a crucial step in configuring one of the above add-ons correctly.

Any comments or advice would be most appreciated, thanks in advance.

Does any other USB device manage to talk to Home Assistant? Do you see it listed as a device inside Home Assistant at all?

If nothing else works either, problem is almost certainly VMWARE.

If other USB devices work, or you can at least see your cable connected in HA then it’s almost certainly a wiring problem.

Where’s a screenshot of the add-on configuration? The log almost seems to suggest the port isn’t configured at all.
 
Does any other USB device manage to talk to Home Assistant? Do you see it listed as a device inside Home Assistant at all?

If nothing else works either, problem is almost certainly VMWARE.

If other USB devices work, or you can at least see your cable connected in HA then it’s almost certainly a wiring problem.

Where’s a screenshot of the add-on configuration? The log almost seems to suggest the port isn’t configured at all.

Thanks all for the replies, here is the info from the Modbus log. I do find /dev/ttyUSB0 listed while viewing it from the console, so it is present when plugging in the USB adaptor.

ModBus Cannot Open Port.png
 
Does any other USB device manage to talk to Home Assistant? Do you see it listed as a device inside Home Assistant at all?

If nothing else works either, problem is almost certainly VMWARE.

If other USB devices work, or you can at least see your cable connected in HA then it’s almost certainly a wiring problem.

Where’s a screenshot of the add-on configuration? The log almost seems to suggest the port isn’t configured at all.
Here you can also see the USB adaptor listed under the hardware section of HA.
USB Adaptor Present.png
 
Thanks all for the replies, here is the info from the Modbus log. I do find /dev/ttyUSB0 listed while viewing it from the console, so it is present when plugging in the USB adaptor.

View attachment 1467993

Does it register as an FTDI adaptor or does it only show that a USB device exists?

1a650d26f4826bf5067f9c29203f964e.jpg
 
Hi there SauRoNZA, thank you for your reply message.

I am not quite sure how to get the adaptor to show up as a "FTDI" device in HA.

On VMware Workstation there is the option to allow VMware to take over control of the device from Windows, that is how you get it to "attach" to the VM, and at this point it disappears from "Device Manager" when doing so.

Furthermore, I am not sure how VMware "talks" to the USB-to-RS485" adaptor once I select this option, and if this has anything to do with how it appears within HA, there aren't many options within VMware that you can set on the USB device/port.

When I get home this evening, I am going to try a different Windows driver for the device, as I noticed that its description/name in "Device Manager" was as follows:
"PHASED OUT SINCE 2012. PLEASE CONTACT YOUR SUPPLIER."

I will keep you posted...
Thanks
 
Hi there SauRoNZA,

The chipset in my USB-to-RS485 adaptor is the Prolific (PL2303HXA) chipset, and not the FTDI (FT232R) one you have.

I came across this site which mentions some of the chipsets: https://www.miklor.com/COM/UV_Drivers.php

At this stage I am not sure where the issue lies, but as mentioned at the above site, it may point to a "cloned copy of the Prolific PL2303HXA chip".

I will continue testing and keep you posted.

BTW: I loaded the older Windows driver for the adaptor, and it now displays correctly in "Device Manager"

1675356269369.png

That doesn’t look right.

That just looks like the Virtual Server is reporting it’s controller to HA instead of the actual device plugged in.

It should show up as an FTDI adapter.

9186d67146e7ea5fe728893436b0f51d.jpg
 
Last edited:
Hi there SauRoNZA,

The chipset in my USB-to-RS485 adaptor is the Prolific (PL2303HXA) chipset, and not the FTDI (FT232R) one you have.

I came across this site which mentions some of the chipsets: https://www.miklor.com/COM/UV_Drivers.php

At this stage I am not sure where the issue lies, but as mentioned at the above site, it may point to a "cloned copy of the Prolific PL2303HXA chip".

I will continue testing and keep you posted.

BTW: I loaded the older Windows driver for the adaptor and it now displays correctly in "Device Manager"
View attachment 1468529View attachment 1468529

It all seems like a very bad idea to go completely off book doing your own thing in what is already a very niche customised add-on.

Could be the cable that is just completely wrong, could he VMware and USB passthrough.

Could be both.

Only way to test it would be to run HA natively in bare metal.
 
It all seems like a very bad idea to go completely off book doing your own thing in what is already a very niche customised add-on.

Could be the cable that is just completely wrong, could he VMware and USB passthrough.

Could be both.

Only way to test it would be to run HA natively in bare metal.
I agree...

What I am now going to do is install "Proxmox VE v7.3" on an "Apple Mac Mini" (2012 edition), and install "Home Assistant" on top of that.

Not sure how this is going to work out, but will tackle it over the weekend in the hope that what I believe is just maybe a clone USB-to-serial adaptor may just work under this setup.
 
I agree...

What I am now going to do is install "Proxmox VE v7.3" on an "Apple Mac Mini" (2012 edition), and install "Home Assistant" on top of that.

Not sure how this is going to work out, but will tackle it over the weekend in the hope that what I believe is just maybe a clone USB-to-serial adaptor may just work under this setup.
At the risk of repeating myself - what dongle do you have for the inverter and what are you wanting to do that can't be done through the dongle?
 
I agree...

What I am now going to do is install "Proxmox VE v7.3" on an "Apple Mac Mini" (2012 edition), and install "Home Assistant" on top of that.

Not sure how this is going to work out, but will tackle it over the weekend in the hope that what I believe is just maybe a clone USB-to-serial adaptor may just work under this setup.

Why do you want to virtualise if you have the spare hardware?

Just install Home Assistant natively and get it over with and spare yourself all the hassles.

Why didn’t you just buy the cable from Solar Assistant?
 
At the risk of repeating myself - what dongle do you have for the inverter and what are you wanting to do that can't be done through the dongle?

I would assume it’s the new Sunsynk dongle and therefore you can’t interface with it.
 
Why do you want to virtualise if you have the spare hardware?

Just install Home Assistant natively and get it over with and spare yourself all the hassles.

Why didn’t you just buy the cable from Solar Assistant?
Can you very briefly explain how to deploy HA directly or point me to a guide I can follow (please excuse my ignorance).

As for the cable, my inverter is installed in my garage, and my IT equipment is quite a distance from the inverter. I was hoping to run a long network cable.

The Sunsynk cable from Solar Assistant (https://solar-assistant.io/shop/products/sunsynk_rs485) as you know is only 1.5m in length.

I assume I would be able to use a female-to-female RJ45 connector to extend it with a made up LAN cable?

Thanks once again for all your help, much appreciated.
 
Top
Sign up to the MyBroadband newsletter
X