-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fan support #16
Comments
Hi Tim, Unfortunately, adding the fan controlling functionality requires quite a bit of time that I don't have. If you feel comfortable with disassembly and reverse engineering, I can point you to the parts of the application that needs analysis - and afterwards, a fan component emulating that functionality needs to be added to the repo. |
I have a fan that uses a similar app by the same author (FanLamp Pro) I have downloaded and decompiled the APK and have some experience reverse engineering. If you want to point me in the direction of what parts of the app need analyzed to get the codes, I will see if I can pull the pieces that are needed and see if I can add them to a Pull. Thanks for all your work on this project. |
Hi @yacko1975 - so, I took a look at FanLamp Pro APK, version 1.3.6 (downloaded from APK Pure). After opening it in JADX, the relevant code is in package Once you have that information (i.e., for each Once you know how to build the BLE advertising data for each method you want to implement, it's time to jump back to the ESPHome component code and develop. Create the fan component in Python and add the corresponding C++ implementation. You can use the code for lamps for reference. The trickiest part is the encoding procedure in libencodeV3, that generates the byte array - decompilers usually fail to create proper code for it, so you'll have to play around to get a working implementation - that's where the multiple architectures come in handy (some may end up with better decompilation results than others). Note that if the current code in the repository works with the lamp part of the fan, I believe it means that the encoding that's already implemented here is the same, and you should be able to use it in your code. Good luck! |
Hello, |
I installed your code in my ESPHome configuration. It paired perfectly the first time with my ceiling light and Home Assistant. I am now able to turn the light on using a better switch and button configuration.
My light has a ceiling fan on it and I would love to be able to control the fan going off and on and changing speeds depending on the temp of the room.
I have zero idea how to add that functionality to your repository. Is this something that you think you could add and/or get me started on adding in a branch. I'm using the lampsmart_pro_light component.
I think your code works for my fan even though it was not designed for that model. Just looking to add more functionality.
If you are interested, the fan I have is https://a.co/d/0bQsB0o1
Thanks and keep up the great work.
The text was updated successfully, but these errors were encountered: