During the COVID crisis, people find it more important than ever to control their office facilities without physical touch. The touchless control should be what we pursue in the future. Although we already have sound-controlled or simple IR-controlled light switches, it is not likely to change the brightness of the object light bulb with them. In this case, a camera based gesture control switch came up in our mind. It has to be simple to use, flexible enough to change the room brightness, and most important, touchless.
IMPORTANT
- This project has dependencies on cURL. To build cURL, we need the OPENSSL developer kit and curl lib:
sudo apt-get install libssl-dev libcurl4-openssl-dev
sudo apt install curl
- To use the I2C bus, make sure the linux I2C dev library is installed:
sudo apt-get install libi2c-dev
- To use the Qt lib, make sure ALL Qt dependencies have been installed:
sudo apt-get install qtdeclarative5-dev-tools libqwt-qt5-dev qtmultimedia5-dev qtbase5-dev
- To enable the tests, remember you have BOOST lib installed:
sudo apt install build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev
mkdir build && cd build
cmake ..
make
make test
If you are new user to Hue, this command will automatically set the light bulb ready for you, you just need press the physicall hue button:
./Hue new
Then press the Hue Bridge button, you will get the json reply, following is an example:
[{"success":{"username":"HmAE6GByMxd1-3Lufz77SJUTJhRgIEFQhvUkEa3E"}}]
The IP and username are stored in log.txt, you can just go to the last step to adjust the brightness.
If you want to modify your static IP or username, you can:
./Hue user HmAE6GByMxd1-3Lufz77SJUTJhRgIEFQhvUkEa3E
./Hue ip 192.168.0.112
You can also do:
./Hue ip 192.168.0.112 user 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
Or just modify the log.txt:
192.168.0.100 <Your Bridge IP here>
S7BnUlaWvwAs6dZgYErkLO8GAWdRHTdTGi1wxwL0 <Your username here>
to modify both IP and user mannually.
After set IP and username, adjust the brightness like this:
./Hue 200
200 is brightness, integer, from 0-255, 0 means off.
sudo ./main
Command line tool and library for transferring data with URLs. (since 1998)
Xiangmin Xu
Haiyang You
Jiyuan He
Yilin Zhong