Chirping (Piezzo Buzzer) when opening a door or window

Hi, what is the best approach for having the chirping noise using the piezzo buzzer? I hope I don't have to define a condition for every single door or window sensor, that would be so much of work for something so simple.

Here is the rule I have but only works in the first door or window that opens, all other windows or doors that are open after leaving the first door or window open doesn't trigger the chirping noise.

Thanks

“Best” is open to endless debate. One way of many, is the built-in Chromecast Integration. You do not need conditions. You can define it in RM for as many contacts as you want.

Pretty cool, thanks for sharing this though. But still it looks like I need to define a condition for each contact, right?

No. Use Configure Custom Rule in HSM. For speech, you select audio alert. If you want a tone, you turn on a light, but it’s not an actual light. You instead turn on a virtual switch. The virtual switch is the trigger for your RM rule that plays the tone you want via the Chromecast Integration. Set the virtual switch in the device details for Auto-Off after 1 second, or define it to turn off in your RM rule after 1 second.

[Edit] Questioned the virtual switch idea after I wrote it. Tested this morning, and while the speech alert does work, regardless of what sensors are open already, the virtual switch trick does not.

@bravenel Would a future change be possible to allow multiple sensors to trigger the light alert multiple times in a HSM Custom Rule? Currently, if a sensor becomes active, the a light can only be activated once while any of the defined sensors are active. Unlike the audio alerts for speech, which can be actuated each time a defined sensor activates, despite any of them already being active.

The use case would be activating a virtual switch (with a 1 second timeout) for the purpose of playing a tone via the Built-In Chromecast Integration. Alternatively, it would also work to simply have the Chromecast Integration were available in HSM as a music device, and then it would be able react to multiple sensors activating, despite any of the defined sensors already being active, just as speech does at the moment. Then a tone could be played each time a door is opened via a Custom HSM rule.

1 Like

See my note above to Bruce. Currently HSM can trigger a TTS message each time a sensor is activated, despite one of the defined sensor already being active. However, at the moment, this does not work with a light, so activating a virtual switch will not work when any one of the sensors is already active.

This is a very simple thing to do in RM. I'm not sure how you defined your rule. I only see the conditions. You would build your rule by selecting any of your contact sensors you want to be evaluated, and then build a rule like this. NOTE: Similar to as described above, you will turn on a virtual switch. In the device details for that virtual switch, set it to disable after 1 second or define that in the rule.


Create a second rule that plays a tone via this method whenever that same virtual switch is activated.

1 Like

Both types of alerts, audio and lights, use the exact same logic. The difference may come from the nature of turning on a switch, which changes its state. For each new sensor trigger, HSM Custom Rule will turn on the light. But if it's already on, this probably doesn't do anything. A virtual switch with momentary action should work as expected, being turned on for each alert event. You should be able to see this behavior in the logs.

1 Like

I didn't check the logs. Will do that, but the behavior I observed for a virtual switch I set to auto-disable after 5 seconds, was that it wouldn't activate again if one of the sensors was already active.

Something flawed in my first test. Tried again, and indeed it shows in the log and I now see the switch activation and then Auto-Off, and then subsequent activations each time another defined sensor is activated, despite the others all still being active.

e.g. Never mind. All good. :sunglasses:

Thanks SmartHomePrimer for the information provided. I will try your suggestion when I get home this afternoon.

1 Like

I got the piezzo buzzers which are part of my Konnected alarm system to chirp whenever any window or door is open, even if one or many are open already. Cool beans!!!

Now, I would like to play a beeping sound in my google home minis but I don't know how to do that. Also text to speech work in my TV and also in one of the google home minis but not in the other google home mini. Do you know what skill has to be turned on to allow that?

The TV yes, if it's Chromecast compatible. Install the Built-In Chromecast Integratrion app and make a custom command from RM.

For playing a track, you use this method, but instead of speak, the command you'll choose will be playtrack and enter a path to the file on a local computer. Someone posted that they were able to point to an amazon cloud source, but I cannot find that now. Might have been a differnet context or a different app. I would think most external cloud sources would be authenticated https, and wouldn't work, but I'm not sure about the external options.

Create a RM rule that when the door contact opens, run the custom command.

There is a problem with door chimes and Chromecast to Google Home devices though. The connection disconnects automatically every 5 minutes and that cannot be changed. So when it plays the sound after the 5 minute timeout, there's a pause, then an internal tone from the cast device reconnecting (cannot be disabled on Google Home devices) and then finally your tone. I stopped using it for a door chime personally, because of that.

There are other options that just play a track on a local computer and you connect a speaker to that. Either directly or via Bluetooth connection. One solution is VLC Player on a local computer and the VLCThing driver.

Still another is BigTalker 2.

Many different ways to do this, these are just a few.

2 Likes

Thanks

1 Like

How?