I just bought some china smartlights from aliexpress that i hoped i was able to flash tasmota firmware. But it seems like TechLife Pro is another app, and not based on tuya cloud.
The bulbs are available from here: Amtoo bulb
Anyway, i installed the app and paired up the bulbs and started tcpdump on my router to find out how this worked. It turnes out that its using mqtt, and the bulbs subscribe to a topic on their server.
After some research and alittle help from a friend, we figured out that they connect to an mqtt server.
Here is a dump of the traffic: https://i.imgur.com/oKrHwtx.png
The dump shows that i did the following events:
- Turn light off
- Turn light on
- dim to minum
- dim up about 20% ( implemented as a slider)
- dim up
- dim up
- dum up
- lights off
- lights on
Here is a hex dump of the events separated with red: https://imgur.com/87XiPhz
Anyway, i redirected the dns to their cloud to my own mqtt. And here you go, the bulb connects just fine. And i can send on and off to it with:
echo -en “\xfa\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\xfb” | mosquitto_pub -t ‘dev_sub_2e:71:3c:6d:3f:bb’ -s
echo -en “\xfa\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\xfb” | mosquitto_pub -t ‘dev_sub_2e:71:3c:6d:3f:bb’ -s
Works very well and fast. But now i want to figure out how the dimming works. I can ofc hardcode 4-5 different states, but i really wanted to be able to controll from 0-100%. But i cannot figure it out.
I found this document but it dosent seem to be the same protocoll.