Skip to content

Clap switch for VM-CLAP1 sensor, LIFX bulbs and RaspberryPi

License

Notifications You must be signed in to change notification settings

decayofmind/clap-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clap-switch 👏💡

Clap switch for VM-CLAP1 sensor, LIFX bulbs and RaspberryPi.

The script reacts on your claps, turning a bulb ON and OFF.

My setup

Prerequisites

  • VM-CLAP1 clap sensor from Verbal Machines. (Works as a GPIO Button. Performs really well, ignoring all background noises.)
  • LiFX bulb
  • RaspberryPi
  • Python3 (with pip) and make

Installation

  1. Edit settings clap-switch.systemd file to meet your needs.
  2. make
  3. systemctl start clap-switch

Settings

Name Default Description
CLAP_SWITCH_GPIO_BUTTON 2 GPIO pin the sensor is connected to.
CLAP_SWITCH_LIGHT_NAME 'Main' Name of a LiFX bulb you want to switch ON and OFF.
CLAP_SWITCH_LIGHT_BRIGHTNESS 65535 (100%) The bulb will be turned on with this brightness.
CLAP_SWITCH_LIGHT_TEMP 4000 (Kelvin) Color temperature of the bulb.
CLAP_SWITCH_CLAP_COUNT 2 How many claps in a sequence should the sensor recognize (helps preventing false claps, produced by doors, drawers, etc.)
CLAP_SWITCH_SEQ_ALLOWANCE 3.0 (seconds) Length of the clapping sequence.
CLAP_SWITCH_RAPID False If True, the script will wait for an acknowledge from the bulb after each command sent.
CLAP_SWITCH_LOG_LEVEL 'INFO' If DEBUG, the script will write a clap counter status after each clap.
CLAP_SWITCH_RETRY_COUNT 2 How many times should the script retry a command to the bulb if failed.

Links

About

Clap switch for VM-CLAP1 sensor, LIFX bulbs and RaspberryPi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published