Jump to content

RS485 data from Pylontech US3000


bbjunkie

Recommended Posts

Hi,

Background:  

Recently had a PV system fitted comprising of a Solis RHI 5k 48es Inverter and 4x Pylontech US3000's. We have an off-peak energy tariff in which we get half price electric between 1am and 8am daily. During the winter, we charge the pylons with this, in the summer we charge with solar, or that's the idea anyway.

The installer has fitted a Wifi stick to the inverter for remote monitoring purposes and to allow us to see how much energy we are generating.

However! What I have found is that with our varying climate here in the UK we are not able to optimise battery charge for solar unless I program the inverter every night based on the weather forecast for the following day.
If it's going to be cloudy it's better to charge the batteries to 100% with grid whereas if there will be a clear day, charging to 60% is sufficient (this time of year) to get a full charge by sundown. Here in the Northern Hemisphere we are coming into Spring shortly, so that will increase.

If I'm able to get a raspberry pi or similar to communicate with the inverter, my plan is to set the inverter charge time (modbus register 43143 & 43145) with a python script, this  will pull weather forecast from the OpenWeatherMap API to determine forecasted weather and sunrise/sunset then it will calculate how many hours of off-peak charging the batteries should receive.

My Question (Eventually!)

Is it possible to communicate with the inverter via the RS485 on the batteries as they are connected by CAN bus ? 


If I can't do this, I will need to find another solution as the regular option of using the  "COM" port on the inverter is taken up by the Wifi datalogger Stick. Perhaps a slightly more complicated CAN-Bus solution? 

Any thoughts or suggestions welcome.

TIA

Pete

Link to comment
Share on other sites

  • 2 months later...

I know this old post but I am looking for same solution.
I have Solis inverter with 3x US3000 batteries. I do not think rs485 on the batteries can be used to communicate to inverter. COM port is rs485 so the easiet option is to get rid get rid of wifi stick to use COM port or maybe split it so that wifi stick and also another modbus device is connected at the same time.
I saw some github repos connecting to inverter through wifi stick but none of them worked for me as all of them state that wifi stick sn 602xxxxxx and mine is 401.

https://github.com/rand12345/Inverter-Data-Logger
https://github.com/tonsnoei/SolarmanWifiApi

At this point I am looking at getting rid of wifi as I already log most of the stuff to HA. If this to work I could use nodered to control the inverter.

Link to comment
Share on other sites

bbjunkie  & reklamos 

 

My understanding is that the Solis should be connecting to the Pylontech batteries using the Canbus connection, is that correct? 

If so you could use the RS485 port to connect with the inverter using a USB-RS485 converter and your Raspberry Pi running HA, Node Red, INflux DB & Grafana

I use a similar setup to speak to my Sunsynk inverter.

Do you have the Modbus command addresses for the Solis Inverter? 

JohnB

 

 

Link to comment
Share on other sites

I found the attached doc that is the modbus commands for the Solis Inverters 

You could try using my flows from my Sunsynk inverter and changing the addresses to the correct ones for the Solis inverter to get data into a INfluxDB database from where you can display it using Grafana.

Will save you a bit of time. 

Would start of with by disconnecting all the nodes and then just setup one node in Node Red with the correct address settings for the Solis inverter and then see if you can see the data in Influx, from there it is just a matter of displaying it like you want in Grafana  

RS485_MODBUS-Hybrid-BACoghlan-201811228-1854 (1).pdf flows.json

Link to comment
Share on other sites

13 hours ago, Sc00bs said:

bbjunkie  & reklamos 

 

My understanding is that the Solis should be connecting to the Pylontech batteries using the Canbus connection, is that correct? 

If so you could use the RS485 port to connect with the inverter using a USB-RS485 converter and your Raspberry Pi running HA, Node Red, INflux DB & Grafana

I use a similar setup to speak to my Sunsynk inverter.

Do you have the Modbus command addresses for the Solis Inverter? 

JohnB

 

 

Thanks for input.
Solis is connected to Pylontech via CAN. Solis has 2 rs485 ports but both of them are used, one for meter and another for WiFi stick to upload stats to the cloud. The original question if I understand correctly was if we can use rs485 on the battery to talk to Solis. Which I do no think we can. I am looking at at removing wifi stick and see what I can pull out of Solis but my modbus knowledge is very limited, so any help is very appreciated.

Edited by reklamos
Link to comment
Share on other sites

I agree, I don't think that you are going to be able to connect to the inverter via the battery so removing the wifi stick seems like the easiest option. 

You may be able to split the RS485 port using a hub but I would get your connection tested and working before exploring that option. 

My suggestions would be to get either a Raspberry Pi or Intel Nuc and load Home Assistant / Node Red (to capture the data from the RS 485) / Influx DB (to store the captured data) / Grafana (To display the data from Influx). I suggest Home Assistant as it has a lot of other integrations into smart home devices such a Sonoff, Hosuse alarms, CCTV etc 

Get a USB - RS485 adapter to connect to the RS 485 port on your inverter, they aren't expensive.

Watch videos on Youtube on how the connection works  and start with getting Node Red to connect to your Inverter, you can use the flows I uploaded but you will need to change the modbus codes that it is requesting the data from the inverter with as the Solis codes are different to the Sunsynk codes. I would simplify the flow and just try and get one piece of data to start, you will be able to see the data returned in the debug part of Node Red, once you have the connection working you can decide what info you want from the inverter and add extra nodes for querying. 

Once you have the data coming in you need to store it somewhere, InfluxDB is very good for time based storage of data and lots of video's on yourtube on setting it up etc. You will need to give NodeRed the INfluxDB settings and you will be able to start storing your data in the database. 

Then it is just a matter of setting up Grafana to display the information in a suitable way.  

Good Luck 🙂 

Link to comment
Share on other sites

Guys, the problem with RS485 is: only 1 Master allowed + lots of slaves.. slave cannot talk, unless its being asked a question by the one and only master... thus if you want to get the inverter (master) to talk to its battery via RS485, then that's the end of the conversation...

Sorry guys, I'd better re-state, the RS485 is not the problem, but modbus, modbus can only cater for 1 master & lots of slaves, so if the inverter is supposed to cummunicate with its batter(y/ies), it would be the one and only and you won't be able to use that bus to get data from the inverter or batteries...

 

Edited by Kalahari Meerkat
oopsie...
Link to comment
Share on other sites

4 hours ago, Kalahari Meerkat said:

Guys, the problem with RS485 is: only 1 Master allowed + lots of slaves.. slave cannot talk, unless its being asked a question by the one and only master... thus if you want to get the inverter (master) to talk to its battery via RS485, then that's the end of the conversation...

Sorry guys, I'd better re-state, the RS485 is not the problem, but modbus, modbus can only cater for 1 master & lots of slaves, so if the inverter is supposed to cummunicate with its batter(y/ies), it would be the one and only and you won't be able to use that bus to get data from the inverter or batteries...

 

Kind of reminds me of IBM SNA...

Link to comment
Share on other sites

21 hours ago, Sc00bs said:

I agree, I don't think that you are going to be able to connect to the inverter via the battery so removing the wifi stick seems like the easiest option. 

You may be able to split the RS485 port using a hub but I would get your connection tested and working before exploring that option. 

My suggestions would be to get either a Raspberry Pi or Intel Nuc and load Home Assistant / Node Red (to capture the data from the RS 485) / Influx DB (to store the captured data) / Grafana (To display the data from Influx). I suggest Home Assistant as it has a lot of other integrations into smart home devices such a Sonoff, Hosuse alarms, CCTV etc 

Get a USB - RS485 adapter to connect to the RS 485 port on your inverter, they aren't expensive.

Watch videos on Youtube on how the connection works  and start with getting Node Red to connect to your Inverter, you can use the flows I uploaded but you will need to change the modbus codes that it is requesting the data from the inverter with as the Solis codes are different to the Sunsynk codes. I would simplify the flow and just try and get one piece of data to start, you will be able to see the data returned in the debug part of Node Red, once you have the connection working you can decide what info you want from the inverter and add extra nodes for querying. 

Once you have the data coming in you need to store it somewhere, InfluxDB is very good for time based storage of data and lots of video's on yourtube on setting it up etc. You will need to give NodeRed the INfluxDB settings and you will be able to start storing your data in the database. 

Then it is just a matter of setting up Grafana to display the information in a suitable way.  

Good Luck 🙂 

I already have HA, grafana, nodered and many more running in docker for monitoring/automation of my house. So these are the pretty easy. I also monitoring my pylontech batteries but through rs232 and not modbus. Are there any tools/resources that you would recommend for modbus. I have usb to modbus adapter but as I already said modbus is new to me I just need starting point and I will figure out the rest.

Link to comment
Share on other sites

Watch lots of Youtube Video's on Node Red 🙂 

Very Basically, you have to send a query to the inverter to get any data back from it.

Node Red will handle the sending of the queries for you. 

Would try using the Node Red flows I posted and then just changing the codes to the ones I uploaded for the Solis inverter.

Would keep it simple at first and just try to query one value and look for the response in the debug panel in Node Red.  

Once you can see the data in the debug panel in node red then connect it to InfluxDB for storage and once you have it there you can use Grafana to display it 🙂 

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...