Custom monitoring of Growatt and JBD bms

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
Why is that a problem, are you running out of usb ports?
 

hipringles

Solar Addict
Joined
Jan 31, 2021
Messages
194
Why is that a problem, are you running out of usb ports?

it hints that the built in logic of SolarAssistant won't work (as it expects the master inverter to put out info for the entire string).

I wanted to avoid writing my own stuff for the sake of time, but with 6 JBD based batteries (SA only supports 1 it seems), and multiple growatt it is seeming that I will have to just bite the bullet
 

stienman

Solar Addict
Joined
Jan 6, 2021
Messages
324
I think I might either open source it or create individual nuget packages for use with .net.
I'd need to clean it up a bit, I would need to build in more abstraction, refactor it a bit and take out all the swear words.

I have it on github atm.

I'm interested in poking at it, and encourage you to open source it warts and all. Too many projects are held in reserve awaiting a face-lift when they work just fine as-is, and I'd hate to see that happen here...
 

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
I'll do that soon, I've refactored it a bit so that it is easy to add inverters, bms's etc
 

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
@hipringles : I believe you can connect multiple bms on a single rs485 two wire connection.
The software I've written allows for more than one bms/inverter

JSON:
  "Inverters": [
    {
      "Name": "InverterA",
      "Port": "/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_4c74f66434d1eb1190f1cdfbe83fd3f1-if00-port0",
      "Type": "SPF5000ES"
    },
    {
      "Name": "InverterB",
      "Port": "/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_ce2cf4ee8ed2eb118e73c349e93fd3f1-if00-port0",
      "Type": "SPF5000ES"
    }
  ],
  "BMS": [
    {
      "Name": "JBD",
      "Port": "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0",
      "Type": "JBDRS485"
    },
    {
      "Name": "JBD2",
      "Port": "/dev/serial/by-id/usb-1a82_USB2.0-Ser_-if00-port0",
      "Type": "JBDRS485"
    }
  ]
}



Altough in this stage it per port, not per address on a port.
 
Last edited:

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
Ok, all the files have been added to a public repo.

Should be good to go, it can monitor a JBD BMS and multiple SPF5000ES inverters. Adding support for other inverters and bms's should be relativly straight forward.
 
Last edited:

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
The repo is located at here.

Settings are in the appsettings.json
 
Last edited:

edseld

New Member
Joined
Aug 19, 2020
Messages
6
are you able to monitor multiple JBD BMS's using rs485 or via Bluetooth?
 

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
Yes. But each requires a USB connection . So USB to rs485 to bms.
 

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
If I'm not mistaken, that is Solar Assistant you are showing the config for.

That screenshot is most certainly from Solar Assistant. I just checked.
It's one of the reasons I stepped away from Solar Assistant, although it's excellently crafted, I wanted a more flexible tool. I'm an opensource proponent.
 
Last edited:

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
I added a way to monitor the watts going in and out of the battery vs the watss requested/supplied by the inverters. This way I can get an idea how much is lost in the process.

For me that's important because if I see it's under 30% full circle then I can charge the battery at night when grid power is 30% cheaper.
I'll monitor it for a while and see if it is interesting, but also, I'll be changing the conductor length and cross section going from the inverters to the battery and it would be interesting to see if there is a noticeable difference in the efficiency.

I use an average of 10 data points to report the percentage, so smoothing of the value is being applied to keep the spikes in check.

1646482886662.png

In the console I report the raw values atm.
 
Last edited:

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
There's not; I don't have one of those. If someone does have one, and has some basic coding skills, it should be easy to add to the system.
 

cvalik

New Member
Joined
Apr 8, 2022
Messages
3
I got frustrated one day and started to roll my own monitoring software for my growatts and jbd bms and have it report to Homeassistant via mqtt. The standard stuff, pv watts, the load, etc.
I added a rest api to it so I can perform actions from nodered. I like nodered for automation, you get to see the whole workflow in a glance without having to go through your code.

I did add a Battery management system of sorts in the code itself, for instance there is a configurable rule that will kick in when the SOC is 1%, it'll emergency charge the battery by instructing the growatt inverters to charge the battery from the grid. A backstop --because I have nodered monitoring it as well.
What else does it do... there is a angular interface where you can change output source, input source, float/bulk voltages as well as to and from grid settings.
You can view the info coming from a jbd bms, cells, soc, voltages, temp..


View attachment 82553

THis is what my nodered looks like at the moment, it calls the restapi to instruct the inverters

View attachment 82554

Since all the info is ingested in Homeassistant, and it itself is dumping sensor values into Influxdb, I can graph just about anything from solar performance to battery performance using grafana.

I can reach my homeassistant instance from anywhere in the world so I can perform actions from anywhere :

View attachment 82556

It needs some tidying up but the core functionality is pretty much done and dusted, I'm dogfooding it and has reached a stable state the last couple of dsays.

Currently I'm working on emulating a BMS for the growatts using the data from the jbd.

that's my show and tell.
Hi, can you share your nodered flow ?
 

cvalik

New Member
Joined
Apr 8, 2022
Messages
3
I got frustrated one day and started to roll my own monitoring software for my growatts and jbd bms and have it report to Homeassistant via mqtt. The standard stuff, pv watts, the load, etc.
I added a rest api to it so I can perform actions from nodered. I like nodered for automation, you get to see the whole workflow in a glance without having to go through your code.

I did add a Battery management system of sorts in the code itself, for instance there is a configurable rule that will kick in when the SOC is 1%, it'll emergency charge the battery by instructing the growatt inverters to charge the battery from the grid. A backstop --because I have nodered monitoring it as well.
What else does it do... there is a angular interface where you can change output source, input source, float/bulk voltages as well as to and from grid settings.
You can view the info coming from a jbd bms, cells, soc, voltages, temp..


View attachment 82553

THis is what my nodered looks like at the moment, it calls the restapi to instruct the inverters

View attachment 82554

Since all the info is ingested in Homeassistant, and it itself is dumping sensor values into Influxdb, I can graph just about anything from solar performance to battery performance using grafana.

I can reach my homeassistant instance from anywhere in the world so I can perform actions from anywhere :

View attachment 82556

It needs some tidying up but the core functionality is pretty much done and dusted, I'm dogfooding it and has reached a stable state the last couple of dsays.

Currently I'm working on emulating a BMS for the growatts using the data from the jbd.

that's my show and tell.
Hi, can you share your nodered flow ?
 

drbytes

Solar Enthusiast
Joined
Oct 21, 2021
Messages
105
I've actually done away with the nodered for the moment and I wrote an energy management system that monitors the battery soc and uses the predictions of forecast.solar to switch to the utility at low tarrif hours and even charge the battery if the solar prediction is too low. It uses the webapi of the monitoring software to instruct the growatts.

ie if there is 8kwh predicted it will charge the battery to 60% but only when charging is allowed (low tariff), it will then switch to utility until the low tarrif hours end at which point it will switch to battery until the next cycle.
 

cvalik

New Member
Joined
Apr 8, 2022
Messages
3
Vlastně jsem pro tuto chvíli skončil s nodered a napsal jsem systém správy energie, který monitoruje soc baterie a používá předpovědi forecast.solar k přepnutí na utilitu v hodinách s nízkým tarifem a dokonce nabíjení baterie, pokud solární předpověď je příliš nízká. K instruování growattů používá webapi monitorovacího softwaru.

tj. pokud je předpovězeno 8kwh, nabije baterii na 60 %, ale pouze když je nabíjení povoleno (nízký tarif), pak se přepne na utilitu, dokud neskončí hodiny s nízkým tarifem, kdy se přepne na baterii až do dalšího cyklu.
Thank, I need help with start (basic, example) - how connect and read growatt api in nodered. Rest API I dont know, nodered unknow "growatt" in search nodes.
 
Top