# Node-Red clap node to toggle lights

**URL:** <https://discourse.nodered.org/t/node-red-clap-node-to-toggle-lights/45031>\
**Category:** General\
**Created:** [1 May 2021 18:58 UTC](https://discourse.nodered.org/t/node-red-clap-node-to-toggle-lights/45031 "2021-05-01T18:58:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dalock](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dalock](https://discourse.nodered.org/u/Dalock)\
**Post date:** [1 May 2021 18:58 UTC](https://discourse.nodered.org/t/node-red-clap-node-to-toggle-lights/45031/1 "2021-05-01T18:58:37Z")

</div>

Hi all,

I got Home Assistant running in docker on a Raspberry Pi 4 with rasbian lite.

i've been looking into Node-Red since yesterday, to combine it with Home Assistant. I got everything working and basic light switching works fine with a button in the dasboard for example. Now I want to change that button to a hand clap. So I got myself a usb mic, but I can't get it to work.

I got the required SOX module, I did test the mic setup with " lsusb" , "arecord -l" and " arecord -D plughw:1,0 test.wav", even turned the volume to 100% with Alsamixer.

With the clap node active in node-red, it won't record, because the device is in use (which makes sense) so it must do something. But when I clap my hands several times, nothing happens.

Does anyone have experience with this specific node or other sound recording nodes?

 ![clap nodered](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7e45bcb82ddd99a8c8eb87a9a2dd91de1fcf8980.png)

> **[node-red-contrib-clap](https://flows.nodered.org/node/node-red-contrib-clap)**
>
> A simple clap detector for Node-RED using Sox.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 June 2021 18:58 UTC](https://discourse.nodered.org/t/node-red-clap-node-to-toggle-lights/45031/2 "2021-06-30T18:58:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
