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

Run a flow once per day

mgeorgievmgeorgiev Member
edited June 2017 in Questions & Help
Hi fellow Athomers, 

I just started to play with Homey. I'm looking into a way to run a 'morning greeting' flow only once per day. The logic should be if it's after 6AM, we're at home and the motion detector in my living room is activated I would like homey to greet me and play, let's say, the weather forecast. Any idea how can I limit this to a single run per day (like a counter if >1 then do not run)? 

Apologies if it has been addressed elsewhere, I have not managed to dig it out. 

Cheers, 

Milko
Tagged:

Comments

  • Maybe u could try the Candy app from the AppStore. In the AND colom u could use the "flow has not run for 17 hours" or something like that.
  • jjtbsomhorstjjtbsomhorst Member
    edited June 2017
    If you install better logic you can create a Boolean variabel. Next is to create a flow that will validate I'd it's 6 in the morning and if the variable is false and you are home. If this is the case you let homey read the news or something similar and set the variable to true. 

    Next is to set a action to set the variable to false again 24 hours later (you can do this with the little clock in the upper right corner). This should work. 

    I will add a screenshot to this post when I'm home again. 


    @mgeorgiev


    I added the screenhot. What you need for this are the following: 

    1) Better logic (https://apps.athom.com/app/net.i-dev.betterlogic)
    2) RSS (https://apps.athom.com/app/eu.jeroensomhorst.feedreader)
    3) A motion detector ;) 
    4) A phone with the homey app

    How to get it working? 

    First of all create a new boolean variabel in the better logic settings and call it opgestaan ( Dutch for got up..) 
    Second specify in the and column that you want to have this flow running after 06:00 in the morning, that you need to be home and that this boolean is set to false
    Last but not least add the RSS reader to the then column and add for instance the rss feeds of nos.nl to it. 
    Switch the boolean 'opgestaan' to true
    Switch the boolean 'opgestaan' to false with a timeout of 1200 minutes (20 hours or maybe 23 as long as its in a timespan that you don't trigger that device.

    You also add a extra card to the then column so that Homey wakes you up but that is up to you.
  • If you install better logic you can create a Boolean variabel. Next is to create a flow that will validate I'd it's 6 in the morning and if the variable is false and you are home. If this is the case you let homey read the news or something similar and set the variable to true. 

    Next is to set a action to set the variable to false again 24 hours later (you can do this with the little clock in the upper right corner). This should work. 

    I will add a screenshot to this post when I'm home again. 
    Cool, thanks mate!
  • Also without better logic this is possible by the standard logic of Athom. Just add a logic card with a boolean (true/false) and set this boolean after the flow has run to true and use it in the middle column (And/En)  that is has to be false to run the flow. Once a day (for example every day at 0000) you reset the value to false/no/nee.

     You can find your variable then also in the tags so you can see the actual state. 


  • Lol... as many options as members...

    Following the KISS principle I would setup 2 flows:
    Flow 1: motion alarm triggered THEN greetings + disable flow 1
    Flow 2: time = 6:00 THEN enable Flow 1

    No need for any (better) logic values / additional apps...  :p
  • Thank you all, a bunch of good ideas to test :)
  • Lol... as many options as members...

    Following the KISS principle I would setup 2 flows:
    Flow 1: motion alarm triggered THEN greetings + disable flow 1
    Flow 2: time = 6:00 THEN enable Flow 1

    No need for any (better) logic values / additional apps...  :p
    Thanx, this one works for me just fine!
Sign In or Register to comment.