ABMS/2Q firmware with additional CAN messages


  • I am opening this topic, because a client requested cell voltage data on the CAN bus for Victron. Since this is not supported in the original Victron GX protocol, NodeRED  should be used and a custom add-on should be created for the extra CAN IDs and GUI. How many users would like to have this additional feature? If we make this firmware will you be prepared to share the software? We have to make this applicable for ABMS with 4 cess and up to 8 tmep sensors and 2Q with 16 cells and up to 8 temp sensors first and then extend it to Master-Slave System. Should this be in the Victron firmware by default or enabled by another instruction?

    Let me know, please.

     



  • I have the feeling that most of my customers don't need to see all cell voltages.

    What the Cerbo shows at the moment is the lowest and highest cell.

    This is for me good enough.

    I put alarm on highest and lowest cell in VRM.

     


  • I was the customer that requested this feature be enabled and @Ben   it's not something that anyone "needs" but is a "feature" that some would benefit from. There are several use cases most importantly tracking the health of all cells over a longer period of time and detecting issues with these home made battery packs. In the screen shot below you can see a Grafana graph I built that shows detailed battery info to aid in the tracking of overall battery health and to dial in charging parameters. In one of the screen shots you can see a run away cell that I had due a poor top balance and I was able to catch the issue. 

    Again this isn’t something that is “needed” for the BMS to do it’s job but is an extra feature that could be a selling point to some customers and could widen the sales base for REC. If you web search this topic there are several people from several forums including this one asking about it. 

    The only reason I asked for the data to be included with the data being sent to the VenusOS device is that VenusOS comes with a MQTT server installed by default and is setup to advertise all the published DBUS values as topics via MQTT and is a simple way to scrape this data.

    REC has the WiFi module which might be another solution, if the WiFi could include a MQTT server this would also satisfy the objective. I haven’t opened my WiFi module so I’m not sure what the specs or architecture are to know if it could support that overhead. Yet another idea would be to use an API on the WiFi module to just open the data up via web sockets and allow the client to take it from there. 

    Acknowledging that this isn’t a feature for everyone I do think there is merit in adding it to the product. Victron being the prime example of adding a MQTT server when one was not “needed” has opened that platform up for users to create all kind of fun and useful things to act as companion pieces and their willingness to allow customers to interact with their product at a software level was a big deciding factor on why I went fully Victron (except their batteries)

    These graphs were used when I was using a cheap MOSFET based BMS and a wonderful piece of software that added it to VenusOS as a serial BMS. If JKBMS or one of the other Chinese brands made a contactor based BMS I would probably still be using it but my needs brought me to REC which is a great product. 

     


  • @tine  

    I am opening this topic, because a client requested cell voltage data on the CAN bus for Victron. Since this is not supported in the original Victron GX protocol, NodeRED  should be used and a custom add-on should be created for the extra CAN IDs and GUI. How many users would like to have this additional feature? If we make this firmware will you be prepared to share the software? We have to make this applicable for ABMS with 4 cess and up to 8 tmep sensors and 2Q with 16 cells and up to 8 temp sensors first and then extend it to Master-Slave System. Should this be in the Victron firmware by default or enabled by another instruction?

    Let me know, please.


    Speaking about the requirement for Node-Red to be used. There is no specfic requirement for Node-Red to be used. The end user can get the data off the Venus device with any MQTT client. I didn't even use Node-Red to create those graphs, I was pulling the data with a MQTT client into a raspberryPI and then using it from there. If you're requiring a trade to implament this I will be happy to share my Grafana graph and write some detailed instructions for your cutomers to use to emulate what I have done. 


  •  In VRM the widget I reviewed the most, is min/max cell voltage.

    Which means, I agree that monitoring cell voltage is very useful, to see how a system behave.

    What is missing in VRM to monitor ALL cells.

    The Cerbo shows already which cell is the lowest, but not visible in VRM.

     

    Instead of creating something "new", I think Victron needs to be asked to "accept" all cell voltage data through CAN, and show them in GX and on VRM. 

    Probably they need to extend some of their data protocols to make "space" for this.

    Show them in VRM in a selectable widget, 12 V system, one widget cell 1 to 4,   24V system, 2 widgets, cell 1 to 4, next widget, cell 5-8. etc for 48V.

    Keep the min/max widget also.

     

    Victron often develops things that are first usable for their own product/batteries.

    But this function is also better for monitoring their own batteries, which means they are probably willing to do so.

     


  • I will write to Mr. Vader -Victron CEO, if we can incorporate something like this. I will let you know their response. 


  • @tine  

    Looking into it further I do see you are already providing some values via RAW data stream on the WiFi. Located at http://wifi_url/ws

    Can we get this turned into a proper websockets stream? 

    As well as adding all the cell values? 

    I think this would acomplish what the goal would be. 


    Here are the values the raw data stream is providing

    cmin Minimum cell voltage (V) 2.5
    cmax Maximum cell voltage (V) 3.75
    tmax Maximum temperature (°C) 55
    bvol Battery voltage threshold (V) 3.55
    bmin Minimum battery voltage (V) 3.5
    tbal Balancing temperature threshold (°C) 55
    tmin Minimum temperature (°C) -10
    capa Battery capacity (Ah) 608
    char Charge voltage (V) 3.56
    ioff Unknown (possibly charge offset) 0
    chis Charge hysteresis (V) 0.01
    razl Voltage difference threshold (V) 0.25
    maxh Maximum hysteresis 0.25
    minh Minimum hysteresis 0.25
    bmth Battery management threshold 5
    ioja Unknown (possibly current offset) 0.019531
    soch State of charge hysteresis 0.05
    op2l Output 2 low threshold 0
    op2h Output 2 high threshold 0
    re1l Relay 1 low threshold 0
    re1h Relay 1 high threshold 0
    chac Charge control mode 1
    dchc Discharge control mode 1
    maxc Maximum charge current (A) 250
    maxd Maximum discharge current (A) 300
    clow Low voltage cutoff (V) 2.6
    socs State of charge (%) 0.657429
    cycl Battery cycle count 2
    chem Battery chemistry type 3
    strn Unknown parameter 1
    re1t Relay 1 time 1879056121
    op2t Output 2 time 2147483647
    re1v Relay 1 voltage threshold (V) 0
    op2v Output 2 voltage threshold (V) 0
    cfvc Unknown parameter 1
    err.p Error presence flag 0
    err.num Error number 0
    nnc.bms Unknown (possibly nearest neighbor cell) 2
    nnc.cell Nearest neighbor cell index 2
    vnc.bms Unknown (possibly voltage nearest cell) 2
    vnc.cell Voltage nearest cell index 1
    toor.bms Unknown parameter 2
    toor.cell Unknown parameter 1
    baud.lcd LCD baud rate 56000
    baud.com Communication baud rate 56000
    mcu_time MCU current time 09:07:52
    mcu_date MCU current date 08.02.2025
    bms_name BMS system name 1A-XXXX
    addr BMS system address 64
    tunit Temperature unit (1 = Celsius, 2 = Fahrenheit) 1
    Ah Available battery capacity (Ah) 207
    cur Battery current (A) -2.421459
    new_log_every_midnight Logging setting false
    out General purpose output state false
    time_remaining Time until battery depletion Empty in: 201 h 59 min
    st_naprav Unknown parameter 1
    time Current system time 09:07:42
    date Current system date 08.02.2025
    mincell Minimum cell voltage (V) 3.297806
    maxcell Maximum cell voltage (V) 3.302472
    ibat Battery current (A) -2.421459
    tmax Maximum temperature (°C) 17
    vbat Battery voltage (V) 13.20256
    soc State of charge (%) 0.657424
    soh State of health (%) 0.9998
    erro.present Error flag 0
    erro.addr Error address 0
    erro.st Error status 0
    erro.con_st Connection status 0
    error Error message ""
    address Slave BMS address 2
    st_temp Temperature sensor status 1
    temp_bms BMS internal temperature (°C) 18.07092
    st_celic Unknown parameter 4
    temp.0 Cell temperature (°C) 17
    res.0 - res.3 Cell resistance (Ω) 0.00075
    nap.0 - nap.3 Individual cell voltages (V)

    3.302472 - 3.30114

     

     


  • Alright, update for anyone who is interested in this topic. After discovering that the WiFI module does indeed rednder data from the http://wifi_url/ws path (raw data not websocket) I was able to scrape the data I wanted from there. It's an ugly approach but it's working. 

    For my system I'm using it in a marine enviroment and wanted the BMS data to go into software called "Signalk" it's a piece of marine software. I spend some time this morning writing a node red function that curls the http://wifi_url/ws path, parses the data into the format I want and then sends it to my signalK server. While not an eliqute approach it does work. 

    The best part is the indiviual cell voltages are present and I was also able to extract those. 

    Here are some screenshots and the function code I wrote and if anyone wants more details on what I did, how I did it, or why please let me know. 

     


  • We will try to enable websocket stream, but the problem is that we have Master-Slave systems with 100+ cells. We will test it and let you know if it works normally. 


  • WiFi websocket with the newest Firmware on our web page:

     
     
    Websocket ws://192.168.1.184/ws WiFi sends every second 2 messages, settings and status
     
    Case  ABMS:
     
    STATUS MESSAGE:
    {
    "type": "status",
    "bms_array": {
    "master": {
    "time_remaining": "Empty in:<br> >999h",
    "st_naprav": 1,
    "time": "23:21:45",
    "date": "10.02.2025",
    "mincell": 3.20745,
    "maxcell": 3.295137,
    "ibat": -0.024486,
    "tmax": 22.5,
    "vbat": 13.08453,
    "soc": 0.407987,
    "soh": 0.9998,
    "erro": {
    "present": 0,
    "addr": 0,
    "st": 0,
    "con_st": 0
    },
    "error": ""
    },
    "slave": {
    "0": {
    "address": 2,
    "st_temp": 1, //number of temp sensors
    "temp_bms": 22.37128,     //temperature of the BMS
    "st_celic": 4,     // number of cells 
    "temp": {    // temperature sensors array and values
    "0": 22.5
    },
    "res": {    // cell resistance
    "0": 0.00075,
    "1": 0.00075,
    "2": 0.00075,
    "3": 0.00075
    },
    "nap": {     // cell voltages
    "0": 3.295137,
    "1": 3.20745,
    "2": 3.289469,
    "3": 3.292469
    }
    }
    }
    }
    }
     
    SETTINGS MESSAGE:
    {
    "type": "settings",
    "cmin": 2.8,
    "cmax": 3.85,
    "tmax": 55,
    "bvol": 3.58,
    "bmin": 3.45,
    "tbal": 55,
    "tmin": -10,
    "capa": 200,
    "char": 3.58,
    "ioff": 0,
    "chis": 0.25,
    "razl": 0.25,
    "maxh": 0.25,
    "minh": 0.1,
    "bmth": 5,
    "ioja": 0.007813,
    "soch": 0.05,
    "op2l": 2.9,
    "op2h": 0.2,
    "re1l": 3.6,
    "re1h": 0.2,
    "chac": 0.6,
    "dchc": 1.5,
    "maxc": 120,
    "maxd": 250,
    "clow": 2.9,
    "socs": 0.407987,
    "cycl": 2,
    "cans": 1,
    "chem": 3,
    "strn": 1,
    "re1t": 4294836469,
    "op2t": 4294443069,
    "re1v": 0,
    "op2v": 0,
    "cfvc": 0.8,
    "rsbr": 2,
    "err": {
    "p": 0,
    "num": 0
    },
    "nnc": {
    "bms": 2,
    "cell": 2
    },
    "vnc": {
    "bms": 2,
    "cell": 1
    },
    "toor": {
    "bms": 2,
    "cell": 1
    },
    "baud": {
    "lcd": 56000,
    "com": 115200
    },
    "mcu_time": "23:21:46",
    "mcu_date": "10.02.2025",
    "bms_name": "1A-2170",
    "addr": 64,
    "tunit": 0,
    "Ah": 118,
    "cur": -0.024486,
    "new_log_every_midnight": false,
    "out": false
    }

  • @tine I had some trouble with that firmware this morning but I've resolved it by manually adding the .bin files to the SD card and the websockets addition is working great! 

    I think this satifisy what the goal was and I want to thank you for responding to the request. 

    For anyone interested in what I requested this the final outcome is that I'm using node red to ingest the websockets data and store it an influx database then display it on a grafana graph. Below are screenshots of the final product as well and the javascript node I wrote to grab the data from websockets. With the benefit of also being able to set alarms and send myself notifications via email if something goes wrong with the battery. 

    If you use SignalK and want to use this flow it can be found on github  https://github.com/0x0f906/REC-BMS_signalK_NODE-RED

     

     


  • Thanks for sharing your work.  This looks awesome and will be helpful to others looking to do something similar.  Signal K and Node Red are great tools for super users!

    It's posts like this that make this forum great!!

     


  • We will try to add few more CAN messages to GX to support cell volages on Ekrano or Cerbo. 


  • @tine I've been running the new WiFi firmware for a few days now and the websockets feature is working great. I have noticed what might be a bug. 

    I'm having issues unlocking the BMS now with the latest firmware, the WiFi module times out and never unlocks so I can not alter settings. 

    Are you seeing this same issue testing on your end? Let me know if you want me to do any troubleshooting to help out. 


  • Guys,

    I have finally found some time to create a REC Tech tool and and am roughing in an Android/Mac/Windows/Web app I hope to release later this year.  Still Lots of work to do but here are a few page snips.  All data is virtual at this time.


  • @tine  

    I've also found another bug. 

    Max charge current and discharge current are not updating dynamically. 

    {"type":"settings","cmin":2.5,"cmax":3.75,"tmax":55,"bvol":3.55,"bmin":3.5,"tbal":55,"tmin":-10,"capa":608,"char":3.56,"ioff":0,"chis":0.01,"razl":0.25,"maxh":0.25,"minh":0.25,"bmth":5,"ioja":0.019531,"soch":0.05,"op2l":0,"op2h":0,"re1l":0,"re1h":0,"chac":0.1,"dchc":1,"maxc":250,"maxd":300,"clow":2.6,"socs":0.998191,"cycl":2,"cans":2,"chem":3,"strn":1,"re1t":1879056121,"op2t":1879048191,"re1v":0,"op2v":0,"cfvc":1,"rsbr":2,"err":{"p":0,"num":0},"nnc":{"bms":2,"cell":3},"vnc":{"bms":2,"cell":4},"toor":{"bms":2,"cell":1},"baud":{"lcd":56000,"com":115200},"mcu_time":"12:46:02","mcu_date":"17.02.2025","bms_name":"1A-2242","addr":64,"tunit":1,"Ah":1,"cur":16.22013,"new_log_every_midnight":false,"out":false}"

     

    and dbus-spy on the cerbo reports 

    com.victronenergy.battery.socketcan_can0
    Diagnostics/Module2/Alarms/HighCellVoltage                                                                                                                                           -
    Diagnostics/Module2/Alarms/HighChargeCurrent                                                                                                                                         -
    Diagnostics/Module2/Alarms/HighChargeTemperature                                                                                                                                     -
    Diagnostics/Module2/Alarms/HighDischargeCurrent                                                                                                                                      -
    Diagnostics/Module2/Alarms/HighTemperature                                                                                                                                           -
    Diagnostics/Module2/Alarms/InternalFailure                                                                                                                                           -
    Diagnostics/Module2/Alarms/LowChargeTemperature                                                                                                                                      -
    Diagnostics/Module2/Alarms/LowTemperature                                                                                                                                            -
    Diagnostics/Module2/Alarms/LowVoltage                                                                                                                                                -
    Diagnostics/Module2/Id                                                                                                                                                               -
    Family                                                                                                                                                                               -
    FirmwareVersion                                                                                                                                                                    521
    Id                                                                                                                                                                                   -
    Info/BatteryLowVoltage                                                                                                                                                            10.3
    Info/ChargeRequest                                                                                                                                                                   0
    Info/FullChargeRequest                                                                                                                                                               -
    Info/MaxChargeCurrent                                                                                                                                                             30.4
    Info/MaxChargeVoltage                                                                                                                                                             14.2
    Info/MaxDischargeCurrent                                                                                                                                                           300
    InstalledCapacity                                                                                                                                                                  608
    Manufacturer                                                                                                                                                                   REC-BMS
    Mgmt/Connection                                                                                                                                                                CAN-bus
    Mgmt/ProcessName                                                                                                                                                           can-bus-bms
    Mgmt/ProcessVersion                                                                                                                                                              v0.62
    ProductId                                                                                                                                                                        45090
    ProductName                                                                                                                                                            REC-BMS battery
    Redetect                                                                                                                                                                             0
    Sense/Current                                                                                                                                                                        -
    Sense/Soc                                                                                                                                                                            -
    Sense/Temperature                                                                                                                                                                    -
    Sense/Voltage                                                                                                                                                                        -
    Serial                                                                                                                                                                         1A-2242
    Soc                                                                                                                                                                                100
    Soh                                                                                                                                                                                100
    System/MaxCellTemperature                                                                                                                                                           21
    System/MaxCellVoltage                                                                                                                                                            3.454
    System/MaxTemperatureCellId                                                                                                                                                          1
    System/MaxVoltageCellId                                                                                                                                                              3
    System/MinCellTemperature                                                                                                                                                           21
    System/MinCellVoltage                                                                                                                                                             3.45
    System/MinTemperatureCellId                                                                                                                                                          1
    System/MinVoltageCellId                                                                                                                                                              2
    System/NrOfModulesBlockingCharge                                                                                                                                                     -
    System/NrOfModulesBlockingDischarge                                                                                                                                                  -
    System/NrOfModulesOffline                                                                                                                                                            -
    System/NrOfModulesOnline

     


  • MAXC and MAXD are fixed settings as MAX charging/discharging current per inverter/charger device. Not the CAN data sent to the inverter that is actually calculated from SISN, MAXC/MAXD, temperature, SOC, max cell voltage,...


Please login to reply this topic!