Closed morres83 closed 1 year ago
that is indeed a problem (changing device-id's on reboot). i have solved this in node-red. i have 2 bms-es and on a reboot the device-ids are changing between 0,1,2 and 3.
i fixed this in node-red by doing the following:
screenshot:
Ah this sounds interesting, anyhow I was currently using the CVL, CCL and DCL from the serialbattery, which could not be acquired by the MODBUS nodes. (Can you still show how this MODBUS node is configured and which register table you used? I found several Chinese documents with different versions but I am unsure what is the latest one)
Additional note, when I switch to MQTT (which I will, I have already started on this topic) I think I will acquire all the required data from the BMSes also from Victrons MQTT. Everything we need should be available there, and the deviceID should not be a problem.
i found this document a while ago, published by victron. most if not all parameters can be queried through modbus.
CCGX-Modbus-TCP-register-list-2.90.xlsx
sample for getting max cell voltage:
Additional note, when I switch to MQTT (which I will, I have already started on this topic) I think I will acquire all the required data from the BMSes also from Victrons MQTT. Everything we need should be available there, and the deviceID should not be a problem.
you are implementing MQTT on the data gathering side as well? i dont think that is necessary. modbus gives us all we need.
We can benefit the most from MQTT by using it for the comms between node-red and virtual-battery itself
Ok I missunderstood. I thought you would take the data directly from the JKBMSes internal registers rather than the Victron-Modbus "emulation".
I will think about this as well, however I might like more to receive the data by subscribing to the interesting topics instead of polling cyclically. However, this is "only" NodeRed stuff and normally won't affect how the virtual battery python driver is written.
subscribing to topics sounds better then polling.. i agree with that. shall we continue our conversation in a rather more fitting place? -> #6
I just read in some serialbattery issues that on reboot USB port, device instance or so can be changing, affecting the NodeRed implementation (i.e. data cannot be read anymore unless newly "connected" in NodeRed). In fact it is known that the custom name in serialbattery is not saved upon reboot.
I just tested rebooting and in NodeRed the custom name "Jkbms1" and "Jkbms2" disappeared and was set back to the generic one (in fact I do not know right now which BMS is which one, and I think I can only find out when connecting my cell phone via bluetooth app and find some "maching" parameters).
The data readout however seems to be okay. But can we rely on that?