Comments (6)
Hi hi, which version are you using?
Then, please use the maximum debug level to see which part of the code is throwing this error. I can then build better error handling into that portion.
from bmspace.
Will do and post as soon as the error is back.
from bmspace.
The error did not occur anymore. So this is not reproduceable. So only div by 0 is still open see other issue.
from bmspace.
Hello @Tertiush ,
I experience the same problem with my 4 Gobel Batteries as @GerhardLang does. This happens sporadically a few times a day. I added some additional debug output to the script and it seems that sometimes the script (2.2.3dev) starts reading the cell voltages of my third pack at the wrong position in inc_data (6 bytes early). Please see attached debug log. Subsequently the figures for pack 4 are also implausible. The incoming data seems to be valid, though.
I was not yet able to identify the root cause of the problem but I found a quick and dirty hack that solves the problem for me by correcting the byte_index before the script starts iterating the cells voltages:
byte_corrected = 6 + ((p-1) * 146)
if byte_index != byte_corrected:
print("Wrong start byte index Pack: " +str(p) + " => " + str(byte_index) + " instead " + str(byte_corrected))
byte_index = byte_corrected
Output in case the problem occurs: Wrong start byte index Pack: 3 => 292 instead 298
Maybe you could look into this? Thank you for your help
from bmspace.
I think different vendors/versions of packs have slightly different firmwares which sporadically causes these issues. I had them before and fixed it using a while loop to find the cell count number preceding the cells values. When I find this value, e.g. 16 the parsing starts. Its likely that this value is sometimes present for another reason causing this false offset. Your fix will work for your firmware and cell count, but may not for all versions & cell counts out there.... TBH I don't have time to release special versions for different packs as its working fine for me and most out there. Can I suggest you make a fork, apply the fixes and release that to those with the same issue?
from bmspace.
Hello Tertiush,
You are absolutely right, the workaround mentioned above is specific for the BMS and firmware I'm using. I wrote this post before I found out what caused the problem and posted it hoping that might help you to identify the problem.
Now I think I identified the problem and suggested an generic fix in #32 that I think would make the workaround above obsolete.
from bmspace.
Related Issues (20)
- Reading 2nd pack does not work HOT 4
- Enersol Pace based Battery not reading correctly on 2 pack HOT 8
- Allith 10kW LifePo4 runs too HOT 1
- No config file found (docker container) HOT 5
- Error parsing BMS analog data: Cannot read multiple packs HOT 2
- division by zero in BMS analog data HOT 9
- Numberin of packs and cell with 2 digits would help sorting HOT 5
- Gobel P200 Pace BMS via Gobel Rs232-USB Adapter on Victron Cerbo? HOT 1
- Working with Joyvoit BW5KW HOT 1
- Sporadic wrong byte_index when reading multiple packs HOT 4
- Hardware Info and more documentation HOT 9
- USB to Serial connection error HOT 2
- A bit description on the returned values HOT 2
- Not reading multiple packs , only the first one HOT 6
- paho.mqtt HOT 4
- The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1 HOT 3
- Hubble AM5 HOT 2
- Confirm Sunsynk 10.65kWh HOT 2
- Error When Read Multiple Pack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bmspace.