Sound in response to a trigger

Posted on
Wed Jun 16, 2021 4:52 am
Rene offline
Posts: 8
Joined: Feb 04, 2006

Sound in response to a trigger

If, at night, one of my motion sensors becomes active, I would like it to trigger a sound from my computer. Like a barking dog, or calling 'darling, is that you?'

Posted on
Wed Jun 16, 2021 12:24 pm
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: Sound in response to a trigger

You can do this already, for a spoken announcement . In the trigger set up look at the bottom of the action window, in the speak line type in a line of text that you want spoken . Now when the trigger fires the compute will speak the text. As for playing an audio file I think you should be able to use a python script to play the audio.

My house has a few out side motion detectors that speak when motion is detected suck as "Hay there is some one coming up the driveway" and "There is someone at the front door" I have a temperature sensor on the barbecue that fires a trigger that says "the Bar B is now hot" this also starts a pester timer that waits about 2 hours and is the bar b is still hot it will say "Hay did you forget to turn off the Bar B. This repeats every 15 minutes until the Bar B has cooled down.

Elwood

Posted on
Wed Jun 16, 2021 2:59 pm
glt offline
Posts: 11
Joined: Sep 01, 2013

Re: Sound in response to a trigger

A low-code means to accomplish this would be using the "Run Shell Script" Action to call Apple's "afplay" command line with the path to your sound file supplied as an argument.

Server Actions -> Script and File Actions -> Run Shell Script

/usr/bin/afplay full_path_to_sound_file

Posted on
Mon Aug 02, 2021 12:46 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sound in response to a trigger

ELWOOD wrote:
You can do this already, for a spoken announcement . In the trigger set up look at the bottom of the action window, in the speak line type in a line of text that you want spoken . Now when the trigger fires the compute will speak the text. As for playing an audio file I think you should be able to use a python script to play the audio.

My house has a few out side motion detectors that speak when motion is detected suck as "Hay there is some one coming up the driveway" and "There is someone at the front door" I have a temperature sensor on the barbecue that fires a trigger that says "the Bar B is now hot" this also starts a pester timer that waits about 2 hours and is the bar b is still hot it will say "Hay did you forget to turn off the Bar B. This repeats every 15 minutes until the Bar B has cooled down.

Elwood


What kind of temp sensor do you have that can withstand that kind of heat?

Posted on
Wed Aug 04, 2021 9:50 am
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Sound in response to a trigger

Rene wrote:
If, at night, one of my motion sensors becomes active, I would like it to trigger a sound from my computer. Like a barking dog, or calling 'darling, is that you?'


There are some solutions to have Alexa handle the announcement too, with a little python and a few variables

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests