MiJia lights API project
This is the source code and instructions to control Xiaomi Mi home devices using a PlayStation4 Controller.
index.js
the Node.js server codeps.py
Python controller button mapping with Node.js endpoints
Why
While this doesn't have any practical value, it was a fun project! Beside the sense of achievement when I used the controller to switch off the light was amazing.
Aside from being my first Raspberry Pi project, this is purely to demonstrate how different technologies can work together.
Contributing
Please do. You probably write a better JavaScript/Python than I do. I would love to see what kind of combinations and actions you can make with the controller.
You might also have a look at the MiJia IO library used to control Mi home devices