Author Topic: Countdown timer plugin (UI5)  (Read 96685 times)

Offline TheKorn

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +3/-2
Re: Countdown timer plugin (UI5)
« Reply #180 on: August 17, 2015, 06:24:16 pm »
Clicking the Restart button on the Countdown Timer device works for me.  Try that.

Sorry for the fire drill; while looking at logs to write this reply I realized I had put in some lua code into the scene that prevents running the scene if the lights are already on.  So when the motion sensor trips a second time, the lua code runs, checks if the lights are on and bails.  That's why the restart isn't working, it wasn't actually getting called.  D'oh!

How do I check if a countdown timer has time on it via luup?  Or alternatively, just determine that the countdown timer is still active and not expired?

Thanks!

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #181 on: August 17, 2015, 06:29:47 pm »
How do I check if a countdown timer has time on it via luup?  Or alternatively, just determine that the countdown timer is still active and not expired?

Code: [Select]
luup.variable_get("urn:futzle-com:serviceId:CountdownTimer1", "Counting", deviceNumber)will return "0" if the timer is inactive and "1" if it is active.  Other interesting variables are "Muted", "Remaining" and "DueTimestamp".

Offline TheKorn

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +3/-2
Re: Countdown timer plugin (UI5)
« Reply #182 on: August 17, 2015, 06:32:27 pm »
Code: [Select]
luup.variable_get("urn:futzle-com:serviceId:CountdownTimer1", "Counting", deviceNumber)will return "0" if the timer is inactive and "1" if it is active.  Other interesting variables are "Muted", "Remaining" and "DueTimestamp".

Thanks much!

Offline hcoyote

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #183 on: August 23, 2015, 02:14:00 am »
This is happening to me too.  I can't look at it now but I will in the next 24 hours.  I too did nothing to my Vera so something automatic has happened.  The irony...

Edit: Here's what I did to fix it. Essentially I dissociated my Countdown Timer devices from the plugin, and then removed references to the plugin from the app store list.  Finally I put the plugin's source files back onto the Vera.

<cut instructions>

With these steps, the plugin is now acting as if it were manually installed.  It's holding good for me after 15 minutes.

MCV: You need to fix the store.  Anyone who installs this plugin afresh will get stuck in this loop and blame me.

This is still happening.  :-(

I happened to install fresh and immediately broke my Edge.

Thanks for posting the instructions on backing it out.

Would be nice if MCV had an easier way to disable plugins in the event of repeated startup failures.

Offline vituz

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #184 on: August 30, 2015, 09:03:56 am »
I don't know what's wrong with this app... I installed it on my micasaverde and it went into a loop... it's always trying to download plugin #1588... then it says "please wait", then it starts again... I then wanted to uninstalled the app but it did not show in my apps... so I tried rebooting... now the app shows but I cannot uninstall it (I click uninstall and nothing happens). What can I do?

Offline vituz

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #185 on: August 30, 2015, 09:14:43 am »
I finally solved it... I managed to untick "auto-update" and at that point I was able to uninstall. I hope it helps anybody who might face this...

Offline tomgru

  • Hero Member
  • *****
  • Posts: 1403
  • Karma: +18/-6
Re: Countdown timer plugin (UI5)
« Reply #186 on: May 05, 2016, 03:00:23 pm »
Any changes to this that might have been realized through auto updates with the app?  I'm having some reboot issues, and seeing a lot of log posted about this.  just curious.

Bump... still curious???
« Last Edit: May 08, 2016, 03:58:31 pm by tomgru »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Countdown timer plugin (UI5)
« Reply #187 on: May 09, 2016, 07:09:00 am »
This plugin has literally not changed in 11 months.  I can't speak for the Vera plugin runtime in general.

Edit: spelling
« Last Edit: May 10, 2016, 07:35:21 pm by futzle »

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Countdown timer plugin (UI5)
« Reply #188 on: September 23, 2016, 12:39:16 pm »
Hi

I am running a VeraEdge on UI7 with the latest firmware.

I installed the Count Down Timer plug-in today and set its duration to 60s. I was expecting when the timer is started it would count down from 60 to 0 and then finish.

However for some reason when it reaches 0 it then starts over again counting down from 60 seconds and it does this over and over.

Any ideas ?

Thanks

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Countdown timer plugin (UI5)
« Reply #189 on: September 23, 2016, 01:20:48 pm »
Hi

I've just manually uploaded the plug-in files to Vera from the Github page here.

The plug-in version was the same however at v 8.0.

I am assuming this is a bug? and it should not keep on restarting the timer over and over but it should just complete and finish.

Thanks
« Last Edit: September 23, 2016, 02:28:43 pm by cw-kid »

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Countdown timer plugin (UI5)
« Reply #190 on: September 23, 2016, 02:30:04 pm »

If I remove the trigger from the scene that the count down timer has completed.

And then on the count down timer device itself, if I manually press the start button it stops at 0 and does not restart the counter.

So the restarting over and over thing seems to be related to the trigger. I used the Timer completes while not muted option.

If I add the trigger back in to my scene then when the counter reaches 0 my scene is run, BUT the count down timer is restarted again Why ?

Very strange indeed.

As a work around in the scene that is triggered by the count down timer, I have added a 30 sec delay and an action to then cancel the timer.

Thanks
« Last Edit: September 23, 2016, 02:36:10 pm by cw-kid »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #191 on: September 23, 2016, 06:57:19 pm »
If I add the trigger back in to my scene then when the counter reaches 0 my scene is run, BUT the count down timer is restarted again Why ?

At a guess, I'd say that the scene that is run by trigger is restarting the timer, either directly (as part of its actions) or indirectly (the scene modifies other devices, which trigger another scene that restarts the timer). Causal loops are possible with the Countdown Timer, because sometimes you might want to have the effect you're seeing deliberately. But you have to be careful to allow an escape from the feedback.

Watch the Luup log when the timer runs out. It should tell you what is getting triggered to restart the timer.

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Countdown timer plugin (UI5)
« Reply #192 on: September 24, 2016, 09:35:50 am »
Hi

I made a mistake, it seems my "Burglar Alarm Delayed" scene was also starting the timer, along with the first scene "Burglar Alarm" causing a loop.

I have removed it from the delayed scene and now its working and the timer stops after 60 seconds and does not restart again.

Maybe I added it by mistake, but I have also seen Vera add actions in to scenes that I never put there, which is weird.

Thanks

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Countdown timer plugin (UI5)
« Reply #193 on: October 01, 2016, 11:25:19 pm »
Hi guys,

Please forgive me for not reading the 13 pages of the thread before posing a question. I've been manually programming IR pronto codes for two evenings now and I find that my attention span is pretty much non-existent at this point (the beer probably doesn't help).

I recently bought a cheap RGB LED light strip controller with 20 meters of lights, and I'm working on building a new light hood for one of my fish aquariums. So far I've programmed the necessary IR codes into my Vera for a USB-UIRT. My plan is to change the colors at intervals to sort of simulate a sunrise, so I'll move through dark blue to light blue, eventually end up at white and then cycle down at the end of the day through some yellow, amber and reds.

What I hope to accomplish is to build a system that I can set to cycle through the routine on its own with no intervention when I'm not home for a few days, but when I'm present I'd like to be able to start the cycle manually since the time that I wake up varies and the tank is beside my bed. I don't feel like being woken up by lights shining in my face. At this point, I'd like to set something up that's simple and when I'm feeling more energetic I'll probably take a look at PLEG.

Would this plugin be the answer and if so, can you give me an idea of where to start? Right now I just have a bunch of scenes for (one each color).

Thanks!
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person. (I guess I'm "Chaotic Neutral").

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #194 on: October 01, 2016, 11:42:13 pm »
A Countdown Timer could be part of a complete solution, but your desire to have it run unattended when you're not at home, and on demand when you are at home, puts it out of reach of "something simple".  You'll need to supplement it with some Virtual Switches or similar to tell Vera whether it should act on its own or on your command.  I'm sure that most people reading would be thinking at this stage: Use PLEG; it's designed for this.

I do use Countdown Timers for a wakeup routine myself, with Philips Hue lamps (but that detail should be irrelevant).  I have four timers of different durations (1 minute, 5 minute, 15 minute, 60 minutes), and one scene that Starts all of the timers synchonously.  Then I have four more scenes, each of which triggers on a different timer's Timer Completes While Not Muted, sending different colours and brightnesses to the lamps.  It shouldn't be too hard to fit this model to your existing scenes.

Where this starts to break down is scalability: you need several timers, one scene to start them all, and one scene for each of the timers' completions.  Which is one of the reasons why PLEG exists.