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.

[Published] CountDown timer (1.0.6)

13

Comments

  • aloftaloft Member
    edited November 2016
    CountDown has been updated to version 1.0.0 

    Added:

    - Start / Stop trigger flow cards ;  can start a flow when a certain timer has been stopped or started
    - Import / export capability for the CountDown configuration ( equal to the BetterLogic app ) 

    There is still an issue of possibly losing timers when timers are running and power is lost.  A structural solution is pending. 
  • Hi

    I'd like to trigger a flow when a countdown timer has only x-seconds left before it's zero.
    How can I do that ?

    Yves
  • @YvesGeffens ;
    that's currently not possible, a trigger is only sent when a timers has reached zero ( or started / stopped ) 

    As a workaround, you could start/stop a simultaneous timer on T-X seconds, so that specific timer will trigger the flow.

    What is your use-case? 
  • GeurtDijkerGeurtDijker Member
    edited November 2016
    I guess at this moment you should start two timers. Maybe someone  can  create a card but personally I don't  have any idea why I should use it now. 
    haha, typing on my tablet wasn't fast enough, @alof posted before I read his msg. 
  • I would like it like this:

    I have a pellet stove. It takes 10 minutes to get it to full power.
    When it's switched of, it takes at least 10 minutes to completely stop.

    I ask Homey to switch on the stove.
    A timer runs for (eg) 3000 seconds.

    I only notice it's switched off when the countdown timer has reached 0, and homey says he's switching off the stove.

    Now, It would be nice if homey can warn me 5 minutes in advance, when the timer has reached 300 seconds (before zero), that homey will turn off the stove in 5 minutes.
    That gives me the chance to ask homey to keep it on for another 1000, 2000, seconds...
    If I notice it to late, I first have to wait until the stove is completely off. I loose 2x 10 minutes, and it's less energy efficiënt.

    And I know it can be done with 2 times, but why not with just one... So, this is a kind request to the creator to make that possible.

    Thanks !
    Yves

  • @YvesGeffens ;

    I am the creator of the app;   I understand your use case, but have to take a look it this is possible and feasible to implement. 
  • Thanks, it's greatly appreciated.
  • @YvesGeffens ;
    An updated version is in the app store, with your use case. What you need to do is the following:

    Trigger: When a Countdown timer is running 
    Condition: State the countdown timer and the number of seconds left .
    Action: whatever action you'd like




  • @aloft ;
    This is so great ! Thank you very much. I'll try it tomorrow.
  • Is there a way to store the value of a Countdown-timer in a variable (with Better Logic) ?
  • TallguyTallguy Member
    edited December 2016
    Is it possible with this app to do the following:
    1. When sun sets start a countdown timer
    2. At a random number of that timer some lights go on
    3. those lights go off when the timer reaches another random number.

    I have this idea to use Homey with this app to fake our presence at home by randomly turning lights on or off during a random time.

    Right now I have this flow in mind:
    Flow #a. When sun sets and timer living room isn't running then timer living room min 0sec, max 600sec
    Flow #b. when timer living room has stopped then turn on lamp living room
  • glijieglijie Member
    edited December 2016

     Why not if nobody is at home then make your light go on/off set your alarm on and move your blinds as you wish?


    Randomly although would be nice  but I don't think that is possible now. or you make a lot of flows for the week days and set for each day other times for turning on/of lights etc.


  • Maybe with the random countdowntimer card?


  • Maybe with the random countdowntimer card?


    :smile: 
  • @YvesGeffens ;
    Version 1.0.1 is published in the app store, with this version you'll have the 'when timer changed' card added with two tokens: name and value . Value is the seconds remaining, so you can use that token for your need.
  • YvesGeffensYvesGeffens Member
    edited December 2016
    Hi @aloft ;

    This is what I made just to test it.

    When I open Insights, a dot is showing up, but the variable is not being loaded with a value.
    I tried to add the card to the 'and' column, but there was no card with a 'value' or 'name' tag, only in the 'if' column.
    If it was available in the 'and' column, I could use a time-date-card that runs every minute or so.
    I think the 'countdown value has changed'-card is not being triggered for some reason. Could that be the reason? Or I'm making a mistake ?


  • @YvesGeffens ;
    You didn't make a mistake, I did ;-)  The card is triggered, but the 'value' token wasn't containing a correct value.

    Unfortunately, the way cards are working, I am not sure if I can add this check in the AND column, I'll investigate that in the near future.

    Version 1.0.3 is now pending approval in the app store. Once it is approved, this bug will be fixed:


  • @aloft ;
    My attempt to make it work with the 'and' column, was a workaround, because it didn't work in the 'if' column. No need to make it available in the 'and' column, if it's working now.

    Thanks again.

    Good job !

  • @YvesGeffens ;
    version 1.0.3 is published, let me know if it  also works in your case ! thanks.
  • YvesGeffensYvesGeffens Member
    edited December 2016
    It's working !
    I now have
    - a Countdown timer (created with the Countdown app)
    - a number-variable (created with Better Logic)



    I'm using a mathjs expression: round( waarde / 100 ),1

    Reason:
    I want this timer to be visible in the same sheet as my temperature-readings.
    Since my timer starts at 2400 seconds, and my temperature is between 20 and 23°C, I simply devide by 100 and round to 1 decimal, so I get this:

    The purple line is the counter, from 2400 to 0, the 3 other lines (cyan, green, brown) are 2 temperature readings and it's average.

    Don't mind the blue line.


    edited because I forgot to thank you @aloft !
  • @Emile ;
    please take a look at the screenshot above, the blue line.
    at approx 5.10PM the value was 7
    at approx 9.00PM the value was 8

    The way the line is drawn here make you think that the value is 8 at 5.10PM, it would be more visually correct if the line before 5.10PM was 1 unit lower, I edited the graph by hand to show you what I mean.


    So the dot's remain on the same place because that is the value at that specific moment.
    But it's not logically to raise the line 1 unit while it's still the same for the whole time.
    Thanks for considering to fix this.
  • Is it possible to ad a 'reverse' countdown option without and with a limit, so to not countdown but count upwards?

    What to use for you might be thinking?

    I give a flow example how usefull this can be:

    start FLOW X: switch on lights on DIM AND start the counter at 0 (onwards)
    if counter = 3600 and X then do THIS (switch all lights max ON)
    if counter = 7200 then do THIS
    if counter > 14400 then this AND stop counter

    Execpt this example you also have a nice/cool way to exact see (and use in flows) the seconds a certain flow has run, at the moment there is no way to calculate the time diff between 2 events/flows.

  • Is there also a way of translating the seconds of the countdown timer to hours, minutes and seconds or could this be added when updating the app. I'm in the progress of creating a flow (in combination with Tasker and Google Maps) which let Homey say how much time is left before I get home. At the moment it will only tell my GF how much time it will take before I get home when she starts a flow using a bitflip. However, she sometimes needs to wait more than a minute on the answer. It would be more convenient if I set my phone to update the remaining travel time every 15 minutes by setting a countdown timer. In that case Homey can directly tell my GF how much time is left on the countdown timer. And then it would be better to let Homey say "Jesper will be home in 20 minutes (and 30 seconds)" instead of "Jesper will be home in 1230 seconds"

    And hopefully it will also be possible to have the countdown timers available on HomeyDash. In that way she only needs to look at the tablet to see when I will be home.

    Off course this is just one of the many things for which you could use this.
  • Countdown 1.0.6 has been released.

    Added features:

    New  'adjust timer' action card : adjust a running timer ( increase or decrease value )
    New 'stop all timers' action card: stop and reset all running timers
  • quakerixquakerix Member
    edited March 2018
    Hi,

    I have just lost all my countdown timer values of all my flows. What happened? 

    Getting the right values took me ages.

    Found an issue on github:
    https://github.com/ralfvd/nl.bevlogenheid.countdown/issues/12
  • aloftaloft Member
    edited March 2018
    @quakerix
    So far as I can see, the values are not lost, but cannot be seen in a flow.  The flows still work, but you cannot edit the flow without inputting a value.  That is definitely a bug which was introduced by enforcing more strict input validation. I've reverted the change and a new version is awaiting approval from Athom. <Edit: new version just got approved, so your countdown app will update in a couple of hours). 

    I am sorry for the inconvenience. Testing of all possibles scenarios didn't cover this. I've extended my testing scenarios for this kind of error. 
  • I'm trying to use Adjust Countdown Timer card, and (As far as I can tell, since I can't see timers in the homey app) it seems to set the timer to that value rather than adding the value (as implied by the documentation)

    Is there a way to add time to the timer? (i.e timer running and is at 10s, i want to add 300s when motion detected so timer is now 310s)

    Thanks
  • RocodamelsheRocodamelshe Member
    edited March 2018
    vaderag said:
     since I can't see timers in the homey app)
    Did u try settings/countdown?
    And the card works like u said, it's adding the seconds to the timer.
  • aloftaloft Member
    There seems to be a bug in 1.2.4 , which causes the 'adjust timer' action card to not execute in certain conditions. 

    I have fixed this, and the app is pending approval in the app store.

    Sorry for all these introduced bugs these last couple of days; too hasty programming and not enough testing all the possible scenarios. 
  • aloft said:
    There seems to be a bug in 1.2.4 , which causes the 'adjust timer' action card to not execute in certain conditions. 

    I have fixed this, and the app is pending approval in the app store.

    Sorry for all these introduced bugs these last couple of days; too hasty programming and not enough testing all the possible scenarios. 
    Ah, okay, that must be it!
    Will wait for the update :)
Sign In or Register to comment.