Skip to content

My yeelight API implementation and GUI app

License

Notifications You must be signed in to change notification settings

vanyason/yeelight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💡 Yeelight Controller

GitHub issues GitHub release (latest by date) GitHub Go Report Card Workflow

🤔 What and Why?

Some of you may had experience with this kind of devices : (yeelight official website)

I have only one bulb, which I use as a background light for my working space. Most of the time I just use one color and sometimes have to quickly switch to the pure white during the calls. Feels like using mobile app is something I do not really want

Of course creating my own buggy app using whole bunch of fancy languages and frameworks is a simpler way 🤦!

🕵️‍♂️ How does it work?

Yeelight has a public API, so firstly I implemented it in Golang

My solution is not the only one and mainly inspired by (check this repoes) Repo 1 , Repo 2

I used interesting project called Wails which is considered to be an Electron alternative written in GO. With Wails project suddenly became a frontend task, so React has been chosen as main frontend framework. I used this colorpicker, since it has a kelvin temperature feature.

Shortly: frontend - REACT, backend - Wails (Yeelight API part implemented in GO)

⚒️ How to build locally?

To build locally git clone ... the repo, follow the Wails installation guide and finally just execute wails dev for local development and wails build for production build.

💭 Interesting Files

  • There is a bash script that creates deb package. This file is not generated by Wails
  • There is a test script that tests your lightbulb. It sends all kind of commands and restores bulb to its initial state (hopefully)
  • Commented part in this file relates to a component`s fancy blur. It is commented due to lags on Linux, but you can try it yourself

📜 Todo

  • Tests
  • Automatic builds
  • Fix bugs as they are discovered
  • MacOS build
  • Change UI to a more UX friendly one
  • Rewrite in typescript
  • Support multiple bulbs

Estimation : most likely never ⏳


🧒 About ME and contact info