This is my smart home solution.
The server is deployed on openwrt router.
The project is not completed yet.
Welcome to contribute it.
Document is updating.
You may carry out secondary development to apply to your furniture.
If you want to learn more about or want to contribute mi home protocal c++ implementation, you might go to miio-cpp.
You need a server to depoly the Smart Home
This is my depoly example
I depoly the smart home server on my router:
BTW, it is not a good idea to set parameter directly into source code. I will optimize it later.
//TODO: Put your air condition ip address here #define AIRCONDITION_IP_ADDRESS "" //TODO: Put your air condition token here #define AIRCONDITION_TOKEN ""
//TODO: Put your door port here #define DOOR_UDP_SERVER_PORT 0 //TODO: Put your door ip address here #define DOOR_IP_ADDRESS ""
//TODO: put your server api url here $address = 'http://127.0.0.1:12345/smart-home-api';
You maybe want to modify makefile
The http server of smart-home-server will listen the port for api
Maybe you want to use linux screen
Security policy relies on firewall of the router.
Planning to do the account system in the next version.
(To be perfected)
For more Mi Home device, you may develop them based on smart-home-server/mi-home-device.*
Mi Home Device Protocal Documentaion will be helpful.
You may treat smart-home-server as a core of furniture to develop (at least I do so).
Go to miio-cpp learn more detail about mi home c++ protocol
We do not assume any responsibility