Hi guys,
I recently write a Yeelight plugin for homebridge, so iOS users can use Home App or Siri to control Yeelight WiFi devices directly, you can try it and provide any feedback or bug report here.
BTW, I’m new to Javascript and NodeJS, so some code may look clumsy, but it works You are very welcome to polish it or re-write it once you got the idea how it works.
Installation:
- Follow instruction here to install HomeBridge: https://github.com/nfarina/homebridge
- Turn on developer mode of your device.
- Download Yeelight plugin https://github.com/vvpossible/homebridge_plugin. “config.json” is to tell HomeBridge how to present your devices to iOS while the folder “yeelight” contains all the code.
- The quickest way is to put them under $HOME/.homebridge (only tested on my Linux machine, windows or mac use has to study it yourself
). You may also found other methods to deploy it or you can even publish the plugin to NPM.
- Start Homebridge by command “homebridge -P ~/.homebridge/yeelight/”.
- Open the Home App and enjoy.
yeelight/index.js --> main plugin file for HomeBridge, implement required plugin interface and interact with Yeelight device adapter
yeelight/node_modules/yee.js --> Yeelight device adapter, handle device discover, device management, socket connection and command sending/receiving.
yeelight/node_modules/test.js --> some test script for yee.js
Deploy it on your openwrt router or on a long-run machine in your home, then you can enjoy it anytime.