Jump to content
Flirc Forums

Any way to get the JSON for device?


Go to solution Solved by jason,

Recommended Posts

Hello

I'm wondering if there is any way I can get the JSON out of the app for a particular device?

The reason being that I have an Altec Lansing amp and some of the Altec Lansing devices you already have are kind of close to doing all the right things and I can make it work more or less. But I'd love to get that JSON, tweak until perfect and then be able to submit on here to be added to the database.

 

Alternatively I have the flirc usb and my original remote, can I get the pronto values out this way? I could then just feed them into my own .txt (as per the pinned post)?  Haven't seen anything specific/definitive on getting pronto values from original remote via flirc usb...

 

Also I know you are working on learning mode (thank you!) so I could just wait for that.

Thanks in advance and appreciate all your hard work!

Link to comment
Share on other sites

  • Solution
10 hours ago, liambrown said:

Hello

I'm wondering if there is any way I can get the JSON out of the app for a particular device?

The reason being that I have an Altec Lansing amp and some of the Altec Lansing devices you already have are kind of close to doing all the right things and I can make it work more or less. But I'd love to get that JSON, tweak until perfect and then be able to submit on here to be added to the database.

 

Alternatively I have the flirc usb and my original remote, can I get the pronto values out this way? I could then just feed them into my own .txt (as per the pinned post)?  Haven't seen anything specific/definitive on getting pronto values from original remote via flirc usb...

 

Also I know you are working on learning mode (thank you!) so I could just wait for that.

Thanks in advance and appreciate all your hard work!

Just save the config from the remote manager and everything you need is there along with extraneous info.

Link to comment
Share on other sites

21 hours ago, liambrown said:

Hello

I'm wondering if there is any way I can get the JSON out of the app for a particular device?

The reason being that I have an Altec Lansing amp and some of the Altec Lansing devices you already have are kind of close to doing all the right things and I can make it work more or less. But I'd love to get that JSON, tweak until perfect and then be able to submit on here to be added to the database.

 

Alternatively I have the flirc usb and my original remote, can I get the pronto values out this way? I could then just feed them into my own .txt (as per the pinned post)?  Haven't seen anything specific/definitive on getting pronto values from original remote via flirc usb...

 

Also I know you are working on learning mode (thank you!) so I could just wait for that.

Thanks in advance and appreciate all your hard work!

What os do you have?

Link to comment
Share on other sites

On windows, there is a new utility called irtools.exe in the Flirc Application directory.

Using the commandline, run the following:

irtools.exe decode -l

Note the codes that are spit out and label them in a text file for me, like the following:

POWER, 0000 006D 0022 0002 015B 00AA 0014 0015 0014 0040 0014 0015 0014 0040 0014 0015 0014 0040 0014 0040 0014 0040 0014 0040 0014 0040 0015 003F 0014 0015 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0014 0014 0015 0014 0014 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 05F1 0156 0056 0015 0E4A
VOLUME UP, 0000 006D 0022 0002 015B 00AA 0014 0015 0014 0040 0014 0015 0014 0040 0014 0015 0014 0040 0014 0040 0014 0040 0014 0040 0014 0040 0015 003F 0014 0015 0014 0015 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0014 0014 0015 0014 0014 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 05F1 0156 0056 0015 0E4A

etc

I'll help convert this into something you can import into the app.

 

Link to comment
Share on other sites

7 hours ago, liambrown said:

Thanks - will do.

If you wanted to and it's easier then feel free to chuck the python script (think you've said elsewhere this takes you from csv to json perhaps?) at me then happy to run that myself.

Thanks again for all your hard work and replies on here!

Yeah, it's nothing special. Let me clean it up and I'll post it.

Link to comment
Share on other sites

1 hour ago, jason said:

Yeah, it's nothing special. Let me clean it up and I'll post it.

Here you go. I would run this on a text file format that I specified:

CURSOR UP, 0000 006D 0022 0002....
CURSOR DOWN, 0000 006D 0022 0002....

python csv_to_skip.py `input` > "Manufacturer - Brand.json"

Edit the resulting JSON and replace the model and brand:
    "brand": "BRAND (REPLACE ME)",
    "model": "MODEL (REPLACE ME)",

Then also the types is anyone of the following: "devices.tv.a", "devices.box", "devices.audio", "devices.av", "devices.games", "devices.pc", "devices.home", "devices.misc"

They are all listed in the json for convenience, just remove the ones you don't want it to show up in.

csv_to_skip.py

** EDIT ** 

I forgot to say, if you want the buttons to auto map correctly, they should follow the naming conventions of all the other entries. So if you have Enter and Back, and not MENU BACK, etc, they might not get assigned correctly if you run the wizard.

  • Thanks 1
Link to comment
Share on other sites

17 hours ago, jason said:

On windows, there is a new utility called irtools.exe in the Flirc Application directory.

Using the commandline, run the following:

irtools.exe decode -l

Note the codes that are spit out and label them in a text file for me, like the following:

POWER, 0000 006D 0022 0002 015B 00AA 0014 0015 0014 0040 0014 0015 0014 0040 0014 0015 0014 0040 0014 0040 0014 0040 0014 0040 0014 0040 0015 003F 0014 0015 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0014 0014 0015 0014 0014 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 05F1 0156 0056 0015 0E4A
VOLUME UP, 0000 006D 0022 0002 015B 00AA 0014 0015 0014 0040 0014 0015 0014 0040 0014 0015 0014 0040 0014 0040 0014 0040 0014 0040 0014 0040 0015 003F 0014 0015 0014 0015 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0014 0014 0015 0014 0014 0014 0015 0014 0040 0014 0040 0014 0015 0014 0015 0014 0040 0014 0040 0014 0040 0014 05F1 0156 0056 0015 0E4A

etc

I'll help convert this into something you can import into the app.

 

I'm getting different codes spit out when pressing the same button...is this expected?

For example, pressing the power button:

RAW:    +925 -805 +926 -805 +1754 -1747 +927 -804 +927 -805 +1754 -862 +926 -805 +951 -1664 +935 -797 +1754 -862 +952
PRONTO: :: FLIRC    :: RC5           - scancode: 0x00000E0C
0000 006D 000B 0000 0023 001E 0023 001E 0043 0043 0023 001E 0023 001E 0043 0021 0023 001E 0024 0040 0023 001E 0043 0021 0024 2568E
:: DECODEIR :: RC5           - scancode: 0x00CC  D:0x000E  S:0xFFFFFFFF
:: FLIRC    :: RC5           - scancode: 0x00000E0C
:: ARDUINO  :: RC5           - scancode: 0x00000B8C {12}
++++

 

I then press that same power button again:

RAW:    +954 -776 +1780 -836 +927 -1689 +929 -803 +927 -805 +1780 -836 +927 -804 +927 -1689 +928 -804 +1779 -837 +926
PRONTO: :: FLIRC    :: RC5           - scancode: 0x00000E0C
0000 006D 000B 0000 0024 001D 0044 0020 0023 0040 0023 001E 0023 001E 0044 0020 0023 001E 0023 0040 0023 001E 0044 0020 0023 13C572
:: DECODEIR :: RC5           - scancode: 0x00CC  D:0x000E  S:0xFFFFFFFF
:: FLIRC    :: RC5           - scancode: 0x00000E0C
:: ARDUINO  :: RC5           - scancode: 0x0000038C {12}
++++

 

Does this make any sense to you? It's a similar deal for any buttons on the remote (and other remotes?)

I decided to just pick one and put it into the JSON etc but it didn't work with the device... am I doing something wrong?

The device is Altec Lansing FX4201 fyi.

Link to comment
Share on other sites

55 minutes ago, liambrown said:

I'm getting different codes spit out when pressing the same button...is this expected?

I've seen the same thing and I'd like to know that too.

However I also went with "meh, I'll just pick one" and it worked.

So have you replaced the white spaces in between the codes with commas in the JSON file? I think that's necessary.

Link to comment
Share on other sites

When you have an IR sensor, you get the edges of pulses. Because it's light bouncing off walls, the edges are going to vary. 

irtools is going to spit out the raw format, and convert the raw format. As long as it's within 5%, it's going to be accurate. So it's going to vary.

What I intend to do is once I decode it, reformat it to an idealized signal on what the spec says. It's not critical, but it will be beneficial for compression.

Link to comment
Share on other sites

I tried commas instead of spaces in the JSON but still no luck. Thanks virtualxip.

Makes sense about the IR, still can't make it work at the moment from my captured IR. Interestingly though the device mostly works from some other altec lansing config you have so making do with that. Weirdest part there is that the power toggle command in that config only works within like a few seconds of another command (e.g. volume down then power toggle and it toggles the power fine (as well as doing the volume down), whilst volume up/down work fine on their own).

From what I'm capturing with irtools, it's like often a single press on a remote results in multiple sets of codes. Can I just chain those in my JSON config under one button command or is that going to be all kinds of wrong?

Needless to say, I'm looking forward to the learning functionality!

Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...