Making sound when a trigger event occurs & sending iMessages

Posted on
Sat Mar 11, 2017 8:56 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Making sound when a trigger event occurs & sending iMessages

Ok

I have probably missed this somewhere, so hopefully someone can point me in the right direction.

I would really prefer to send iMessages to me for alerts rather than emails but cannot see how to do that.

and

I would really like to use an mp3 sound effect on a trigger event, like a car alarm setting double beep when setting Away of Goodnight to confirm the action occurred.

Even more useful now that we are using Alexa for more an more actions in the house rather than phones or tablets.buttons.

Any insight much appreciated.

Posted on
Mon Mar 13, 2017 7:03 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Making sound when a trigger event occurs & sending iMess

PROGRESS!!!!!


Found you can run an AppleScript

Code: Select all
do shell script "afplay '/System/Library/Sounds/Glass.aiff'"


And it play the sound on demand :-)

I can now quickly and easily add Audio Alerts to Indigo - i.e. Sound Plays - "Freezer Door Open"

Or an Alert when someone is detected on a camera in the back garden.

Now working how to send iMessages-

I am really surprised I am the first one to do this and had expected someone else to have already worked all this stuff out. In fact I would have expected it to be built in.

Posted on
Mon Mar 13, 2017 7:12 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Making sound when a trigger event occurs & sending iMess

Looks like AppleScript is the way forward.

Code: Select all
tell application "Messages"
   send "This is an iMessage" to buddy "xxxxxxxxxx@icloud.com" of (service 1 whose service type is iMessage)
end tell


Just need to work out how to use a variable for the message part and for the recipient now

Posted on
Mon Mar 13, 2017 7:45 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Making sound when a trigger event occurs & sending iMess

This might simplify your attempts. Been meaning to install it myself.

viewtopic.php?f=134&t=15532&hilit=Messages+plugin

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Mar 13, 2017 8:13 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Making sound when a trigger event occurs & sending iMess

Different Computers wrote:
This might simplify your attempts. Been meaning to install it myself.

viewtopic.php?f=134&t=15532&hilit=Messages+plugin


Excellent, thank you so much.

I have been trawling through the Plugins and missed this one.

A common problem I am finding as a total noob, is finding the right plugin and then finding out what the plugin actually does and the use cases for it.

The Plugins are an incredible asset to Indigo, they allow non programmers/scripters to do things undreamt of!

But as someone new to all of this I have often found it difficult to navigate and find out the potential, which is HUGE.

It just feels like Indigo is under selling itself by really not promoting the Plugin community. This stuff is awesome, borderline magic :-)

OK rant end....

Posted on
Mon Mar 13, 2017 8:29 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Making sound when a trigger event occurs & sending iMess

I'm right with you on this opinion. For me, it even extends to not fully grasping the power of some plugins that I have installed and working! I'm thinking specifically of the Security Camera plugin, which replaces the entire functionality of Security Spy for me, which is a savings of hundreds of dollars.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Mar 13, 2017 8:34 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Making sound when a trigger event occurs & sending iMess

Oh, and for making sounds, if you don't care what it is, or are happy with the default system alert sound, all you need is this super-complex AppleScript:

Code: Select all
beep

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Mar 13, 2017 8:50 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Making sound when a trigger event occurs & sending iMess

I am using Jon's Foscam HD plugin with iCamSource Pro. The combination is incredible!

iCamSource puts thumbnails on my Apple Watch /iPhone upon configurable motion detection of just the external cameras covering Drive, Frontdoor and Backdoors during waking hours and when no one is in the house.

All the images are collated and stored in a Cloud Drive which I can access through the App or if my Mac is stolen online :-)

Each camera stores just 500Mb of photo images and groups each incident into a webm file which plays like a video.

Indigo controls the cameras. Keeps the externals running 24x7 i.e. if the go offline turns power off then back on again performing a hard reset, when so many resets have occurred it will escalate to me - hence my wanting to use iMessage.

Indigo 'knows' when we are all out or if we have gone to bed - so turns on the internal cams on. icampro picks them up as they come online and performs the same as the external cameras.

I set up a couple of simple house overview Control pages for my wife, on those she can also see the cameras - currently just the external cams, as well as be able to see motion detection and turn on external lights etc if she wants.

I have been running iCamSource Pro for several years, it is extremely solid and sucks about 50% of one CPU to manage three cams all the time, I guess it goes up when the other three are on, but as I am not at my computer when it does ...... I don't really mind :-)

The combination is robust video surveillance that records offsite, works with iPhones, Android, Windows and Mac that detects if a camera is offline and takes steps to reboot it and get it going again.

Most of the cameras are £25 Foscam C1 lite - wish I paid for the £50 C1s with night vision now. :-) A couple of £100 external cams.

Overall an incredible robust, feature rich, cheap system

Again the Power of Indigo to pull all these disparate systems together and do so much more.

Posted on
Mon Mar 13, 2017 8:54 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Making sound when a trigger event occurs & sending iMess

Different Computers wrote:
Oh, and for making sounds, if you don't care what it is, or are happy with the default system alert sound, all you need is this super-complex AppleScript:

Code: Select all
beep


:-)

The primary interface to Indigo now is voice through Alexa, everything else is automated with no direct user interaction.

So was looking for providing audible feedback, she who must be obeyed finds the TXT to Speech too creepy - so exploring alerts/sounds etc

Hence the drive to finding a way to play sounds.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests