• Have you tried out dark mode?! Scroll to the bottom of any page to find a sun or moon icon to turn dark mode on or off!

diy solar

diy solar

ESP32 access to Sol-Ark

chicagoandy

Solar Enthusiast
Joined
Nov 20, 2023
Messages
184
Location
Atlanta
This is an expansion of a previous thread I posted about using ESP32 devices to access RS485 data. The first thread, where I configured RS485 data access to Cell-Level data on my Riuxu server-rack cabinets, is here: https://diysolarforum.com/threads/esp32-rs485-inverter-battery-monitor.90937/

This is part-two of that project, where I configured 100% free and open-source access with inexpensive components to my Sol-Ark 15k.

My motivation was Deye shutting down peoples inverters. No manufacturer should ever have the capability to remotely shut down a product I own, so the Deye provided Dongle had-to-go.

Solar Assistant is an alternative, but it's closed-source, and paid licensed. Just as Deye has done shenanigans, so too can Solar-Assistant if they choose to. Nope, I want 100% free and open-source only.

Bill Of Materials:
1. M5 Stack S3 Lite: $7.50 https://shop.m5stack.com/products/a...JOr7LfpsZhwUGOXL5zHFcPh_sU6cCEqK_HYKoZh81oEe9

2. M5 Stack RS485 Isolated: $9.50 https://shop.m5stack.com/products/isolated-rs485-unit

3. Cat-5 cable

4. USB phone-charger power supply

5. (optional) HomeAssistant for historical data access

Wiring the M5 Stack does require a custom Cat-5 cable connected to the Sol-Ark "BMS" port. This is the same port used for "closed loop" batteries. You can create a custom cable where pins 1,2,3 connect to the M5 Stack, and pins 4,5,6 connect to the battery system. It works great. I actually also have pins 6,7, and 8 connected between the battery and a different M5 Stack for battery data collection. All three run together very well.

Software:

1. ESPHome: Free and Open Source: https://esphome.io/
2. Configuration: Free and Open Source: https://github.com/chicagoandy/Sunsynk-Home-Assistant-Dash/blob/main/ESPHome-1P-Sunsynk-Deye.yaml

Flash the M5 Stack with ESPHome and upload the configuration. Then you'll have a local website available showing all of the current inverter performance metrics, and have controls to change any inverter settings.

ESPHome will also easily integrate into HomeAssistant, you can use HomeAssistant to collect your historical data.
 

Attachments

  • Screenshot 2024-11-25 10.49.24 PM.png
    Screenshot 2024-11-25 10.49.24 PM.png
    122.3 KB · Views: 27
  • Screenshot 2024-11-25 10.19.32 PM.png
    Screenshot 2024-11-25 10.19.32 PM.png
    107 KB · Views: 26
Last edited:
I have a dual Sol-Ark 15k and I'm currently using the trial version of Solar Assistant. However, I would also like to switch to something that I have full control over, so your project caught my eye. I've already used ESPHome to convert my Emporia Vue devices, so I have some familiarity with the process.

A couple quick question:

1. Is it possible to have 2 RS485 modules (one for each Sol-Ark) connected to 1 ESP32 module, or will each Sol-Ark need its own ESP32 & RS485 module?

2. How does the reported data compare to what is shown on the inverter's front display? I've had issues where Solar Assistant's data doesn't match what the inverter reports. I don't know if the culprit is the actual RS485 data registers are wrong or if Solar Assistant is somehow incorrectly "massaging" the data.
 
After some research, it looks like it's actually possible to communicate with multiple Sol-Arks with a single RS485 interface. Each Sol-Ark has its own address on the bus (1 for Master, 2 for Slave #1, etc.) and RS485 is designed to be multi-drop, so there should be no reason to need dedicated UART interfaces for inverter.

I'm going to attempt a similar project using a LilyGo/T CAN485 project board.
 
Following up to say that this definitely works and is much less expensive than the Pi/SA route. Plus, you have full control over your data.

I have both Sol-Ark inverters on the same RS485 bus (primary is id1, secondary is id2) connected to the RS485 port on the "LilyGoT CAN485" board. I made some light modifications to the ESPHome YAML file and I'm now gathering data from both Sol-Ark inverters and pushing it to Home Assistant without the need for Solar Assistant. I'll post everything on my GitHub page once I get everything cleaned up.
 
As promised, here's a link to my GitHub with instructions. Obviously, this will be fleshed out more as time permits.
 
Last edited:
As promised, here's a link to my GitHub with instructions. Obviously, this will be fleshed out more as time permits.

Hey, I'm glad that you've found success with this.

I've hit a bump where I had Solark send an different firmware but now I'm getting CRC errors. Oddly my SolarAssistant which I still have plugged into RS232 outlet works fine.

A few question: Using RS485 or RS232? Any CRC problems? What Firmware Sol-Ark are you on?
 

diy solar

diy solar
Back
Top