NightRang3r / Broadlink-e-control-db-dump

These two scripts will "parse" the broadlink e-Control Android application database or SharedData and dump the IR / RF codes for selected accessories into a text file which can be later used with broadlink-python to send the codes to the RM PRO hub
149 stars 52 forks source link

Extract predefined codes from the file that econtrol downloads to the devie #11

Open md170 opened 6 years ago

md170 commented 6 years ago

Hi, Your scripts are working great, Thanks!!!

However they do not extract codes that the econtrol application downloads for predefined remotes.

I did notice that econtrol downloads files such as 1001.gz or 131.gz that are likely to contain these predefined codes.

Is there any way to extract the codes from these files?

Thanks,

David

NightRang3r commented 6 years ago

Can you give me a sample file to look at?

matangg commented 6 years ago

I started some work on that. Check it out here: https://github.com/mjg59/python-broadlink/issues/74

md170 commented 6 years ago

Hey @NightRang3r :

Here is a file: [1001.gz](https://github.com/NightRang3r/Broadlink-e-control-db-dump/files/1292890/1001.gz)

You can also find it on http://cloud.broadlink.com.cn/irda_code/1001.gz

@matangg, I used your analysis and wrote a python script to parse this file and indeed I see the chunks of 960 bytes but the output seems wrong because according to what I see all of the IR codes start with "26" and then "00" and then a repeat and count number. The data from that file comes out as the piece below. I sent it to the broadlink device and it doesn't complain (it even flushes the light) but it doesn't trigger anything at the receiver IR device.

David

38014600139148181818181818185418541854181818181854181818181854181818181818181818181818181818181818185418181818181818181818181818541818185418181818185418181802144181818181818181818181818181818181818181818181818181818541818181818181818181818181818181818181818181818181818181818541818185418541802144000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

matangg commented 6 years ago

@md170 you need to send broadlink the entire 960 byte packet including the "26 00" header. It is boradlink's packet format and the header tells it the packet is an IR packet and not an RF packet

md170 commented 6 years ago

I added the 2600 header and also added the 2 bytes with the byte count and the trailing 0d05 and it doesn't seem to work. another thing to note is that the patterns in the file are different from the code that I captured through the device manually. So maybe there's additional manipulation that is needed on the raw data.