I have a rule that turns off a light after an expire binding finishes during the day. Sometimes there is a need to have the light on during the day and I have found I am usually head down in something when the light goes off. At the moment I have to either change a motion sensor to detect motion but would prefer to be selective as I dont want my kids turning on the light in the day time.
Has anyone created a cheap old school hand clap sensor to activate a rule in OH?
I did make something along these lines. My goal was to knock on the table next to my bed to toggle lights on or off. I did this with a cheap microphone that had a digital output (would get high above a certain sound level.)
My results were mitigated… I had few false negatives, but quite a lot of false positive. The false positives included hand clapping (good for you, not for me. ), the front door downstairs being closed with too much force, and a few other random things like that.
Also, one and two knocks had way too many accidental triggers, so i only used three, four and five knocks.
Most cheap microphone modules come with a digital out that goes high or low when the sound volume crosses a pre-set level.
One could read the HIGH/LOW signal on the digital output with an ESP8266, and MQTT the signal to openhab, or just read it from yr raspberry -that is hosting openhab- with the GPIO binding.
Many, many years ago I made a design from magazine Elektuur, nothing digital, all analog and I remember there was some filtering to specifically select handclapping, but I am sure that also detected or would have detected a slamming door or knocking
That is a witty way to put your lights on without having to search for your phone with a half sleepy head.
I would think that for your specific goal one of those ultrasound detectors would be better than a microphone. These are also often used for say ‘knock knock doorlocks’.
Quite flat, could fix them on or under your table/nightstand
Edit: they are called Piezo electric sensors
The thing with openHAB is that it’s open and you can integrate anything with a little bit of work.
In this case I don’t think there is anything you can buy off the shelf. You are going to have to make your own. I recommend an ESP8266.
If I were to do it again today, I’d most probably use an ESP8266 (or variant thereof like the NodeMCU, etc.) Advantages are that you directly have MQTT output on WiFi from the sensor (which is easy to integrate with OpenHab.) It also simplifies the node; no need for a separate PCB for the 433Mhz radio.