diy solar

diy solar

Sol-Ark - Inverter Monitoring

I can confirm that the original post is correct and that the obtaining MODBUS data is straight forward if you have the documents linked to that post.

In my system I am using the DSD TECH SH-U11F USB-RS485 converter. This is available from multiple sources for about $20. The reason I recommend this one rather than the ones listed in the original post.
1) SH-U11F provides isolation which will lower your risk of damaging any circuits.
2) SH-U11F includes termination resistors which are recommended for reliable communications.
3) SH-11UF includes a ground connection terminal recommended by Sol-Ark in the document.

Some other observations I have made:
-Attempts to read blocks of registers larger than 21 result in no response from the inverter.
-The connector you use in the 12K OD inverter is labeled "CAN" which is confusing. It in fact contains both CAN and RS-485 functionality.
-Using this communications method does not conflict with the Wifi Dongle. These are separate connectors. This new method allows independent logging of data at much higher speed than the Wifi Dongle connector. The supported reporting of the inverter to www.mysol-ark.com works independently and simultaneously from what is being discussed here.
-You can only read values from the inverter. No writing of control values is documented.

I am working on a Home Assistant integration for the Sol-Ark and should have that done soon. If your HA device is close to your inverter its straight forward to connect the USB-RS485 directly. In my case I used an old router (with USB port) and OpenWRT loaded on it and the mbusd package installed. Makes an easy gateway to convert MODBUS RTU to MODBUS TCP allowing access from anywhere on my home network.

Thank you solardad for posting and especially for attaching the documents. Not sure where you got them but they are obviously critical. It's frustrating that Sol-Ark support has been so adamant with us that this feature was not possible, not supported and even risky when if fact it always existed in the inverter and could be easily utilized. It calls into question the integrity of at least some of the staff there which is unfortunate.

 
Last edited:
It's frustrating that Sol-Ark support has been so adamant with us that this feature was not possible, not supported and even risky when if fact it always existed in the inverter and could be easily utilized. It calls into question the integrity of at least some of the staff there which is unfortunate.

Mabe the honestly didn't know it was there? ??
 
Of the script? It just prints out the data to the terminal. For the VenusOS:
View attachment 55946

Note: This is NOT currently using modbus data, but rather gets limited info using Shelly EM devices.
Great looking setup. I've never heard of VenusOS but looks like an interesting project, and good to see Victron keeping it open source.

I've tried hooking up a few devices to my solark 12k but nothing seems to be coming out of my 485 port. I've tried reading it through two devices (ESP32 with 485 module and PM8000 meter) and it seems like I'm not getting anything out of the inverter. Is there anything I need to do on the solark to enable the comms?

I have it set to
  • “BMS Lithium Batt” mode “00”
  • Don't know where the selection for Modbus RTU vs RS-485 is in the menus, I'm assuming it defaults to 485
  • tested with and without the 120 Ohm termination resistor should be used on the master side of the communication cable
  • Slave ID is 0x01
  • ground is connected
 
I have spent the better half of a day rigging up a 8" Fire HD tablet to use as a monitor to at least have a constant visual of what the Sol-Ark is doing. I got the tablet during prime day for $49 and recently installed Google Playstore on it and then downloaded a browser called "full screen browser" and an app called "Tasker" to do an auto refresh every 5.5 minutes and do various screen changes to get it zoomed into the section of the webpage that has the animated Power flow diagram.
It's far from perfect but it does allow me to at least have a constant visual inside my Kitchen as to what the sol-ark is producing in the electrical room. If your wondering I tried using the powerview App but I could find no method of making it zoom in or refresh the screen. The really odd part is that the Powerview webpage has a option at the bottom left called full screen mode. In the first mode it does show the PV power being produced and does refresh it, but that is all the only power flow data it provides.

Someone please take my money ? and produce an App or whatever hardware device is needed to monitor this thing in real time. I know about "Solar Assistant" but while they say it works with the Sol-Ark it does not seem like they have done any real testing, it seems like they are assuming it does because it's designed to work with the Sunsynk Inverter.
As the OP is running, a grafana dashboard is great for displaying this and long term data. My plan is to store the data in influxdb and display it in a homeassistant page that shows my existing power consumption data
 
Yeah, I just got my Sol-Arks installed and was indeed mistaken. Scanned every single 64k TCP port and none are open.

Worse, each inverter is hard-coded to modbus address 0x01, so I need multiple RS485 transceivers...
That said, the OPs register maps are perfect and my Influx DB is filling up :) grafana shows per-second data on a small display live in my living room.

Note for anyone planning to buy multiple systems: you have to aggregate the data manually even when they are configured for stacked operation.
do you have any photos of your wiring setup? as in my #24 post above, I'm not able to get anything out of my unit
 
I recommend that you plug your converter into your Windows box and use modpoll to test the hardware to make sure it is working before proceeding to software. Modpoll is a free utility you can get here. https://www.modbusdriver.com/modpoll.html

I did not make any selection for "RTU vs RS485", not sure any such selection exists.

The exact command to try at your windows command prompt
"modpoll -b 9600 -s 1 -r 60 -c 10 -p none COM3" assuming your USB devices shows up as COM3.
 
@solardad could you help me please?
I have Raspberry Pi4 with node-red running, imported json from powerforum (flows (5).json), but confused about next steps.
Screen Shot 2021-09-07 at 9.10.35 PM.png

do I understand pins correctly? How do I proceed with reading data, could you provide steps for newbies :)
Thanks in advance!
 
@solardad could you help me please?
I have Raspberry Pi4 with node-red running, imported json from powerforum (flows (5).json), but confused about next steps.
View attachment 63759

do I understand pins correctly? How do I proceed with reading data, could you provide steps for newbies :)
Thanks in advance!
It looks like you're using a USB / Modbus transceiver but you're referencing CANBUS pins?

1631111097855.png


On a side note, why is the sokark manual so poorly written? They really need to hire someone that's written a manual before. Maybe it's just me, but this would be much clearer way of communicating the pins:
1631111293746.png
 
@poldim I'm using "JBtek USB to RS485 Converter Adapter ch340T chip"
I thought it should be connected to CanBus, but I just started to learn all of these...
and agree about confusion in the manual, it should be written in such way that there is no possibility of misinterpretation. Picture that you posted is 100% clear and I shouldn't guess.
 
Last edited:
-You can only read values from the inverter. No writing of control values is documented.

@bixelps
see the SunSynk modbus doc. that I attached in the 1st post. the write registers are listed but they do not list out the different phases given the sunsynk inverter is single phase. I believe these will work given the read registers were a basically 99% the same. the powerview forum is pretty active in leveraging the write functionality to control export, threshold triggers etc via HA. I have not had the time to dig into this side but hopefully sometime this fall. here is my latest grafana dashboard, it is mostly Sol-Ark data but I also have some of my BMS (batrium) data points to highlight the crap shunt in Sol-Ark (%SOC seems to always deviate greatly over the course of the day so I stick to V setting now). my next step is to look into HA since that seems to be the new hip thing all the kids are doing.

1631190867411.png
1631190895074.png
 
@bixelps
see the SunSynk modbus doc. that I attached in the 1st post. the write registers are listed but they do not list out the different phases given the sunsynk inverter is single phase. I believe these will work given the read registers were a basically 99% the same. the powerview forum is pretty active in leveraging the write functionality to control export, threshold triggers etc via HA. I have not had the time to dig into this side but hopefully sometime this fall. here is my latest grafana dashboard, it is mostly Sol-Ark data but I also have some of my BMS (batrium) data points to highlight the crap shunt in Sol-Ark (%SOC seems to always deviate greatly over the course of the day so I stick to V setting now). my next step is to look into HA since that seems to be the new hip thing all the kids are doing.

View attachment 63933
View attachment 63934
Great looking grafana dashboard. Any chance you have it publicly shared or can post the JSON for it?

I’m still struggling to get modbus comms working on my unit. I need to try hooking up my oscope to it to see if it’s working correctly.
 
I’m still struggling to get modbus comms working on my unit.

What are you using to connect the modbus connector to, RPI, laptop, etc.? See my 1st post but I ran into driver issues with some of units that I tried, able to work on a Mac but not a RPI, and found one that others had great success and just stuck with that. It was the biggest time sink to try and resolve since I kept on reworking and confirming my wire connections thinking i screwed up there. Also make sure you are referencing the correct Sol-Ark inverter since the setups differ slightly depending on what model you have.

Attached is my node red flow and grafana flows. Note my grafana flow includes references to my batrium so some of the dashboard panels will be blank since the data source is other than Sol-Ark. The NodeRed flow is based on a user on the Powerview forum but modified for my needs.
 

Attachments

  • Sol-Ark-NodeRed-Grafana-Flows.zip
    14.5 KB · Views: 85
What are you using to connect the modbus connector to, RPI, laptop, etc.? See my 1st post but I ran into driver issues with some of units that I tried, able to work on a Mac but not a RPI, and found one that others had great success and just stuck with that. It was the biggest time sink to try and resolve since I kept on reworking and confirming my wire connections thinking i screwed up there. Also make sure you are referencing the correct Sol-Ark inverter since the setups differ slightly depending on what model you have.

Attached is my node red flow and grafana flows. Note my grafana flow includes references to my batrium so some of the dashboard panels will be blank since the data source is other than Sol-Ark. The NodeRed flow is based on a user on the Powerview forum but modified for my needs.

Thanks for the files!

I'm using the modbus module below and not getting anything useful. I've also attached my oscilliscope to A+/B- and don't get any kind of comms signal, just noise. I tested continuity between the pins and it matches what shown below (1&8, 2&7, 3&6). The inverter's “BMS Lithium Batt” is set to “00”.

There are 3 LEDs above the RS485 RJ45 port and the middle blue one has a slow blink. I don't know what this means and the manual has no hints. It continues to happen whether anything is plugged into that port. Here's what it looks like:
The other thing I can try is hooking the SA up to my power quality meter (PM8210) which can act as a modbus master.



1631377766964.png
 

Attachments

  • 1631379026647.png
    1631379026647.png
    2.9 MB · Views: 35
Last edited:
I'm using the modbus module below and not getting anything useful.

Yeah, I don't know anything about that module. I would spend the $7 and get something that has proven to work in reading the Sol-Ark:

https://www.amazon.com/gp/product/B00NKAJGZM/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

Otherwise you are ending up troubleshooting technology that is outside of you main goal - my problem where I spent literally a couple days going in circles with a device that my RPI could not work with.
 
Yeah, I don't know anything about that module. I would spend the $7 and get something that has proven to work in reading the Sol-Ark:

https://www.amazon.com/gp/product/B00NKAJGZM/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

Otherwise you are ending up troubleshooting technology that is outside of you main goal - my problem where I spent literally a couple days going in circles with a device that my RPI could not work with.
I've gotten both the adapter you linked with a pizero, a stand-alone RS485 to TCP converter (USR-TCP232-410S, config below), and even third option with an Elfin-EW11. Unfortunately, I'm still not able to get any kind of response out of the SA.

Do these settings look right to you?

1631843329872.png
 
Do these settings look right to you?
So I did not have to update the settings of the device. I only specified them my NodeRed flow that is running on the PI (and the modus connector reading the Sol-Ark is connected via usb to the PI) - serial port / serial type / baud rate. the settings i used are out of the box for the inverter. all the examples I have reviewed are using the same ones.

1631885597333.png
 
So I did not have to update the settings of the device. I only specified them my NodeRed flow that is running on the PI (and the modus connector reading the Sol-Ark is connected via usb to the PI) - serial port / serial type / baud rate. the settings i used are out of the box for the inverter. all the examples I have reviewed are using the same ones.
I'm very confused. I had to attach cables to the "smart load" breaker and shut off the solark. When I brought it back online an hour later, I noticed the USR-TCP232-410S RS485 lights blinking. I then checked and my NR flows are pulling data successfully.

I don't know what caused it to not work, which isn't great, but it's working now.

BTW, are you doing any control over modbus? I'm using the grid TOU to control when I charge the battery from grid but it only allows setting a standard TOU schedule for all 7 days of the week and my utility runs different hours for the weekend. It looks like those set points are available in registers 250-279.

Also, I'm trying to think through the architecture that I want to setup. Trying to balance the data acquisition uptime vs the modbus control. I'd like to have telegraf pull the data and toss it into influxdb but this won't allow me to control the inverter as it'll only allow one modbus TCP connection at a time. Alternatively, I can pull all the data in via home assistant which will also allow control but I'll loose data if/when home assistant is down.
 
@bixelps
my next step is to look into HA since that seems to be the new hip thing all the kids are doing.

I have a custom integration for HA on github now. It has good functionality at this point when using TCP/IP. Should not be too hard to make it work with RTU, which is what I could use some help with. If you are interested in working on it let me know and I will give you access. Just send me your github username.

Energy.jpg
Component.jpg
 
Last edited:
Back
Top