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.

My Sunsynk 8Kw & data collection setup

Featured Replies

  • Author
1 hour ago, fStof said:

Is there a way to check with a multimeter maybe if the inverter has the resistor already built in?

More than likely doesn't, I think the terminating resistor is built in on the Sunsynk's

 

  • Replies 657
  • Views 179k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • If you want to try this card in home assistant follow these steps. 1. Create a new directory under www/community/ and name it sunsynk-card. If you don't have HACS installed you can create directo

  • Hi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant: Required Hardware: ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-

  • Thought I would also contribute with something small. Not as impressive as what some of the others here but a contribution nonetheless. The GUI for Sunsynk System Mode, or lack thereof, has reall

Posted Images

1 hour ago, fStof said:

No I did not... 

Is that a thing? What is the purpose?

 

Yes its a thing. Measure the voltage across  A and B.  You should get around 4-5 volts. If not remove R7 as you dont need the terminating resistor

Edited by slipx

2 hours ago, slipx said:

Yes its a thing. Measure the voltage across  A and B.  You should get around 4-5 volts. If not remove R7 as you dont need the terminating resistor

Yea I get 4.5v across A and B on the Inverter side.

So the resistor is not the issue. 

Anything else I might be missing or need to check?

Shooting in the dark here but maybe try another LAN cable or even try using pin 4 for flow control

Why did you disable CRC?

uart:
  id: mod_bus
  tx_pin: 17
  rx_pin: 16
  baud_rate: 9600
  stop_bits: 1
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

modbus:
  id: modbus1
  uart_id: mod_bus
  flow_control_pin: 5
  disable_crc: true

 

26 minutes ago, slipx said:

Shooting in the dark here but maybe try another LAN cable or even try using pin 4 for flow control

Why did you disable CRC?

I actually just cut up one of the cables that came with one of my batteries... figured it would be good enough. I'll try another cable and feed back... Thanks

CRC is disabled because "Bad CRC" errors were flooding my logs

Before you go and do crazy things with wiring, try adding this to your ESP32 YAML config file:

esp32:
  board: esp32dev
  framework:
    type: arduino
    version: 2.0.6

Later versions of the library broke something in the RS485 support, and forcing using version 2.0.6 resolved this for me.  (Before mine did exactly the same as yours.)

4 hours ago, slipx said:

Shooting in the dark here but maybe try another LAN cable or even try using pin 4 for flow control

Tried pin 4 with no change (well I got the warning in logs during compile: "WARNING GPIO4 is a Strapping PIN and should be avoided.")

3 hours ago, sgs said:

Before you go and do crazy things with wiring, try adding this to your ESP32 YAML config file:

 

Later versions of the library broke something in the RS485 support, and forcing using version 2.0.6 resolved this for me.  (Before mine did exactly the same as yours.)

Also no difference

So now I tried with a different cable (CAT6 - Unshielded) and still no difference... values are all over the place

Anything else I could try? Would a shielded cable make any difference?

I'm running out of options here. Very frustrating.

5 minutes ago, fStof said:

So now I tried with a different cable (CAT6 - Unshielded) and still no difference... values are all over the place

Anything else I could try? Would a shielded cable make any difference?

I'm running out of options here. Very frustrating.

Haven't read through the problems you're experiencing, but in specific reply to this one post: when extending a temperature sensor (15m) I got erratic readings until I installed a shielded cable - after that readings have been perfect...

Shielding goes a long way protect from electromagnetic interference...

5 hours ago, markus_m2 said:

Haven't read through the problems you're experiencing, but in specific reply to this one post: when extending a temperature sensor (15m) I got erratic readings until I installed a shielded cable - after that readings have been perfect...

Shielding goes a long way protect from electromagnetic interference...

We'll mine is like 30cm 

@fStof where are you based? I have a spare RS485 ttl adapter you can try.

I know you said your voltage across A/B pins was fine but maybe try remove the r7 resistor and see what happens. 

4 hours ago, slipx said:

@fStof where are you based? I have a spare RS485 ttl adapter you can try.

I know you said your voltage across A/B pins was fine but maybe try remove the r7 resistor and see what happens. 

I'm in Pretoria East area... 

I guess I don't have many other options

Thanks

  • 2 weeks later...

Firstly, many thanks for the incredible community contributions! Without them, I'd be watching Netflix a lot more!

Secondly, I'm really struggling getting the data out my SS8 and have spent a full day exploring all configurations. I've taken primary guidance from this YouTube video and mange to get up to the point of flashing the ESP32 with the yaml however it looks like I'm not getting any data back:

image.png.e47a1962d63bd07b134eb5d858fbad17.png

My setup:

  • RaspberryPI 3b
  • HomeAssistant version 2023.6.3
  • ESPHome installed
  • Sunsynk 8kva (set to Slave)
  • Removed R7 resistor

I have tried the following setups:

Setup 1

  • substitutions:
      settings_skipped_updates: "30"
      devicename: sunsynk
    
    esphome:
      name: esphome-web-d3def0
      
    esp32:
      board: esp32dev
      framework:
        type: arduino
    
    # Enable logging
    logger:
      baud_rate: 0
    
    # Enable Home Assistant API
    api:
    #  encryption:
    #    key: !secret api_encryption_key
    
    ota:
    #  password: !secret ota_password
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    
      # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
        ssid: !secret device_onboard_wifi
        password: !secret fallback_password
    
      fast_connect: true
      power_save_mode: none
    
    captive_portal:
    
    # Enable time component to reset energy at midnight
    # https://esphome.io/components/time.html#home-assistant-time-source
    time:
      - platform: homeassistant
        id: homeassistant_time
         
    uart:
      id: mod_bus
      tx_pin: 17 
    #  Also tried value 'GPIO17'
      rx_pin: 16
    #  Also tried value 'GPIO16'
      baud_rate: 9600
      stop_bits: 1
     
    modbus:
      id: sunsynk_modbus
      flow_control_pin: 4
    #  Also tried value 'GPIO4'
     
    modbus_controller:
      - id: sunsynk
        address: 0x01
        modbus_id: sunsynk_modbus
        setup_priority: -10
        update_interval: "15s"
        command_throttle: "50ms"
    
    <cropped>

    Pic of the above setup...

  • image.thumb.jpeg.6ddd331548131c60c2fad68561aca038.jpeg

  • And also tried network cable numbers 2 and 7 (Green & Orange stripe) into A and 1 and 8 (Orange & Green stripe) ->B

Setup 2

  •  
    esphome:
      name: esphome-web-868580
      friendly_name: ESPHome Web 868580
    
    esp32:
      board: esp32dev
      framework:
        type: arduino
    
    substitutions:
      settings_skipped_updates: "30"
      devicename: sunsynk
    
    # Enable logging
    logger:
      baud_rate: 0
    
    # Enable Home Assistant API
    api:
      encryption:
        key: "zgG8S4ludLRSOV8+CSsiqbU+nQ5Q+bQNJIjrXFzwedk="
    
    ota:
    
    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
    
      # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
        ssid: !secret device_onboard_wifi2
        password: !secret fallback_password2
    
      fast_connect: true
      power_save_mode: none
    
    captive_portal:
    
    # Enable time component to reset energy at midnight
    # https://esphome.io/components/time.html#home-assistant-time-source
    time:
      - platform: homeassistant
        id: homeassistant_time
         
    uart:
      id: mod_bus
      tx_pin: 1
      rx_pin: 3
      baud_rate: 9600
      stop_bits: 1
     
    modbus:
      id: sunsynk_modbus
      flow_control_pin: 4
     
    modbus_controller:
      - id: sunsynk
        address: 0x01
        modbus_id: sunsynk_modbus
        setup_priority: -10
        update_interval: "15s"
        command_throttle: "50ms"
    
    <cropped>

     

  • Pic of the above
    image.thumb.jpeg.5228eab52655e9ad02570d5c10d16a74.jpeg

 

Anyone got any further ideas for me? I've tried a second RS485 board, and built a second network cable.. no luck..

TIA!

  • Author

So your ESP 32 is alive and looks like it is trying to connect. 

2 things to check out. 

You also only need to use one of the pairs, i.e Orange/White & Orange or Brown/White & Brown, not necessary to connect both pairs.

On setup 2 I would also check that you are connecting using the correct pins on the ESP32. 

GPIO 1 & GPIO 3  are pin 4 & 5 from the top on the RHS, it looks like you are connecting to pins, 3 & 4 from the photo.

image.png.d01fa649af43ab0e890a5120936d85d0.png

 

13 hours ago, slipx said:

2 and 7 to A

1 and 8 to B

This worked, and for both of my setups! I'm so happy and relieved, thank you! I'm going to make some comments on Sc00bs youtube video to help the next person along, as a bit more explaining is needed in a couple of areas.

For the next person: Add the Orange (2) and Brown strip  (7) to A..... and Orange stripe (1) and Brown (8) to B  

Edited by Gooseza

  • Author

Thanks @jacauc

You are 100% correct, sry for the wrong pinout. I would check the connections are correct for the ESP32 you have in any case as the problem seems to be between the ESP32 and the Inverter.

Would swop the Orange/White & Orange cables around and see if that works. 

To me the "no response received" from the modbus requests would probably indicate a problem between the RS485-Inverter connection but I could be wrong.  

So either from the ESP32 - RS485 board connection or the connection between the RS485 board and the inverter.  

  • Author
2 hours ago, Gooseza said:

This worked, and for both of my setups! I'm so happy and relieved, thank you! I'm going to make some comments on Sc00bs youtube video to help the next person along, as a bit more explaining is needed in a couple of areas.

For the next person: Add the Orange (2) and Brown strip  (7) to A..... and Orange stripe (1) and Brown (8) to B  

Glad you got sorted @Gooseza 🙂 

  • 3 weeks later...

Thanks 

It is working well 

I got the new USB-C esp-32dev and it is working.(https://www.robotics.org.za/ESP32-DEV-CH340-C)

I tested the Ethernet cable before installing it and it worked well on the pin 1 & 2 after installation it was not working any more so I used pin 7 & 8 

Modbus Poll works well to do fault finding on RS485/Modbus RTU or even Modbus TCP

On 2023/05/29 at 4:43 PM, kellerza said:

It would make life easier!

One easy change I can think of would be to change _power_kwh, to _energy. I also made this mistake in one of the erlier editions of the addon and since updated & deprecated the old names

https://github.com/kellerza/sunsynk/blob/main/sunsynk/definitions.py#L318

It is a bit painful, since you lose your Energy stats 

Thanks. I've just updated my ESPHome config to align with those definitions. 

https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/main/ESPHome-8K-Sunsynk.yaml

 

  • 2 weeks later...

I am rather fed-up with the constant updates on Home Assistant that keeps on crashing my system on a RPI4. The main reason for my installing HA was for the inverter monitoring. If it is not mqtt needing fine tuning, then the system stops reading from the RS485 until I reinsert the usb again.

I decided to go back to basics and only using node red as an all-in-one service, including dashboard. It backs up to local emoncms and influxdb if I want to dig up history. (it has not crashed once on node-red...yet.)

 

Screenshot from 2023-07-24 16-19-55.png

15 minutes ago, GVC said:

I am rather fed-up with the constant updates on Home Assistant that keeps on crashing my system on a RPI4. The main reason for my installing HA was for the inverter monitoring. If it is not mqtt needing fine tuning, then the system stops reading from the RS485 until I reinsert the usb again.

I decided to go back to basics and only using node red as an all-in-one service, including dashboard. It backs up to local emoncms and influxdb if I want to dig up history. (it has not crashed once on node-red...yet.)

 

Screenshot from 2023-07-24 16-19-55.png

Half of the issues with an unstable HASS OS is probably storage related, the other half a flakey power supply.

Standard install & standard MQTT here. I have the official Pi PSU with external SSD storage. Without proper storage, any solution writing loads of stats to the SD card will be doomed in the long run.

I also use an external ssd drive with the original raspberry power supply. To be fair it did not crash on every update. It started about 2 months ago after an update where the rs485 would lose comms once a day. Thereafter, after an update about 3 weeks ago, it lost the mqtt connection. I read on the ha forum where several people had the same issue.

It is probably not a major issue, but I do not have the time to spend on this and rather opted to return to my tried and tested systems.

Edited by GVC

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.