Replies: 9 comments 12 replies
-
You will need some kind of driver Have a look at https://tasmota.github.io/docs/Berry/ and we can support you |
Beta Was this translation helpful? Give feedback.
-
@frank-f have you made progress controlling this device? I have the same fan and was also looking for same hackes. Have you reverse engineered the hardware for the fan an the touch buttons? |
Beta Was this translation helpful? Give feedback.
-
I had analyzed the commands the ESP sends to the fan controller board to switch states, but I have zero experience in C and never found the time (and motivation, probably) to teach myself how to put this into code. |
Beta Was this translation helpful? Give feedback.
-
sounds interesting. I'm using Tasmota and I have some experience in C/C++ coding. Haven't written custom modules for Tasmota, but I think that will be not too difficult. Can you share the list of serial commands that you have discovered already? |
Beta Was this translation helpful? Give feedback.
-
I couldn't find my notes from last year anymore, but I remembered that the protocol is pretty simple, so I just sniffed it all again. Communication protocol is UART, 9600 baud, 8n1. The protocol is exactly identical in both directions. I tried to write down which bits need to be changed to achieve which state. I hope this makes any sense to you. If you have questions or need me to test something on my fan, just let me know. It'll leave it disassembled for now.
|
Beta Was this translation helpful? Give feedback.
-
thanks a lot, that looks really simple. Also the berry scritpting should be sufficient for this automation. |
Beta Was this translation helpful? Give feedback.
-
That looks very hacker friendly :) The software has to and/or the command bits to the current state. I guess the fan controller is also sending the state cyclic or at least at power on. |
Beta Was this translation helpful? Give feedback.
-
the unknown bits are maybe for the coupling mode when power on is pressed for 6 s. I have disassembled my fan also and the next step is to add some opto couplers so that I can sniff the communication also. |
Beta Was this translation helpful? Give feedback.
-
I have yeelight fan (identified id is the yeelight fan stock firmware maybe use some check for comminication with Mijia Sever, so when I flash the stock firmware into a new esp32, that not work very fine. I flash esphome, and use https://github.com/0neday/yeelight-c900/blob/main/yeelight-c900.yaml#L93 |
Beta Was this translation helpful? Give feedback.
-
I have a "smart" tower fan (Princess 350000, so Google can find this thread better) and it has a built-in ESP-WROOM-02 module. Unfortunately the fan permanently keeps a connection open to the manufacturer and every command (regardless if via touch controls or via the app) goes through their servers. Just what I had in mind, when I bought the thing... not.
So today I opened the fan to check if this shortcoming can be fixed. The fan has an unmarked control IC that takes care of everything regarding switching things on and off, touch controls, timer, displaying the current state (I guess they also make a version without App support). The control IC and the ESP are connected via UART.
I pulled out my logic analyser and recorded a bunch of commands. Now I have a long list and my ideal goal would be to integrate the fan controls into Tasmota. The protocol seems to be fairly simple. It has a two byte start sequence (aa a0) and then two bytes containing the actual command in a bitmasked fashion.
Sounds rather easy, but probably too complex to integrate into Tasmota without a custom driver? I don't know any C. I have recently read about Berry support, but haven't looked into that at all yet. Could my goal be achieved with Berry? At first glance it looks somewhat like Python, which I am familiar with. Otherwise, a hint in a direction of a driver that works in a similar way would be nice. I'd then try to modify that for my needs.
If anyone is interested I could share my notes about the protocol. I also dumped the software off of the ESP and flashed it onto another one. It does seem to work there as well, so it's probably not dongled to the chip id. Could be useful for debugging.
Beta Was this translation helpful? Give feedback.
All reactions