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.

Pendule Clock - customized version

htilburgshtilburgs Member
edited June 2018 in Ideas & Suggestions
I like the idea of the Pendule Clock as mentioned here: 
https://forum.athom.com/discussion/1789/my-favorite-flow-the-pendule-clock

In the existing flow everything works, but..... I don't like Homey telling me (in dutch) "het is 17 uur". I like to hear "het is 5 uur". So I made a customized version of the flow. Use it as you like.

Step 1 - Converting time
  • Every hour
  • Fill a Better Logic variable "Klok" (NUMBER) with a number. Example: 17:00 * 24 becomes 5


Step 2 - If time before 13:00
  • When variable "Klok" changes
  • And time is before 13:00 hour (not greater than 12)
  • And time is between 08:00 and 22:00 
  • Play sound "cuckoo_clock.mp3" (can be everything) - Soundboard App
  • Say "It is xxxx hour" - input from variable "Klok"


Step 3 - If time after 12:00
  • When variable "Klok" changes
  • And time is after 12:00 hour (greater than 12)
  • And time is between 08:00 and 22:00 
  • Extract 12 from variable "Klok" and put this in Better Logic variable Tijd (NUMBER). Example: 17 becomes 5
  • Play sound "cuckoo_clock.mp3" (can be everything) - Soundboard App
  • Say "It is xxxx hour" - input from variable "Tijd"


I would like to combine step 2 and 3 into one flow, but no luck yet.
If this works I will post an update.

Comments

  • JPeJPe Member
    edited June 2018
    My solution is:
    Nieuw Uur(1)

    Nieuw Uur(2)


    did not try your:  Fill a Better Logic variable "Klok" (NUMBER) with a number.
    Example: 17:00 * 24 becomes 5
    Looks promising, will try it too.
    ---------------------------------------------------------------
    Edit: done try: looks perfect (first flow not changed, only Nieuw Uur(2) is changed) <3

    Rem: The card "Execute mathjs expression", I have given a delay of 1 second to be sure the Set a variable is done first. The "Zeg iets" card has a delay of 5 seconds to wait for the clock.mp3.

  • Ok, didn't know that you can start a flow from a flow. 
    Going to look into that, seems promising and 1 flow less....
  • htilburgshtilburgs Member
    edited June 2018
    JPe said:
    My solution is:

    Edit: done try: looks perfect (first flow not changed, only Nieuw Uur(2) is changed) <3

    Rem: The card "Execute mathjs expression", I have given a delay of 1 second to be sure the Set a variable is done first. The "Zeg iets" card has a delay of 5 seconds to wait for the clock.mp3.

    I Like your flow better than mine and it's more logic. And not to forget, it uses only 2 flows instead of 3. I converted it to my parameters and going to use yours. 
  • JPeJPe Member
    @htilburgs ; Think soo, thanks to your idea of setting the variable, I use this now too.
  • My clock has some added functionality inspired by my 30 year old Casio Melody watch :)
    Great fun!

    It chimes each hours the number of hours, and each half hour 1 time.
    At noon it plays "big ben" Westminster
    It also says the time in a normal way, it is 11 o clock, or it's half pas 10
    When it's my birthday, it sings happy birthday each hour
    At christmas it plays Jingle bells each hour

    It does not do all this when we are asleep or away, and everything works even if homey is reset
    It does take a lot of flows though haha :) But it's a great thing to have in Homey
  • JohnLuisJohnLuis Member
    edited June 2018
    Post deleted by Moderator
Sign In or Register to comment.