Replies: 4 comments 7 replies
-
It's not something that I have the time to focus on at the moment, but it sounds like you are on the right track.
For Alarms you can use text sensors to show the text error:
Something like this for alarms:
You can interpret the alarms from my code: Warnings For more info see https://esphome.io/components/sensor/template.html |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. This is what I didn't know hot to do it. BR |
Beta Was this translation helpful? Give feedback.
-
Yes,
And for testing is hard to create the errors/warnings but I did try with some other ID with some value inside and the alarms where generated. Thank you again. I think for me was the most difficult part from the time I do play with HA/EspHome because first I didn't know the protocol the batteries are talking, so I hat to try both RS485 and afterwards Canbus, then after is see is taking on Canbus I had to find/learn how this protocol works, and on Canbus is not that much info about it. Curiously this BMS even is respecting the Seplos protocol but doesn't reply to their software (on the other port, the one on RS485 for battery comunication). Something about the same difficult was to discover also what "language" my inverter talks because also that one was atypical. Is one from EaSun (SMG 2 5KP) but that don't run the software from the classic ones like MPP Solar or others on Voltronic style. Mine is having only modbus communication on RS323. So on that I had to intercept the communication between inverter and the WIFI dongle and after that I had seen that is on modbus so, long story short, now their dongle is flashed with tasmota and send rtu-over-tcp to the network, because inside the dongle was and esp07, and the sensors are created in HA via modbus integration. BR |
Beta Was this translation helpful? Give feedback.
-
Well done on this, awesome work !!! Just a question, do you think it will be possible to adjust this to support a JBD BMS ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All
First I want to thank you for this CAN version of the fork.
I will like to ask you if possible to make another example that just read the CAN messages send by the batteries in order to be seen by HA.
This request comes for those that have inverters that are not having communications capabilities with LiFePo batteries like me.
I did manage to get the data out from them, via canbus, but I did get stuck on the part with the alarms and warnings because I'm not that good on programing.
I was able to interpret the values that come at 0x351, 0x355, 0x356, 0x370.
But the one from 0x359 and 0x335C I don't have any clue how to make them to appear as a binary_sensor when some alarm or warnings comes.
Any help please?
Here is an example how I had made the SOC and SOH send by my battery.
then:
- lambda: |-
uint16_t val0 = uint16_t(x[0]);
uint16_t val1 = uint16_t(x[1]);
uint16_t val2 = uint16_t(x[2]);
uint16_t val3 = uint16_t(x[3]);
uint16_t val4 = uint16_t(x[4]);
uint16_t val5 = uint16_t(x[5]);
uint16_t val6 = uint16_t(x[6]);
uint16_t val7 = uint16_t(x[7]);
float value0 = float(int((x[0])+( (x[1])<<8)));
float value1 = float(int((x[2])+( (x[3])<<8)));
float SOC = float(value0);
float SOH = float(value1);
id(battery_SOC).publish_state(SOC);
id(battery_SOH).publish_state(SOH);
Thanks!!!
Beta Was this translation helpful? Give feedback.
All reactions