This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Solved

Getting Homey to play an audio file on trigger

vaderagvaderag Member
edited September 2017 in Questions & Help
I was wondering if there is any way to get Homey to play a loud audio file on a trigger out of its own speaker?

Basically, I'm awaiting a siren to be delivered from China but just received a notice from the police about burglaries in our area, and so I'm trying to set up a makeshift siren using Homey in the meantime?

Thoughts?!
Tagged:

Comments

  • RamonRamon Member
    edited September 2017
    This sound will scare them away 

    http://www.orangefreesounds.com/air-raid-siren/
  • I found a good siren that scared the bejesus out of me, let alone the burglars! I'll probably keep it as a backup even when my siren (s) arrive (getting an internal and external)
  • Is there any way I can make the sound repeat until a certain action is taken (e.g NFC presented?)
  • vaderag said:
    Is there any way I can make the sound repeat until a certain action is taken (e.g NFC presented?)
    Nobody? Ideally I'd like it to repeat a set number of times or for a set number of seconds too...

    I'd also like help (somewhat related) with knowing if it is possible to interrupt a flow part way?
    E.g. I want to have a separate flow that when Homey hears "Cancel the Alarm" or receives our NFC tag then it and it is still arming, then it stops the audio that is playing, and sets a few values back to what they were

    How can I make this interruption happen?
  • @Vaderag  an example:
    Start your alarm-flow with a preset of a variable with a value corresponding to the number of times you want to play the sound maximal.
    Let a second flow start on a change of the variable and if this variable > 0, start the sound and decrement the variable (-1) with a delay that is the equal to the play-time of the sound.
    To stop the alarm you can make a flow that clears the variable (0).
  • JPe said:
    @Vaderag  an example:
    Start your alarm-flow with a preset of a variable with a value corresponding to the number of times you want to play the sound maximal.
    Let a second flow start on a change of the variable and if this variable > 0, start the sound and decrement the variable (-1) with a delay that is the equal to the play-time of the sound.
    To stop the alarm you can make a flow that clears the variable (0).
    This seems to be working in my test case... thank you so much :)
Sign In or Register to comment.