Sample code to control home appliances using hand gestures (Mediapipe) and Nature Remo API (Python).
- Fix the timezone in the Dockerfile to match yours.
build/Dockerfile - Create the docker image.
docker build --no-cache -t nature_remo ./build
- Connect your USB camera.
- Start Docker container.
Change the --device and the camera ID in the config file if necessary.
xhost +local: docker run --name nature_remo --device /dev/video0:/dev/video0:mwr --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --env="DISPLAY=$DISPLAY" -v [Absolute path of the cloned folder]:/home/workspace -it nature_remo /bin/bash
- Change the button name and the state in the code to match your environment.
If you don't know the button name and the state, run the sample code with the DEBUG flag set to True and check "Your appliances". - Execute sample code.
The code is designed to power on with Thumb_Up and power off with Thumb_Down.
python3 src/main.py -c config/settings.yaml