ElectricMotorcycleForum.com

  • May 04, 2024, 08:39:39 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Pages: 1 ... 3 4 [5] 6 7

Author Topic: Log file parser utility  (Read 10971 times)

MajorMajor

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Log file parser utility
« Reply #60 on: January 26, 2017, 03:37:19 PM »

What do you mean Brian?
When I exported logs with the app I got 3 files:
A single MMB bin and two BMS bin files (BMS0 BMS1).

I assumed these were logs for each of my two batteries and that they would contain individual cell voltages (like the values that can be read directly from the bike).

I have no idea what information the BMS logs contain, my hope is that it would be information that would allow us to determine if there is a problem with a battery.
Logged

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #61 on: January 26, 2017, 04:29:02 PM »

What do you mean Brian?
When I exported logs with the app I got 3 files:
A single MMB bin and two BMS bin files (BMS0 BMS1).

I assumed these were logs for each of my two batteries and that they would contain individual cell voltages (like the values that can be read directly from the bike).

I have no idea what information the BMS logs contain, my hope is that it would be information that would allow us to determine if there is a problem with a battery.

Damn it, they are just separate files and I've been ignoring the BMS logs. Sigh, I think my attention span is just drastically overburdened.

Thanks for the confirmation that an FX/S will export one log per battery pack.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #62 on: February 01, 2017, 02:15:54 AM »

I have made some progress in parsing battery log files but there is a lot of unknown data at this time. However the parser is now much improved and will output usable text from any log file. I could use some example decoded data especially BMS data. A set of files with both decoded text from the serial link and .bin files from the app on the same bike would be a great help in deciphering the binary files.
Logged
2016 Zero FX, 2014 KTM 1190

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #63 on: February 23, 2017, 06:37:16 PM »

I've created an offline html parser using javascript. This will decode, display and download text from MBB and BMS .bin log files. Works on phone or desktop. Get it here https://raw.githubusercontent.com/zero-motorcycle-community/browser-parse/master/zero-log-parser.html or see the full repository here https://github.com/zero-motorcycle-community/browser-parse Easy to use, no python, just save the html, open in Chrome or Firefox, choose a log file and view. I use google drive to save the logs sent from the Zero app, then download to local file storage. Check it out!
Logged
2016 Zero FX, 2014 KTM 1190

Kocho

  • Hero Member
  • *****
  • Posts: 552
    • View Profile
Re: Log file parser utility
« Reply #64 on: February 23, 2017, 10:24:03 PM »

Do I just need to download the zero-log-parser.html or do I also need the zero-parse.js file?

Does it not work on IE or Edge browsers?

I've created an offline html parser using javascript. This will decode, display and download text from MBB and BMS .bin log files. Works on phone or desktop. Get it here https://raw.githubusercontent.com/zero-motorcycle-community/browser-parse/master/zero-log-parser.html or see the full repository here https://github.com/zero-motorcycle-community/browser-parse Easy to use, no python, just save the html, open in Chrome or Firefox, choose a log file and view. I use google drive to save the logs sent from the Zero app, then download to local file storage. Check it out!
Logged
'15 Zero SR

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #65 on: February 23, 2017, 11:13:20 PM »

I've created an offline html parser using javascript. This will decode, display and download text from MBB and BMS .bin log files. Works on phone or desktop. Get it here https://raw.githubusercontent.com/zero-motorcycle-community/browser-parse/master/zero-log-parser.html or see the full repository here https://github.com/zero-motorcycle-community/browser-parse Easy to use, no python, just save the html, open in Chrome or Firefox, choose a log file and view. I use google drive to save the logs sent from the Zero app, then download to local file storage. Check it out!

This is great! Thanks for contributing to the github group, too.

In particular, html+js can be embedded in a mobile app (even downloaded and cached offline for invisible upgrades) for a couple of extra integration possibilities.

Do I just need to download the zero-log-parser.html or do I also need the zero-parse.js file?

Does it not work on IE or Edge browsers?

If it doesn't, I or another suitable web developer can probably work that out.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #66 on: February 23, 2017, 11:31:15 PM »

The html is all you need. It has the js inline.

Good luck with IE. I tried and gave up, MS doesn't support indexOf or slice with typed arrays, and they are reluctant to do file read/write.
Logged
2016 Zero FX, 2014 KTM 1190

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #67 on: February 23, 2017, 11:39:13 PM »

The html is all you need. It has the js inline.

Good approach - single-file for ease of adoption/use/upgrade.

Good luck with IE. I tried and gave up, MS doesn't support indexOf or slice with typed arrays, and they are reluctant to do file read/write.

Oh, dear, those would be tricky to compensate for. Thanks for checking. I filed an issue on GitHub just so it can be tracked properly:
https://github.com/zero-motorcycle-community/browser-parse/issues/1
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #68 on: February 23, 2017, 11:50:36 PM »

The single file is clunky to edit because the language is mixed. That's why the js is separate in the repo. I plan to have a component version with html, js, and css separated just for that reason, but distribute it as one html file for users.
Logged
2016 Zero FX, 2014 KTM 1190

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #69 on: February 24, 2017, 05:33:05 AM »

The single file is clunky to edit because the language is mixed. That's why the js is separate in the repo. I plan to have a component version with html, js, and css separated just for that reason, but distribute it as one html file for users.

Yes, this is a usual good practice: small separate files that are combined for distribution in a build step.

BUT, you didn't include any way for someone to update that build! Could you include what you used? I'm okay with a lot of toolchains (maybe too many).

I can see from the HTML that it's just a simple template, very easy to find something basic to make this work automatically:
https://github.com/zero-motorcycle-community/browser-parse/blob/master/components/zero-log-parser_HTML_ONLY.html
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #70 on: February 24, 2017, 07:15:18 AM »

The build is strictly manual, copy and paste, crude but not many steps. That's why I added the comments where the insertions are done. Four external files, not a big deal. I'm using Brackets, open the components folder, open each external, copy and paste into a new html single file. If you know of a good merge tool let me know.

BTW I tried a quick and dirty phonegap build of the html parser. It works fine on my S5 except it won't download. Probably just needs write permission. I don't know much about Android so it's out of my league but it looks very feasible to wrap it as an app. The html runs now from the download folder, not pretty but not hard to do. Probably need more detailed usage instructions.
Logged
2016 Zero FX, 2014 KTM 1190

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #71 on: February 24, 2017, 07:21:03 AM »

Okay, it sounds like a build script will be pretty easy when I or someone has some time, and PhoneGap or a similar toolkit would be fine after some investigation.

I know enough about Android to be dangerous and a lot of stale iOS information that I'd tend to toss out for a restart in Swift wrapping this. Ideally we'd have an app that advertises that it can "send/receive email" in a way that Zero's app (or a new update) can handle. Maybe support Google Drive and other storage options or something that email clients often link to...

I'm speculating, but there might be an easy opportunity somewhere with the right poking around.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #72 on: February 28, 2017, 06:47:47 PM »

Get the new browser parser on this GitHub hosted web page with instructions and a download link to the latest version https://zero-motorcycle-community.github.io/browser-parse/ This works well on phones and desktop, handles all log files from the Zero app. It is a stand alone offline html parser, just save the file, bookmark it, and you can view your log files anywhere with no Internet connection needed.
Logged
2016 Zero FX, 2014 KTM 1190

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #73 on: March 01, 2017, 01:59:35 AM »

This is great, Keith. It works on both iOS and Android, as we've tested. It's just one step away from getting wrapped in a native app so it can more easily trade files, but already makes a big difference being able to decode logs on the device.

I'm definitely glad we have enough infrastructure and testing now that the JS version was pretty straightforward to get working as well as the Python version.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

Keith

  • Sr. Member
  • ****
  • Posts: 269
    • View Profile
Re: Log file parser utility
« Reply #74 on: April 05, 2017, 06:43:18 PM »

I have created a powerful Highcharts web based viewer for MBB log files. This is an offline html file you can download from GitHub https://zero-motorcycle-community.github.io/browser-parse/  Check out these screenshots https://www.facebook.com/media/set/?set=a.10210866026279376.1073741840.1613544878&type=1&l=1fbc3493f7.
Logged
2016 Zero FX, 2014 KTM 1190
Pages: 1 ... 3 4 [5] 6 7