ElectricMotorcycleForum.com

  • November 24, 2024, 03:49:45 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Pages: 1 2 3 [4] 5 6 7

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

SM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Log file parser utility
« Reply #45 on: October 08, 2016, 11:19:33 AM »

Could you share the log "decoder"?  and any instruction on how to use. Thanks.
Logged

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #46 on: October 08, 2016, 11:52:23 AM »

Could you share the log "decoder"?  and any instruction on how to use. Thanks.

That's literally what the first post on the thread is about:
http://electricmotorcycleforum.com/boards/index.php?topic=5020.msg34350#msg34350

It's a free / open source Python script to run on the binary log file to produce a text log version.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

GdB

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Log file parser utility
« Reply #47 on: October 08, 2016, 03:28:19 PM »

Would it help for decoding to get the log from a  :o rider (me) that always hits the speed limiter and runs in thermal protection mode everyday on my commute?
Logged
My EVs:  Mitsubishi Zero                      (2012 Mitsubishi i-MiEV and 2014 Zero S 11.4 Motorcycle)

ctrlburn

  • Sr. Member
  • ****
  • Posts: 399
  • 79_HD_Sportster 2013_Zero_S 2020_HD_LiveWire
    • View Profile
    • Charging Cycles
Re: Log file parser utility
« Reply #48 on: October 09, 2016, 06:05:46 AM »

If you open "zero_log_parser.py" in notepad (or your favorite editor) it should look like this:
#!/usr/bin/python
'''
Little decoder utility to parse Zero Motorcycle main bike board (MBB) and
battery management system (BMS) logs. These may be extracted from the bike
using the Zero mobile app. Once paired over bluetooth, select 'Support' >
'Email bike logs' and send the logs to yourself rather than / in addition to
zero support.
Usage:
   $ python zero_log_parser.py <*.bin file> [-o output_file]
'''
....

If it looks like this:

<!DOCTYPE html>
<html lang="en" class=" is-copy-enabled is-u2f-enabled">
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
    <meta charset='utf-8'>
   
....

THEN 
Instead of right clicking on the https://github.com/KimBurgess/zero-log-parser github link to the file, left click and open the file - select the contents COPY and PASTE over the contents of your "zero_log_parser.py" file and save.
Logged

steveg

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Log file parser utility
« Reply #49 on: November 19, 2016, 06:23:34 AM »

I've seen that a couple of times ges. Just try extracting the logs again, possibly after some more activity.

I have a log file that is exhibiting this behavior. To fix it I added code before the parse_entry loop that checks to be sure the byte at read_pos is actually an entry header byte. If it's not I just keep reading bytes until I find the entry header and return whatever the read byte count is as a new read_pos. From there the parse_entry loop works as expected, although in throwing away the bytes I loose an entry off the top of the log (not really a big deal). I can share this code if you want.
Logged

MostlyBonkers

  • Hero Member
  • *****
  • Posts: 1323
    • View Profile
Re: Log file parser utility
« Reply #50 on: November 19, 2016, 02:27:35 PM »

Nice one Steve. Please do share, I'm sure it'll save people time.
Logged

steveg

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Log file parser utility
« Reply #51 on: November 20, 2016, 01:26:34 PM »

Nice one Steve. Please do share, I'm sure it'll save people time.

Submitted a pull request on github. It's still messy, I didn't add anything to update the entry count so it overruns at the end.
Logged

PhreaK

  • Full Member
  • ***
  • Posts: 143
    • View Profile
Re: Log file parser utility
« Reply #52 on: January 19, 2017, 03:44:58 PM »

Hey guys, I've just sold my SR. I'll likely remain non-Zero until either my charging options, or achievable range changes. I'm about to move and unfortunately what's possible does not align with where I'd like to ride for fun, and need to ride for transport.

With that being said, it's unlikely I'll be make any further updates to this.

So that the project is not orphaned, is there anyone who would be interested in becoming the new maintainer of this on GitHub?
Logged
2014 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 #53 on: January 20, 2017, 02:28:45 PM »

Hey guys, I've just sold my SR. I'll likely remain non-Zero until either my charging options, or achievable range changes. I'm about to move and unfortunately what's possible does not align with where I'd like to ride for fun, and need to ride for transport.

With that being said, it's unlikely I'll be make any further updates to this.

So that the project is not orphaned, is there anyone who would be interested in becoming the new maintainer of this on GitHub?

Ah, that's too bad. I'm interested, although I'd not be great at improving the decoding itself. I guess the main thing would be building some tooling around it and taking in bug reports and other issues.
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 #54 on: January 20, 2017, 09:02:06 PM »

Screenshots from the Zero log file visualizer I've been working on. Here it is https://goo.gl/GGDcgr You'll need a Google login to use it, but gmail isn't required. Your Zero wants to tell you the distance, speed, charge, temperature, amps, volts and lots more about your recent rides. Ask it! No spreadsheet skills needed. https://www.facebook.com/media/set/?set=a.10210227494036469.1073741839.1613544878&type=1&l=a13849da85
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 #55 on: January 25, 2017, 05:15:51 AM »

I've created a GitHub organization to adopt the tool and incorporate others:
https://github.com/orgs/zero-motorcycle-community/

You're welcome to join and contribute, or just file issues/requests.

The log parser repo is now in there with a fix from Keith, and I added a setup script and test runner. I confirmed that we have 18 logfiles that yield an error now and before the fix there were 23 that yielded an error.

https://github.com/zero-motorcycle-community/zero-log-parser

If you submit a log file (not sure what I'll do for that), we'll add it to our test suite. We need a script to strip the VIN numbers and other identifying information before I can make the logfile set public.
« Last Edit: January 25, 2017, 07:18:45 AM by BrianTRice »
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

anton

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: Log file parser utility
« Reply #56 on: January 25, 2017, 06:20:25 AM »

I've created a GitHub organization to adopt the tool and incorporate others:
https://github.com/orgs/zero-motorcycle-community/dashboard

You're welcome to join and contribute, or just file issues/requests.

That link doesn't work because I guess it requires you to be a part of org to see dashboard?

https://github.com/zero-motorcycle-community works but there is no option to join this org. Permissions issue?
Logged

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #57 on: January 25, 2017, 07:22:49 AM »

I've created a GitHub organization to adopt the tool and incorporate others:
https://github.com/orgs/zero-motorcycle-community/dashboard

You're welcome to join and contribute, or just file issues/requests.

That link doesn't work because I guess it requires you to be a part of org to see dashboard?

Excellent catch - I've fixed the link in the post.

https://github.com/zero-motorcycle-community works but there is no option to join this org. Permissions issue?

Huh. After searching just now, I think that is not possible. To join, send me some identification (email or github account name) so I can invite you.

Thanks!
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

MajorMajor

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Log file parser utility
« Reply #58 on: January 25, 2017, 02:49:56 PM »

Does anyone here know what the current state of battery logs parsing is?
Logged

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Log file parser utility
« Reply #59 on: January 25, 2017, 10:39:16 PM »

Does anyone here know what the current state of battery logs parsing is?

There's incomplete documentation but no attempt to decode yet. See:
https://github.com/zero-motorcycle-community/zero-log-parser/blob/master/log_structure.md#bms-log-file-layout-wip

I suppose I can say that patches are welcome, but the log parser I think needs to get all the bugs worked out on the MBB entries first before tackling the BMS. To be honest, it's not documented how the MBB and BMS logs relate - I'm not sure whether or how the app exports BMS logs.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS
Pages: 1 2 3 [4] 5 6 7