-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Smart Light App #26
Comments
I have a similar lamp. The captured commands work, but there seems to be some cycle - the same command can be repeated only after some time or several other commands. This is my capture:
The "clockwise" section - this is the same button pressed in the app. After 8 I can repeat 1st and it works. |
My remote also produces a different logs, but I was not able to repeat any of commants:
|
@tdragon How did you setup this in esphome config? Is it working for you with this multiple? |
No, it doesn't work. |
Hi guys, I installed the Smart Light app and managed to capture the android logs of the transaction, showing the different steps of the build of the message. I also decompiled the app with jadx and get some info, but unfortunately I did not manage to decompile the C/C++ library (called via JNI and probably obfuscated) that performs the final encryption. I tried the standard algos we have from other app but none of them are working. Here are my findings so far, based on Android logs: ** Transaction FAN ON (previously OFF), tx 4, device 3, grp 1 (3rd device added in Living Room area): { NativeMap: {"ftdCmd":"","argCmd":"8381000901","deviceType":8,"deviceId":3,"groupAddr":1} } seq = 04050010 => a sequencing: pid = 7F5E0010, a kind of phone ID. It is allocated when the app is installed, and different only in case you reset the app storage and use a brand new account. The part '0010' seems fixed. pid = 040500107F5E0010838100090114, simply an aggregation of the previous data (seq, argCmd, pid), and a basic checkcum(14) at the end. After that, this buffer is sent to another method "BeaconEncryptUtils.dataEncrypt" that produces the following encrypted output:
To finish the standard BLE ADV process with Company Id = 2553 (F9.09) then produces the following output captured by our component: Please note that this app is also controlling devices without using BLE Advertising (standard BLE GATT control, wifi...), so even if we manage to revert the encryption algo (which would require a significant effort btw I already spent the week end on it without success..), there is no guarantee this would effectively work for your devices... Could you please try to capture a Light ON / Light OFF message and try to inject it or setup a template HA light as explained here, this would guarantee your lights are effectively using BLE ADV (and maybe build a basic way to command your light from HA if we do not succeed...) Thanks in advance |
Hi @NicoIIT
They works when injected, but only first time. Then I have to send 5 other messages to make them work again. Probably the lamp remembers 5 last messages. |
I have ceiling fan with light which also has remote.
https://www.amazon.com/gp/product/B09XBB5V1F
I does not work with any of the apps mentioned in docs but it works with
Smart Light App
https://play.google.com/store/apps/details?id=ai.argrace.remotecontrol&hl=en_US
I was trying to capture commands by getting raw databut issue is output changes every time may be because of encoding not sure. Due to this I am not able to get it working.
Any idea how to tackle it?
Really appreciate your help.
The text was updated successfully, but these errors were encountered: