Are there any diyBMS integrations with Sol-Ark inverters?

It’s my understanding that Sol-Ark inverters use the same can-bus protocols as Victron. Has anyone successfully integrated the diyBMS with a Sol-Ark inverter? My boards should be arriving this week and I’m hoping to start trying to get the integration done asap.

I guess not, well I don’t mind diving in here.
I ordered controller boards and the all in one board. I managed to finish off the soldering and testing of the controller board last night. So all is well on that front. The tests passed anyway. The web interface is up and shows waiting on modules.

I cloned the code and did the build and install from vs code, vs the precompiled code. I suspect I may need to dive into the CAN messages a little. though I hope not :slight_smile:
As best as I can tell the Victron messages should work with Sol Ark inverters. I’ll find out soon enough.

I plan to finish up the 16s all in one board tonight and see if I can get the communication running

I’m running into an issue with the controller forgetting the wifi information when powered by a 5v power supply hooked to the controller board (v4.5). If I power the board through usb it retains the wifi information, even when disconnected from the usb for some time. I have an sd card and can see it has recorded the wifi info there.

If I hook the external 5v supply to the board it will boot to the configure wifi screen. I can connect a serial (usb cable) and program the wifi. It will reboot and connect just fine. I can disconnect the usb and everything still works. But if I disconnect the power from the 5v on the board I’m back to the beginning, it asks for me to configure wifi again.

I want to use the add on shunt board which requires the stable 5v supply be part of (shared ground with) the battery . Does this need to power the usb directly rather than through the board 5v connection?

Thats very strange! The wifi information is written into flash memory on the ESP32 board. When the device powers up the code checks for the settings on the sd card - if those are different, it will use the ones from the sd card and re-configure, this allows a “hands free” setup of wifi if required.

Can you power up the system, configure the correct wifi and then select the “save wifi” button on the “Storage & Logging” page. Reboot and see if that fixes the problem.

The controller always says “press space bar to configure wifi” on every reboot - but that just so you can change wifi access points if you need to - after a few seconds the boot up continues with the existing settings.

In regards to the shunt-board, that will tie the ground of the battery to the controller/esp32. Therefore, only power the controller board (via the 5v pins) from the battery using a suitable regulated step down power supply (dc to dc converter). Don’t use AC mains powered usb adapters or 5v regulators.

Thanks @stuart for the reply.
I clicked save wifi and verified the wifi is saved to the sd card. There appears to be an error deserializing the config. I am compiling the source from Master with no changes. I plan to make some can bus additions.

E (5507) diybms: Error deserialize JSON

looking at the file it looks fine, maybe I need more coffee.
I redacted the wifi password but it contains no special characters. Or anything that would cause serialization issues.

    "wifi": {
        "ssid": "Home",
        "password": "<redacted>",
        "ip": "",
        "gateway": "",
        "netmask": "",
        "dns1": "",
        "dns2": "",
        "manualconfig": 1

The output on reboot is as follows

No key press detected
I (5489) diybms-set: Load WIFI config from FLASH - return 1
I (5489) diybms-set: IP=0,GW=0
I (5489) diybms: Wifi Config: SSID:, Manual Config:0
I (5491) diybms: Manual IP:, Netmask:, GW:, DNS1:, DNS2:
I (5500) diybms: Checking for /diybms/wifi.json
E (5507) diybms: Error deserialize JSON
I (5508) diybms-set: Load config
I (5511) diybms-set: Count: UsedEntries = (250), FreeEntries = (380), AllEntries = (630)
I (5546) diybms: homeassist_apikey=tmkTKWQdAxit#SJQqjD8*n#R
I (5547) curmon: Chip=INA229, Revision=1
I (5647) diybms: Onboard/internal current monitoring chip available
I (5647) curmon: RSHUNT=0.00033333, CURRENT_LSB=0.00028610, R_SHUNT_CAL=5000
W (5649) curmon: WARNING: True Max Current Measurable 122.88 Amps
I (5655) curmon: RECALC: RSHUNT=0.00033333, CURRENT_LSB=0.00023437, R_SHUNT_CAL=4096
I (5664) diybms-hal: CAN driver installed.  Filter=0 Mask=4294967295
I (5668) diybms-hal: CAN driver started
D (5673) diybms: Setup RS485
D (5675) diybms: Configure RS485
I (5680) diybms: ** Controller changed state from PowerUp to Stabilizing **
D (5685) diybms: starting wifi_init_sta
I (5709) diybms: WIFI SSID:
I (5789) diybms: Hostname: DIYBMS-00C7BD7C
D (5790) diybms: wifi_init_sta finished
I (5790) diybms: TFT screen is INSTALLED
I (12043) diybms: WIFI_EVENT_STA_START
ESP_ERROR_CHECK_WITHOUT_ABORT failed: esp_err_t 0x300a (ESP_ERR_WIFI_SSID) at 0x4008ea0b
file: "src/main.cpp" line 1616
func: void event_handler(void*, esp_event_base_t, int32_t, void*)
expression: esp_wifi_connect()
I (12115) diybms-tft: Wake up screen
D (12166) diybms: total_free_byte=131460 total_allocated_byte=161928 largest_free_blk=94196 min_free_byte=131260 alloc_blk=383 free_blk=3 total_blk=386
I (14938) diybms-rules: Set error 4:WaitingForModulesToReply
I (17433) diybms: Task 1
I (19948) diybms-rules: Set warning 9:NoExternalTempSensor
I (19948) diybms: Active errors=1
I (19998) diybms-tft: Wake up screen
I (22935) diybms: Task 2

I have confirmed an interresting behavior. The wifi.json file is deleted when booting from the 5v supply to the board (powered by dc-dc converter from the battery bank)
1 If the usb is connected the system boots normally, the wifi.json config file is used and wifi starts normally. This is repeatable.
2 If booting solely from the 5v supply the blue configure wifi prompt displays on the screen and the wifi.json file is removed.

I’m currently looking for code paths that result in the removal of the file. So far all I have found is the comment in setup()

// consoleConfigurationCheck needs to be after SD card mount, as it attempts to remove wifi.json if it exists

Looking at the LoadWiFiConfigFromSDCard() the function is defined as
@return TRUE if the WIFI config on the card is different, false if identical
But it will also return false on errors. This behavior sort of makes sense but it is a little confusing.

Anyway since the configure wifi screen is showing up on 5v boot, I am wondering if it is somehow falsely returning 32 during the spacebar check.
Is there a way to send logs to the sd card? If so I could add some debugging logs for my issue.

I could also comment out the consoleConfigurationCheck and rely solely on the sd card.

I’m just starting to get my head around this code. It’s been a while since I did much with C or C++

I finally got my 16s board working :smile: I had successfully programed it but it would not communicate. The controller was “waiting on modules”. It turns out the F1 spot on the board is expecting a fuse :man_facepalming: After that everything works like a champ.

@stuart I set this board up using the "MCP1502T-45E/CHY"chip in slot U6. For voltages up to 4.5 volts. I can confirm it works like a champ.

Now if I can just sort out this issue loosing the wifi config when booting from the board 5v connection I’ll be home free.

Hi Doug - can you raise an issue on github for this please so we can discuss easier than on this forum?

Done, Loosing wifi on reboot from 5v board power but not usb · Issue #279 · stuartpittaway/diyBMSv4ESP32 · GitHub

As it turns out the losing wifi seems to be related to the particular esp32 board. So that is done. As for interoperability with Sol-Ark, I can confirm that the can-bus communication works perfectly when emulating a Victron bms. My Sol-Ark inverters are operating in closed loop with diyBMS !

1 Like