fit-parser icon indicating copy to clipboard operation
fit-parser copied to clipboard

Product (device name) not being recognized by parser

Open MichaelLiss opened this issue 5 years ago • 13 comments

Hi again,

I am successfully using the parser now ! (wow... such a learning curve on Java)

Anyway, I downloaded an activity, parsed it and got some results. However, I think the FR945 is not in the listing of products

I assume 'product' in the following output is going to show fr945 ??

"file_id": {
        "serial_number": 3996694396,
        "time_created": "2020-04-30T22:16:48.000Z",
        "manufacturer": "garmin",
        "product": 3113,
        "type": "activity"
    },

I see a 'product' like category in fit.js that contains an fr920xt, an edge 280 (both of which I own), the fr935 and fenix5x (both of which I know are watches)... but I don't see the fr945 ?

    garmin_product: {
      0: 'hrm_bike',
      1: 'hrm1',
      <snip>
      1765: 'fr920xt',
      <snip>
      2530: 'edge_820',
     <snip>
      2604: 'fenix5x',
      2606: 'vivo_fit_jr',
      2691: 'fr935',

I tried putting this code in and re-running the parser, but it did not pick it up:

      2859: 'descent',
      3113: 'fr945',
      10007: 'sdm4',

MichaelLiss avatar May 01 '20 15:05 MichaelLiss

to verify that I am not going insane...

I changed this:

    manufacturer: {
      0: 0,
      1: 'garmin',

to this

    manufacturer: {
      0: 0,
      1: 'garmin_TEST',

ran the parser and got this, so I know I am not too crazy... LOL

"file_id": {
        "serial_number": 3996694396,
        "time_created": "2020-04-30T22:16:48.000Z",
        "manufacturer": "garmin_TEST",
        "product": 3113,
        "type": "activity"
    },

MichaelLiss avatar May 01 '20 15:05 MichaelLiss

Yes correct. There are some devices missing. Garmin adds those to each fit sdk release

Typically I download their sdk then find the unknown device (new added) and so on. Cumbsersome but it works. There should be some device listing in this lib.

You just have to change that , and then build (or edit the lib produce)

On Fri, 1 May 2020, 17:05 MrLister, [email protected] wrote:

to verify that I am not going insane...

I changed this:

manufacturer: {
  0: 0,
  1: 'garmin',

to this:

manufacturer: {
  0: 0,
  1: 'garmin_TEST',

and got this, so I know I am not too crazy... LOL

"file_id": { "serial_number": 3996694396, "time_created": "2020-04-30T22:16:48.000Z", "manufacturer": "garmin_TEST", "product": 3113, "type": "activity" },

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jimmykane/fit-parser/issues/16#issuecomment-622424621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVX42BQ6PUXIHILD6M5SDRPLQLTANCNFSM4MXE23QQ .

jimmykane avatar May 01 '20 15:05 jimmykane

I changed the fit.js file... but it doesn't seem to be picking it up for some reason...

( the 'device_id' change did pick up btw )

      2859: 'descent',
      3113: 'fr945',
      10007: 'sdm4',

output:

    "file_id": {
        "device_id": 3996694396,
        "time_created": "2020-04-30T22:16:48.000Z",
        "manufacturer": "garmin",
        "product": 3113,
        "type": "activity"
    },

MichaelLiss avatar May 01 '20 15:05 MichaelLiss

I just ran another test with a fit file from a Garmin 920xt;

this is what I got:

  "file_id": {
    "serial_number": 3896976736,
    "time_created": "2020-05-04T20:17:04.000Z",
    "manufacturer": "garmin",
    "product": 1765,
    "type": "activity"
  }

This is what is in the fit.js file

      1752: 'hrm_run',
      1765: 'fr920xt',
      1821: 'edge510_asia',

MichaelLiss avatar May 04 '20 22:05 MichaelLiss

Could you provide a fit file ?

On Tue, 5 May 2020, 00:02 MrLister, [email protected] wrote:

I just ran another test with a fit file from a Garmin 920xt;

this is what I got:

"file_id": { "serial_number": 3896976736, "time_created": "2020-05-04T20:17:04.000Z", "manufacturer": "garmin", "product": 1765, "type": "activity" }

This is what is in the fit.js file

  1752: 'hrm_run',
  1765: 'fr920xt',
  1821: 'edge510_asia',

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jimmykane/fit-parser/issues/16#issuecomment-623731740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVX46NV7EP2FIPIRWSJ63RP43RDANCNFSM4MXE23QQ .

jimmykane avatar May 05 '20 15:05 jimmykane

I can... I have one for a garmin 920xt and a 945.

The 920xt has actuall run data in it. The 945 I just sat on my bed and clicked start / stop so there is no distance traveled.

here they are

FitFiles.zip

ps. All of the issues I wrote come from the same two devices (920xt and 945) fit files

MichaelLiss avatar May 05 '20 15:05 MichaelLiss

Did those help ?

MichaelLiss avatar May 06 '20 13:05 MichaelLiss

Will check it out and let you know

On Wed, 6 May 2020, 15:08 MrLister, [email protected] wrote:

Did those help ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jimmykane/fit-parser/issues/16#issuecomment-624638618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVX43C4BC6KO7VQIVCZ5LRQFOOFANCNFSM4MXE23QQ .

jimmykane avatar May 06 '20 14:05 jimmykane

Ok I see the issue here. Actually this was never implemented.

Meaning that the "matching" happens in the consumer lib. (so far)

So those ID are not used inside the lib.

Something could be done about that though.

jimmykane avatar May 06 '20 14:05 jimmykane

Can you update the code so it works with your component here ?

I don't know what 'consumer lib' means or how it ties into this component

Thanks !

MichaelLiss avatar May 11 '20 17:05 MichaelLiss

Hi....

I have been thinking about this.. and for backward compatibility (and stuff that doesn't have a name yet) what would be 'really' nice is to have both.

"file_id": {
        "device_id": 3996694396,
        "time_created": "2020-04-30T22:16:48.000Z",
        "manufacturer": "garmin",
        "product": 3113,
        "productName": "fr945",
        "type": "activity"
    },

in the case of no productName:

"file_id": {
        "device_id": 3996694396,
        "time_created": "2020-04-30T22:16:48.000Z",
        "manufacturer": "garmin",
        "product": 3113,
        "productName": "",
        "type": "activity"
    },

MichaelLiss avatar May 12 '20 23:05 MichaelLiss

Hello again... I was wondering if you have some time to address this ? I am getting to the point where this issue is starting to block the progress on my project. (or maybe you could send some instructions on how to modify this so I can update it... and I will try to do the work???)

MichaelLiss avatar May 17 '20 16:05 MichaelLiss

Hi...

I am going to uninstall your module and use Garmin's parser and an AWS micro-service, as it doesn't seem you are going to work on this any time soon.

MichaelLiss avatar May 29 '20 17:05 MichaelLiss