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.

ESP32 & RS485 connection to Home Assistant

Featured Replies

Hi Guys

Please can you help with a couple of questions concerning using the ESP32 Dev ( Slipx06) board to get your data?

1. After Loading ESP32 with Esphome , do you upload the Slipx06 ESPHome-8K-Sunsdynk.yaml file onto the ESP32 or do you add the file to your Home Assistant under the Config ?

2. I watched the youtube video but not clearly explained concerning the files etc. Nothing about Adopt the device etc.  Nothing concerning about files and if they get uploaded or added to the configuration file.

3. This is my Log File:

NFO ESPHome 2023.6.2
INFO Reading configuration /config/esphome/esphome-web-cf06a0.yaml...
INFO Starting log output from esphome-web-cf06a0.local using esphome API
INFO Successfully connected to esphome-web-cf06a0.local
[19:32:09][I][app:102]: ESPHome version 2023.6.2 compiled on Jun 27 2023, 14:47:39
[19:32:09][C][wifi:543]: WiFi:
[19:32:09][C][wifi:379]:   Local MAC: C0:49:EF:CF:06:A0
[19:32:09][C][wifi:380]:   SSID: '****'[redacted]
[19:32:09][C][wifi:381]:   IP Address: 192.168.******
[19:32:09][C][wifi:383]:   BSSID: EC:AD:E0:4E:04:A4[redacted]
[19:32:09][C][wifi:384]:   Hostname: 'esphome-web-cf06a0'
[19:32:09][C][wifi:386]:   Signal strength: -55 dB ▂▄▆█
[19:32:09][C][wifi:390]:   Channel: 1
[19:32:09][C][wifi:391]:   Subnet: 255.255.255.0
[19:32:09][C][wifi:392]:   Gateway: 192.********
[19:32:09][C][wifi:393]:   DNS1: 192.************
[19:32:09][C][wifi:394]:   DNS2: 0.0.0.0
[19:32:09][C][logger:301]: Logger:
[19:32:09][C][logger:302]:   Level: DEBUG
[19:32:09][C][logger:303]:   Log Baud Rate: 115200
[19:32:09][C][logger:305]:   Hardware UART: UART0
[19:32:09][C][captive_portal:088]: Captive Portal:
[19:32:09][C][mdns:108]: mDNS:
[19:32:09][C][mdns:109]:   Hostname: esphome-web-cf06a0
[19:32:09][C][ota:093]: Over-The-Air Updates:
[19:32:09][C][ota:094]:   Address: esphome-web-cf06a0.local:3232
[19:32:09][C][api:138]: API Server:
[19:32:09][C][api:139]:   Address: esphome-web-cf06a0.local:6053
[19:32:09][C][api:141]:   Using noise encryption: YES

This is all I get when I view the log, 

 

Thanks

 

  • Author

Hi

This is what I am getting now :

 

NFO ESPHome 2023.6.2
INFO Reading configuration /config/esphome/esphome-web-cf06a0.yaml...
INFO Detected timezone 'Africa/Johannesburg'
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
Failed config

sensor.modbus_controller: [source /config/esphome/esphome-web-cf06a0.yaml:65]
  platform: modbus_controller
  modbus_controller_id: sunsynk
  name: Firmware Control Board
  id: sunsynk_esphome_firmware_control_board
  register_type: holding
  
  Expected integer, but cannot parse ${settings_skipped_updates} as an integer.
  skip_updates: ${settings_skipped_updates}
  address: 13
sensor.modbus_controller: [source /config/esphome/esphome-web-cf06a0.yaml:73]
  platform: modbus_controller
  modbus_controller_id: sunsynk
  name: Firmware Comms Board
  id: sunsynk_esphome_firmware_comms_board
  register_type: holding
  

 

I see others using GPO4 as the flow control 

  • Author

I add this :

 

substitutions:
  settings_skipped_updates: "30"
  devicename: sunsynk

and now only get this

 

INFO ESPHome 2023.6.2
INFO Reading configuration /config/esphome/esphome-web-cf06a0.yaml...
INFO Detected timezone 'Africa/Johannesburg'
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from esphome-web-cf06a0.local using esphome API
INFO Successfully connected to esphome-web-cf06a0.local
[22:18:33][I][app:102]: ESPHome version 2023.6.2 compiled on Jun 27 2023, 14:47:39
[22:18:33][C][wifi:543]: WiFi:
[22:18:33][C][wifi:379]:   Local MAC: C0:49:EF:CF:06:A0
[22:18:33][C][wifi:380]:   SSID: 'ASUS1'[redacted]
[22:18:33][C][wifi:381]:   IP Address: 192.168.0.171
[22:18:33][C][wifi:383]:   BSSID: EC:AD:E0:4E:04:A4[redacted]
[22:18:33][C][wifi:384]:   Hostname: 'esphome-web-cf06a0'
[22:18:33][C][wifi:386]:   Signal strength: -52 dB ▂▄▆█
[22:18:33][C][wifi:390]:   Channel: 1
[22:18:33][C][wifi:391]:   Subnet: 255.255.255.0
[22:18:33][C][wifi:392]:   Gateway: 192.168.0.1
[22:18:33][C][wifi:393]:   DNS1: 192.168.0.1
[22:18:33][C][wifi:394]:   DNS2: 0.0.0.0
[22:18:33][C][logger:301]: Logger:
[22:18:33][C][logger:302]:   Level: DEBUG
[22:18:33][C][logger:303]:   Log Baud Rate: 115200
[22:18:33][C][logger:305]:   Hardware UART: UART0
[22:18:33][C][captive_portal:088]: Captive Portal:
[22:18:33][C][mdns:108]: mDNS:
[22:18:33][C][mdns:109]:   Hostname: esphome-web-cf06a0
[22:18:33][C][ota:093]: Over-The-Air Updates:
[22:18:33][C][ota:094]:   Address: esphome-web-cf06a0.local:3232
[22:18:33][C][api:138]: API Server:
[22:18:33][C][api:139]:   Address: esphome-web-cf06a0.local:6053
[22:18:33][C][api:141]:   Using noise encryption: YES

  • Author

Hi

I eventually got to this :

 

what error is this :  Modbus CRC Check failed! C071!=00

 

INFO ESPHome 2023.6.2
INFO Reading configuration /config/esphome/esphome-web-cf06a0.yaml...
INFO Detected timezone 'Africa/Johannesburg'
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from esphome-web-cf06a0.local using esphome API
INFO Successfully connected to esphome-web-cf06a0.local
[23:27:55][I][app:102]: ESPHome version 2023.6.2 compiled on Jun 27 2023, 23:14:24
[23:27:55][C][wifi:543]: WiFi:
[23:27:55][C][wifi:379]:   Local MAC: C0:49:EF:CF:06:A0
[23:27:55][C][wifi:380]:   SSID: 'ASUS1'[redacted]
[23:27:55][C][wifi:381]:   IP Address: 192.168.0.171
[23:27:55][C][wifi:383]:   BSSID: EC:AD:E0:4E:04:A4[redacted]
[23:27:55][C][wifi:384]:   Hostname: 'esphome-web-cf06a0'
[23:27:55][C][wifi:386]:   Signal strength: -62 dB ▂▄▆█
[23:27:55][C][wifi:390]:   Channel: 1
[23:27:55][C][wifi:391]:   Subnet: 255.255.255.0
[23:27:55][C][wifi:392]:   Gateway: 192.168.0.1
[23:27:55][C][wifi:393]:   DNS1: 192.168.0.1
[23:27:55][C][wifi:394]:   DNS2: 0.0.0.0
[23:27:55][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][C][logger:303]:   Log Baud Rate: 115200
[23:27:56][C][logger:305]:   Hardware UART: UART0
[23:27:56][D][sensor:094]: 'SS Essential Power 1': Sending state nan W with 0 decimals of accuracy
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][C][uart.arduino_esp32:124]: UART Bus 1:
[23:27:56][C][uart.arduino_esp32:131]:   Data Bits: 8
[23:27:56][C][uart.arduino_esp32:133]:   Stop bits: 1
[23:27:56][C][modbus:143]: Modbus:
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][C][template.sensor:022]:   State Class: 'measurement'
[23:27:56][C][template.sensor:022]: Template Sensor 'SS Essential Power'
[23:27:56][C][template.sensor:022]:   Device Class: 'power'
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:56][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][C][template.sensor:022]: Template Sensor 'SS Essential Power 1'
[23:27:57][C][template.sensor:022]:   Device Class: 'power'
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00
[23:27:57][W][modbus:108]: Modbus CRC Check failed! C071!=00

 

 

Last time I got CRC errors was when to 2 wires got too hot from the solder and kinda melted together, but some of the values were actually coming through.

I cut of the wire and  soldered again and my issue was gone.

I see plenty people are removing their terminating resistor between A and B, that has never been the case for me. Usually when I get errors this shows me something has poor contact. 

All I can say is that it is normal to struggle a bit. I once spent a whole afternoon de-soldering(and burning my finger) and testing, scratching my head, re-doing... and it turned out that the RS485 module was actually dead. I started measuring resistance over the various points and compared with a working module. I also noticed later that the little red light was not lit

Thus far 1 out of the 14 I ordered was dead. Good luck

Edited by iiznh

  • Author

I have a extra board, I try that one and will not remove the  resistor as shown in the video. I am using the those small female plugs. I try rather solder the wires and see if that makes a difference.  Thanks for the advice

  • Author

@iiznhCan you tell me why am I get a warning when using GPO 04 ? ( WARNING GPIO4 is a Strapping PIN and should be avoided. ) ?

Is this normal etc , everyone else is using it 

 

Thanks

@Vaughanza

GPIO4 is used while the processor boots up, if you pulled it high/low (cannot remember which but I think it was low) the processor will fail to boot.

Been there done that, thought I killed my board. Unsoldered the pulldown resistor and hey presto the ESP started booting again, I think it was during my smart relay build that I used to dump excess power into the geyser

It is normal to get a warning message. It is just a warning

In your case you are using it for flow control only after the bootup finished so it does not matter.

Maybe post a photo of your module.

I also battled initially, that is precisely the reason why I built a ready made module for Deye inverters. People want to focus on making their homes smart, not on soldering and studying the specsheet of espressif processors

Edited by iiznh

  • Author

@iiznh I have managed to get Data from the Sunsynk 8k inverter but the reading says Unknown with all the sensors.

The sensor name comes up etc but the actual reading of the sensor says Unknowm,

What am I doing wrong or setting 

Thanks

15 minutes ago, Vaughanza said:

The sensor name comes up etc but the actual reading of the sensor says Unknown

The only time when I see unknown is when I am flashing a new version remotely and rebooting the module (effectively it stops communication and drops off the network) once it is rebooted and joins the network again it takes a few seconds and all values are showing again. Try pinging the IP to makes sure it does not drop off the network from time to time (I think I solved this by disabling power save mode)

  • Author

Thanks to everyone for the help, eventually found the problem. 

Had to connect 2 and 7 ( rj45 wires ) to A & 1 and 8 ( RJ 45 ) to B. 

As soon as I did this, data came through. In the video it does not say anything about connecting 2 pairs .

 

Thanks again and particular @iiznh , appreciate it.

 

@Vaughanza Great!  Glad to hear. 

With your inverter now part of your smart home you will hopefully give less business to Eskom and gaining better return on investment on your solar system!

 

How many hours would you say you spent on getting this ESP32 project from discovery to getting values showing up? Just as a reference for other people?

It probably took me a good 2 days to get my esp32 module working even though I already read all the threads on the topic (incl the time I was looking and trying to understand which parts would be the best and what the differences are between them)

 

My journey over many months:

  • I started with the node red flows that I ran for quite a while on a Pi Zero (but it was going offline frequently due to the pi zero dropping off wifi)
  • Installed a wired access point close by with strong wifi, but the pi zero was still not happy 
  • Then moved my home assistant server (running on raspberry pi 4) to the inverter and installed the kellerza plugin (still had network issues, home assistant does not like to run over wifi, you need a wired network point, at least the plugin worked brilliantly)
  • I tried the esp32 route and for the first time my setup was stable, had 0 disconnections and everything finally worked the way it should. (Rasp Pi moved back to router) 
  • I moved my home assistant to a VM on my home server because I integrated my cameras with Frigate (and automated my security) and needed something with better storage for video footage

 

 

 

10 hours ago, Vaughanza said:

Thanks to everyone for the help, eventually found the problem. 

Had to connect 2 and 7 ( rj45 wires ) to A & 1 and 8 ( RJ 45 ) to B. 

As soon as I did this, data came through. In the video it does not say anything about connecting 2 pairs .

 

Thanks again and particular @iiznh , appreciate it.

 

Hi @Vaughanza

It isn't necessary to connect two pairs, once pair works. 

Hi Guys

I'm having a similar problem.

My inverter: Deye 5.5KW inverter

I get this:

INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/esphome-web-9c4334.yaml...
INFO Starting log output from esphome-web-9c4334.local using esphome API
INFO Successfully connected to esphome-web-9c4334.local
[11:32:38][I][app:102]: ESPHome version 2023.6.3 compiled on Jun 30 2023, 10:52:22
[11:32:38][C][wifi:543]: WiFi:
[11:32:38][C][wifi:379]:   Local MAC: [redacted]
[11:32:38][C][wifi:380]:   SSID: [redacted]
[11:32:38][C][wifi:381]:   IP Address: [redacted]
[11:32:38][C][wifi:383]:   BSSID: [redacted]
[11:32:38][C][wifi:384]:   Hostname: 'esphome-web-9c4334'
[11:32:38][C][wifi:386]:   Signal strength: -81 dB ▂▄▆█
[11:32:38][C][wifi:390]:   Channel: 6
[11:32:38][C][wifi:391]:   Subnet: 255.255.255.0
[11:32:38][C][wifi:392]:   Gateway: [redacted]
[11:32:38][C][wifi:393]:   DNS1: [redacted]
[11:32:38][C][wifi:394]:   DNS2: [redacted]
[11:32:38][C][logger:301]: Logger:
[11:32:38][C][logger:302]:   Level: DEBUG
[11:32:38][C][logger:303]:   Log Baud Rate: 0
[11:32:38][C][logger:305]:   Hardware UART: UART0
[11:32:38][C][uart.arduino_esp32:124]: UART Bus 0:
[11:32:38][C][uart.arduino_esp32:125]:   TX Pin: GPIO1
[11:32:38][C][uart.arduino_esp32:126]:   RX Pin: GPIO3
[11:32:38][C][uart.arduino_esp32:128]:   RX Buffer Size: 256
[11:32:38][C][uart.arduino_esp32:130]:   Baud Rate: 9600 baud
[11:32:38][C][uart.arduino_esp32:131]:   Data Bits: 8
[11:32:38][C][uart.arduino_esp32:132]:   Parity: NONE
[11:32:38][C][uart.arduino_esp32:133]:   Stop bits: 1
[11:32:38][C][modbus:143]: Modbus:
[11:32:38][C][modbus:144]:   Flow Control Pin: GPIO5
[11:32:38][C][modbus:145]:   Send Wait Time: 250 ms
[11:32:38][C][modbus:146]:   CRC Disabled: NO
[11:32:38][C][modbus.number:083]: modbus.numberModbus Number 'sun12k-Maximum battery charge current'
[11:32:38][C][modbus.number:083]: modbus.number  Unit of Measurement: 'A'
[11:32:38][C][modbus.number:083]: modbus.numberModbus Number 'sun12k-Maximum battery discharge current'
[11:32:38][C][modbus.number:083]: modbus.number  Unit of Measurement: 'A'
[11:32:39][C][modbus.number:083]: modbus.numberModbus Number 'sun12k-Maximum battery_grid charge current'
[11:32:39][C][modbus.number:083]: modbus.number  Unit of Measurement: 'A'
[11:32:39][C][modbus.number:083]: modbus.numberModbus Number 'sun12k-Max Solar Sell Power'
[11:32:39][C][modbus.number:083]: modbus.number  Unit of Measurement: 'W'
[11:32:39][C][modbus.number:083]: modbus.numberModbus Number 'sun12k-Time point 1 start'
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k_Solar_sell'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Grid_Charge'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time of Use'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 1 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 2 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 3 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 4 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 5 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.switch:068]: modbus_controller.switchModbus Controller Switch 'sun12k-Time point 6 charge enable'
[11:32:39][C][modbus_controller.switch:070]: modbus_controller.switch  Icon: 'mdi:toggle-switch'
[11:32:39][C][modbus_controller.switch:091]: modbus_controller.switch  Restore Mode: disabled 
[11:32:39][C][modbus_controller.binary_sensor:009]: Modbus Controller Binary Sensor 'sun12k-AC INV relay'
[11:32:39][C][modbus_controller.binary_sensor:009]: Modbus Controller Binary Sensor 'sun12k-AC Load relay Reserved'
[11:32:39][C][modbus_controller.binary_sensor:009]: Modbus Controller Binary Sensor 'sun12k-AC grid relay'
[11:32:39][C][modbus_controller.binary_sensor:009]: Modbus Controller Binary Sensor 'sun12k-AC Generator relay'
[11:32:39][C][modbus_controller.binary_sensor:009]: Modbus Controller Binary Sensor 'sun12k-Turn off/on status'
[11:32:39][C][modbus_controller.text_sensor:012]: Modbus Controller Text Sensor 'sun12k-Running Status'
[11:32:39][C][captive_portal:088]: Captive Portal:
[11:32:39][C][mdns:108]: mDNS:
[11:32:39][C][mdns:109]:   Hostname: esphome-web-9c4334
[11:32:39][C][ota:093]: Over-The-Air Updates:
[11:32:39][C][ota:094]:   Address: esphome-web-9c4334.local:3232
[11:32:39][C][api:138]: API Server:
[11:32:39][C][api:139]:   Address: esphome-web-9c4334.local:6053
[11:32:39][C][api:141]:   Using noise encryption: YES
[11:32:39][C][modbus_controller:275]: ModbusController:
[11:32:39][C][modbus_controller:276]:   Address: 0x01
[11:32:41][D][modbus_controller:032]: Modbus command to device=1 register=0x6C countdown=0 no response received - removed from send queue
[11:32:42][D][modbus_controller:032]: Modbus command to device=1 register=0x80 countdown=0 no response received - removed from send queue
[11:32:44][D][modbus_controller:032]: Modbus command to device=1 register=0x82 countdown=0 no response received - removed from send queue
[11:32:45][D][modbus_controller:032]: Modbus command to device=1 register=0x8F countdown=0 no response received - removed from send queue
[11:32:47][D][modbus_controller:032]: Modbus command to device=1 register=0x91 countdown=0 no response received - removed from send queue
[11:32:48][D][modbus_controller:032]: Modbus command to device=1 register=0x94 countdown=0 no response received - removed from send queue
[11:32:49][D][modbus_controller:032]: Modbus command to device=1 register=0xAC countdown=0 no response received - removed from send queue
[11:32:51][D][modbus_controller:032]: Modbus command to device=1 register=0x1F4 countdown=0 no response received - removed from send queue
[11:32:52][D][modbus_controller:032]: Modbus command to device=1 register=0x227 countdown=0 no response received - removed from send queue
[11:32:56][D][modbus_controller:032]: Modbus command to device=1 register=0x6C countdown=0 no response received - removed from send queue
[11:32:57][D][modbus_controller:032]: Modbus command to device=1 register=0x80 countdown=0 no response received - removed from send queue

The entities show up in HA, but the values are Unknown:

image.png.7f19316b724c8b4ea4de2cefa88fcf61.png

 

The Inverter Connector Wiring:

image.thumb.jpeg.3d7a1cfd32749b33194f7e4403ede463.jpeg

ESP Pinout Diagram:

image.thumb.jpeg.8e90b8f86c5bd5bb91ec42000b90423c.jpeg

 

ESP Wiring:

image.thumb.jpeg.1a53cf45b692216c839bd9840c83634b.jpeg

RS485 Wiring: DI>TX, R0>RX, RE>P5

image.thumb.jpeg.d320b700e62b89d95bfce8270542d817.jpeg

 

I've tried it with both 2 and 7 to A 1 and 8 to B and only the single pair.

I have 2 RS485's one with R7 and one without, no joy on either!

Any ideas why its not gathering data?!?!?!

 

 

 

image.jpeg

38 minutes ago, Ar135 said:

Any ideas why its not gathering data?!?!?!

The wires to A and B are the wrong way around in that picture. The inverter is not getting the message at all.

Is your inverter set to modbus address 01?

I also suspect that you are building the wrong firmware for you 5KW, the registers differ alot. Sun12K looks like the 3phase

But even with the wrong messages the inverter should be responding with data, it will just not make sense

Edited by iiznh

THANKS!!!!!

I swopped A & B around, but that didn't work.

What did work was the VCC cable was unplugged and it started pulling data! When i connected the VCC again it stopped!

Now the question is, do I need the GND and 5V connected on the RS485? Well I answered my own question. If I disconnect the GND I get CRC errors.

This is what it looks like now:

ESP32:

image.thumb.jpeg.3f0e8bd32830c7fa2e03602316bd83cf.jpeg 

RS485 Front:

image.thumb.jpeg.0a20df67b625cae599b0451bb8b0b228.jpeg

RS485 Back

image.thumb.jpeg.f169d44c97ba0c47e4a356b6738b3721.jpeg

 

Also I need to setup the correct registers and then I'm all good! Any idea who's repo I can use for the Deye 5.5KW?

I'm doing this for a 8KW next week, do you think the same connections will work?

Thanks again for the help!!!

 

Edited by Ar135

15 minutes ago, Ar135 said:

If I disconnect the GND I get CRC errors.

You allways need GND/Neg this is the reference point. 

 

18 minutes ago, Ar135 said:

Any idea who's repo I can use for the Deye 5.5KW?

There are various open copies floating around... but imho they are pretty much a verbatim copy of the nodered flows, lots of things need fixing on them, maybe @slipx fixed some of the issues in his version? I haven't looked in months since I built my own version, maybe I'll opensource it once recouped the sunken costs

I believe there are links and code snippets in this thread

 

@Ar135 Most inverters seem to use pretty much the same modbus register, the only significant  differences are between the 3-phase and single phase inverters mostly on the grid & load side for pretty obvious reasons.

You can use the files from @slipx's Github page and he has a file for the Sunsynk single and 3 phase inverters, that works on the Deye's as well. 

For interest sakes, there is a standard for inverter communications that a lot of the manufacturers, include DEYE, have signed up for

https://sunspec.org/sunspec-modbus-specifications/

.So it is not only Sunsynk and DEYE that these integrations will work with. 

On 2023/06/30 at 1:03 PM, Ar135 said:

THANKS!!!!!

I swopped A & B around, but that didn't work.

What did work was the VCC cable was unplugged and it started pulling data! When i connected the VCC again it stopped!

Now the question is, do I need the GND and 5V connected on the RS485? Well I answered my own question. If I disconnect the GND I get CRC errors.

This is what it looks like now:

ESP32:

image.thumb.jpeg.3f0e8bd32830c7fa2e03602316bd83cf.jpeg 

RS485 Front:

image.thumb.jpeg.0a20df67b625cae599b0451bb8b0b228.jpeg

RS485 Back

image.thumb.jpeg.f169d44c97ba0c47e4a356b6738b3721.jpeg

 

Also I need to setup the correct registers and then I'm all good! Any idea who's repo I can use for the Deye 5.5KW?

I'm doing this for a 8KW next week, do you think the same connections will work?

Thanks again for the help!!!

 

Thanks for this @Ar135. Was about to give up but disconnecting the VCC I managed to get readings from the inverter (Sunsynk 5kW).

  • 3 months later...
On 2023/06/29 at 12:18 AM, Vaughanza said:

Thanks to everyone for the help, eventually found the problem. 

Had to connect 2 and 7 ( rj45 wires ) to A & 1 and 8 ( RJ 45 ) to B. 

As soon as I did this, data came through. In the video it does not say anything about connecting 2 pairs .

 

Thanks again and particular @iiznh , appreciate it.

 

Thanks for this! This solved my issue too!

On 2023/10/23 at 4:05 PM, jplab said:

Thanks for this! This solved my issue too!

Quick Question! Which port did you use on your inverter? Did you use the MODBUS RS485 port? 

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.