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.
Closed

My Favorite flow, The Pendule Clock

I really need to share this very simple flow, Me and my family really like this flow. Although its a very simple one i think it't worth sharing.

Background story (continue if your not interested): My son loves the old Pendule clock sounds that many of us have seen and heard at our grandparents house. I first added some sounds to the soundboard app and added these soundboard-sounds to the buttons of a KaKu remote so he has his own real KaKu soundboard. well this is fun for one day and then i got very annoyed by my sons continually pressing all the sounds at once. to come to a compromise i created the following flow.

Pendule Flow:


At every Hour between 09:00 and 22:00 play sound clock.mp3 and after 5 seconds say the time is <time>.

The sound i have used is:
http://www.zedge.net/ringtone/1018465/

The delay of 5 seconds is so that the clock sound plays and when its almost done the voice says the time is <time>.
The sounds are nicely played together.

I hope you enjoy this nostalgic flow, just as i do. (please leave a message if you have also created this flow:-)

Comments

  • I got a koekoek, basicly from the day i got homey i made this same flow :smiley: 
  • Nice flow and definitely going to test it! 
  • Me and my wife are gamers, and its easy to forget about the time while playing. This really helps a lot! :-)
  • Nice flow and I want to try it but I don't know how to play a sound?
    I downloaded the mp3 file but i dont know what to do! Please help?

  • Sorry, with the soundboard app indeed. I forgot it's not installed by default. Off course you corks use any sound you like. This clock sound fades nicely while the voice of homey takes over after 5 seconds.
  • After installing the soundboard app you can add the MP3 in the setting under the soundboard section.
  • Thx @nklerk I will try! 
  • Is it possible with a koekkoek.mp3 that counting up with the time?

    OMG in dutch: Is het mogelijk om een koekoek naar mate van tijd meer te laten horen? Dus bij 2 uur 2 keer koekoek.mp3 bij drie keer etc etc? 
  • Yes it is very possible to play a different sound every hour. or to play one sound twice or eight times for that matter.

    Unfortunately You will need to create a flow for every hour you want to hear the sounds.
    Here is a flow that you could use as a reference:



    This is how 8:00 would look like, so homey playing 8x an koekkoek mp3 sound. and on every sound i added 1 second delay. you will need to find the right sound and play with the timing but this you will have to do for every hour that you want to hear the koekoek. :-)
  • nklerk said:
    Yes it is very possible to play a different sound every hour. or to play one sound twice or eight times for that matter.

    Unfortunately You will need to create a flow for every hour you want to hear the sounds.
    Here is a flow that you could use as a reference:



    This is how 8:00 would look like, so homey playing 8x an koekkoek mp3 sound. and on every sound i added 1 second delay. you will need to find the right sound and play with the timing but this you will have to do for every hour that you want to hear the koekoek. :-)
    Ore you make one flow, and give the next sound inline a delay of 60 minutes then 120 minutes etc
  • casedacaseda Member
    edited August 2016
    Or you can make a 3 flow one, which survives any reboot what so ever.
    Since number variables (it needs to be a number variable) can't handle colon ( : ) you will only get the hours, making use of a "bug" which won't be fixed (so future proof): (well... hopefully)

    This will make it so it wont go more often then 12 times when it's after 12 o'clock

    This will loop it until the variable gets to 0 and thus play the sound  for every hour


    If you want to disclose some hours (for example if you don't want to have it at night) just add the corresponding extra [AND] card (example: not earlier then 6 in the morning add [ "time is greater than" : 6 ] to the first flow

    Disclaimer: i have not tested if it will loop properly only if the hour counts works, but can't think of any reason why it shouldn't work
  • Although I like the flow simplicity I would love to see something like blocky that would make such actions more easy
  • But homey is not a "blocky" system, it works with flows.
    The end result is pretty much the same, just separated into 3 different rows
  • caseda said:
    Or you can make a 3 flow one, which survives any reboot what so ever.
    Since number variables (it needs to be a number variable) can't handle colon ( : ) you will only get the hours, making use of a "bug" which won't be fixed (so future proof): (well... hopefully)

    This will make it so it wont go more often then 12 times when it's after 12 o'clock

    This will loop it until the variable gets to 0 and thus play the sound  for every hour


    If you want to disclose some hours (for example if you don't want to have it at night) just add the corresponding extra [AND] card (example: not earlier then 6 in the morning add [ "time is greater than" : 6 ] to the first flow

    Disclaimer: i have not tested if it will loop properly only if the hour counts works, but can't think of any reason why it shouldn't work
    I have made your flow with the clock.mp3 file, but it only sounds 5 times (after 22:00) in a test flow. 
    What .MP3 file did you use, my file takes 7 seconds to play, so I set the delay on the decrements at 7 sec's.
    But still only 5 clock's are heard! 
  • @ThijsDeJong ;
    I did not use any mp3, it's just an example file name. 
    Do you lower the counter with 1 every loop?

    If so, since it's 7 seconds its pretty easy to see what the counter does in the settings, just change the timing from 1 hour to every 10 minutes for testing.
    (or every 1 minute and remove the sound card)
  • caseda said:
    @ThijsDeJong ;
    I did not use any mp3, it's just an example file name. 
    Do you lower the counter with 1 every loop?

    If so, since it's 7 seconds its pretty easy to see what the counter does in the settings, just change the timing from 1 hour to every 10 minutes for testing.
    (or every 1 minute and remove the sound card)
    I can see what happens, Homey recrudesces the variable with 2.. ? WHY?
  • ah figured it out, something i missed, its the way homey handles things, it thinks the variable changes 2 times very short after each other.

    solution, add a 1 seconds delay to the math card
  • I restarted Homey (PtP) and now it works. I'll ad the 1 sec to the math card, just to be sure..
    THNX
This discussion has been closed.