unixpickle / cbyge

Reverse engineering Cync (formerly "C by GE") WiFi devices
BSD 2-Clause "Simplified" License
128 stars 18 forks source link

What API endpoints are you using? #9

Closed KTibow closed 2 years ago

KTibow commented 2 years ago

I'm trying to make my own implementation in Python, but I'm having trouble finding the individual endpoints you're using as I don't really understand Go. If you wouldn't mind, could you give a quick explanation about the endpoints to toggle a light and change the color temperature?

granolaonicecream commented 2 years ago

As his README states, it's not just an HTTP API to hit their servers. The pieces that are HTTP based (login, device listing) are in a const block in login.go. What you're asking for is the meat of this project which is a (proprietary?) socket based protocol. His README shows the URL he's sending packets to, but you're going to have to inspect how he constructs the packets in packet.go for each operation. If you want to build this in python, you need to be familiar with bit manipulation as those packets are constructed manually.

KTibow commented 2 years ago

Ah, okay.