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

Light Switch (3rd Party) code export issue #16

Open Paxy opened 6 years ago

Paxy commented 6 years ago

Hi Night, First of all, great job with this exporter. I have found the issue when trying to export codes from Light Switch (3rd Party) remote. It is a generic RF remote with predefined RF codes for On/Off's buttons. Once I export configuration over WLAN, zip broadlink folder and transfer to PC with your project, getBroadlinkSharedData.py shows that remote and let me chose it number. After selecting number, it create txt file with its name, but file is empty.

Steps to reproduce: Create Light Switch (3rd Party) in e-Control. Export configuration over WLAN. Zip broadlink folder form internal storage. Unzip required files in your project. Run getBroadlinkSharedData.py. Chose number in front of Light Switch remote. Check content of newly created file.

Expected: RF codes just like with Light Switch (Broadlink).

Getting: Emtpy TXT file with Light Switch name

Paxy commented 6 years ago

In addition, I have tried rmt.db approach and getting the same issue.

NightRang3r commented 6 years ago

@Paxy I don't have 3rd party switches to test can you provide the content of the broadlink SharedData folder so i can run some tests ?

Paxy commented 6 years ago

Sure, https://www.dropbox.com/s/tyyyvu186j0yzei/bl.zip?dl=0. Please, tell me when you download it, so I can cancel the share.

NightRang3r commented 6 years ago

@Paxy What is the name you gave to the switch ?

Paxy commented 6 years ago

WC and Kupatilo both are 3rd Party remotes that works over e-Control

NightRang3r commented 6 years ago

@Paxy ou can remove it, what type of switches are the WC and Kupatilo ? What are they controlling ?

NightRang3r commented 6 years ago

@Paxy did you got the codes from the cloud or did you capture it using the rm pro ?

Paxy commented 6 years ago

They are RF controlled light switches that looks like the some cheaper version of Broadlink TC2. https://www.aliexpress.com/item/Vhome-EU-UK-Standard-Touch-Switch-2-Gang-1-Way-Wall-Light-Touch-Switch-Crystal-Glass/32820533118.html?spm=a2g0s.9042311.0.0.9yr2bY

I have not captured the codes, e-Control have generated the code that is now working with RF switch. I am trying to export this codes so I can use them from Home Assistant. Not sure did e-Control generate those codes, or downloaded from the cloud, but I have used 3rd party as SANKOU brand from the brand list to get working codes.

NightRang3r commented 6 years ago

@Paxy When you do it doest it scans a QR code ?

NightRang3r commented 6 years ago

@Paxy which brand did you choose ?

Paxy commented 6 years ago

No. I do not have QR code for this device. Once it enter in QR code scan mode, chose "tap here ...." and select brand SANKOU. Model SK-A802-03 matched with codes for my devices.

NightRang3r commented 6 years ago

@Paxy It looks like it downloads something, the issue is that it doesn't work like the tc switches the codes are not written to the 'jsonIrCode' at all which means that this option is not implemented in the script at all just like cloud codes that are not supported.

In order to get it working it requires time (which i don't have) to research how it works.

Paxy commented 6 years ago

Tnx Nigh anyway.

Paxy commented 6 years ago

My findings shows that 3rd Party remote is downloading its codes to "broadlink/newremote/SharedData/Scripts" folder and file like "000000000000000000000000949c0000.script" that 11520 bytes. That file is the sample of SANKOU with 4 On and 4 Off switches. https://www.dropbox.com/s/evexr0v4mbnbn08/000000000000000000000000949c0000.script?dl=0

I will try to separate some part of this binary data, encode it, and test by sending it to RM2.

gsnable commented 6 years ago

@Paxy Is there any progress?if you need, I can send you my file(000000000000000000000000A59C0000.script)which contain 2 on 2 off seitches with name yoogee.

Paxy commented 6 years ago

Not really a progress in contribution manner, but I have solved my problem by using two RM devices. One to send, and other to listen and show codes. Now I can use those codes from HASS to automate lights controll.

gsnable commented 6 years ago

Well done. I've come across this solution. Due to cost considerations, I have purchased a radio remote controller for pairing with switches. And then get the RF code through the device.

Paxy commented 6 years ago

Nice if you made it. I have tried 3 different remotes that I already have. All of them did not make clear code that is not triggering something else (or multiple switches at once). Only BL generated code did not make any unintended trigger to other devices.

Teie commented 4 years ago

Hi, I'm about buying a second Broadlink to learn and see wall switch codes. Does it really work? Thanks.

Paxy commented 4 years ago

@Teie, you do not need second BL if you already have one. One device can catch code from the physical wall switch. The problem is if you generate code from e-Control APP and want to use it in different applications like python script or Home Assistant. Then you need two devices, one for e-Control to send a code, and other to catch it and show in base64 form.

Teie commented 4 years ago

Thanks @Paxy . In the end, I ended up buying (with a friend) another Broadlink. For some bizarre reason, neither can receive the signal from the Livolo controller. I tried everything, including using Broadlink Manager for Windows. This is unbelievable! My idea was to use Livolo to automate homes, making few modifications (in my country, houses are made of masonry and therefore difficult to modify), but the manufacturer does everything to make it difficult to use your product! Thanks again for the reply.

Teie commented 4 years ago

The manufacturer of Livolo just needed to publish a library with about 50 codes "on" and "off" to solve 80% of annoying consumer issues with this product.