# homebridge-clap-sensors

> Clap sensor for HomeKit via Homebridge.

Latest version **1.0.2** (published 2021-12-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install homebridge-clap-sensors
pnpm add homebridge-clap-sensors
yarn add homebridge-clap-sensors
bun add homebridge-clap-sensors
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-12-12 |
| First published | 2021-12-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Linus Nyrén |
| Maintainers | linusnyren |
| Keywords | homekit, homebridge, homebridge-plugin, clapsensor, clapsensors |

## Links

- npm: https://www.npmjs.com/package/homebridge-clap-sensors
- npm.io page: https://npm.io/package/homebridge-clap-sensors

## Dependencies (1)

- [clap-detector](https://npm.io/package/clap-detector.md) ^0.5.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-12-12
- 1.0.1 — 2021-12-12
- 1.0.0 — 2021-12-12

## README

# homebridge-clap-sensors

A plugin for [Homebridge](https://github.com/nfarina/homebridge/) which provides sensors for detecting claps.

This is actually exposed as motion sensors within HomeKit, but it doesn't really matter since its basically the same thing. Detection can be used for triggering scenarios of your liking, such as turning of the lights when clapping twice.


## Dependencies

Dependens on [clap-detector](https://github.com/tom-s/clap-detector), which is automatically installed via npm. Clap detector in turn requires sox, which should be installed for your system before proceeding with the installation of this plugin.

Please see the README for [clap-detector](https://github.com/tom-s/clap-detector#readme) for further details regarding its dependencies in general and sox in particular.


## Installation

Install this plugin globally:

```
npm install -g homebridge-clap-sensors
```


## Configuration

Add the following to the `platforms` part of your Homebridge `config.json` file:

```

        {
            "platform": "ClapSensors",
            "name": "ClapSensors",
            "clapInterval": 2000,
            "resetAfter": 1000,
            "sensors": [
                {
                    "name": "Single clap",
                    "numberOfClaps": 1
                },
                {
                    "name": "Double clap",
                    "numberOfClaps": 2
                },
                {
                    "name": "Triple clap",
                    "numberOfClaps": 3
                }
            ]
        }
```
### Options explained

- **platform**: Has to be `ClapSensors`.
- **name**: Name of the sensor as it appears in HomeKit.
- **numberOfClaps** and **clapInterval**: How many claps that should be detected within the interval (milliseconds) in order for the sensor to trigger.
- **resetAfter**: The time (in milliseconds) it should take for the sensor to get back to its normal state, starting to listening for further claps.

---
_Source: https://npm.io/package/homebridge-clap-sensors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
