We have moved at community.getvera.com

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

Offline asggold

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #150 on: February 22, 2015, 02:14:07 pm »
I have read though most of the full post but had a quick question about using this to notify and if it is possible:

What I am looking to do is use this countdown timer to start when I run a scene and send me a notification if certain things are not done as requested by the scene.  Basically, I would like to have a notification sent to me if after I click any "Mode" other than "Home" my Alarm does not arm.

Do you know if this is possible using this plugin on UI7?

Thanks!

Offline conchordian

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +4/-1
Re: Countdown timer plugin (UI5)
« Reply #151 on: March 02, 2015, 12:10:16 am »
You are welcome to edit the plugin's device XML file to point to a local path, and install the icon files directly on your Vera. I leave this for you as an exercise, if you feel strongly enough about it.

I thought I had this down pat, but the icon won't show up now, for some reason.  I edited the D_CountdownTimer1.json file, but it doesn't seem to work.  Any ideas, please?

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: Countdown timer plugin (UI5)
« Reply #152 on: March 02, 2015, 03:26:35 am »
Try: "flashicon": "icons\/hourglass.png", for UI5

or "default_icon": "hourglass.png", for UI7.

« Last Edit: March 02, 2015, 03:28:45 am by RexBeckett »

Offline conchordian

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +4/-1
Re: Countdown timer plugin (UI5)
« Reply #153 on: March 02, 2015, 03:44:02 pm »
Try: "flashicon": "icons\/hourglass.png", for UI5

or "default_icon": "hourglass.png", for UI7.

Thank you, the top one worked.

Offline Theboob

  • Full Member
  • ***
  • Posts: 169
  • Karma: +2/-0
Re: Countdown timer plugin (UI5)
« Reply #154 on: May 26, 2015, 11:40:04 pm »
Hi Futzle. Not sure if this bug was mentioned, but here goes. I'm using UI7 (for what it's worth). If I set the duration on the Variables panel, and click in some other field, it indeed says that it has updated the variable. However, if I leave the panel and come back in, it still has the old value.

If I reload the page (CTRL R with IE), it does have the newer value.


Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #155 on: May 27, 2015, 01:04:45 am »

Not sure if this bug was mentioned, but here goes. I'm using UI7 (for what it's worth).

There are innumerable bugs like that in UI7. After all this time there still isn't any direction from MCV about how plugins are supposed to force a variable value change to be saved, and for the plugin to be notified that it has to reload the value. Unfortunately I can't do anything about it because it's on MCV's side of the plugin contract.

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: Countdown timer plugin (UI5)
« Reply #156 on: May 28, 2015, 09:43:00 am »
What contract ?

Offline BigE-TX

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #157 on: June 18, 2015, 08:55:19 pm »
Hummm.  Just trying to setup a siren tied to a door switch using countdown timer.  Have created open scene, close scene, & siren scene.  Open starts timer unmuted, closing door cancels both the timer and turns off alarm [presuming it was on to start with].  The challenge I have is with the countdown itself in UI7.  Under the device advanced screen I clicked on variables tab and input 600 [presumably seconds] for the duration and saved it; however, the alarm seems to go off after about 10 seconds -coincidentally the same number I originally input in the set duration of the device control screen [it now shows to be empty].  Is this the new norm in UI7 or am I configuring it incorrectly?  Any thoughts?

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #158 on: June 18, 2015, 09:18:14 pm »

Is this the new norm in UI7 or am I configuring it incorrectly?

There is a certain amount of ritual in getting a variable change to stick in UI7. What I do is to edit the variable on the Advanced tab, then go straight to Apps > Develop Apps > Serial port configuration > Reload Luup. That'll restart the plugin and cement the new value I entered.

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: Countdown timer plugin (UI5)
« Reply #159 on: June 18, 2015, 11:02:44 pm »
@futzle

There is one more step to improve success.
Wait one minute after a change before changing the browser page.
There is some bug in Vera that at times causes the AJAX requests to take at least 1 minute to complete.
If you change browser tabs ... it cancels the ajax request before it is completed. This is a Vera/Proxy issue.

Then the rest as you indicated.

Offline BigE-TX

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Re: Countdown timer plugin (UI5)
« Reply #160 on: June 19, 2015, 03:42:22 pm »
 ;D

Thanks guys, this worked like a charm to give my 10 minute timer an update from 10 seconds!  My new ZW080 siren now goes off after the garage frig/freezer door(s) are left open for 10 minutes.  I figure the siren should pay for itself in one or two episodes (which happen every year or so).  Tech support remotely assisted with inclusion ultimately resulting in an alarm icon rather than the light bulb I got with the general zwave inclusion process; noticed a aeon siren under the alarm section of add devices, but appears to bear letters for foreign frequency version. [capture3] so I am not entirely certain that is what we need.

Unfortunately I do not see configuration setting support in scenes for the device to allow for changes to volume level and tone.  Forum threads reference several work-arounds and suggested patches using lua code.  I also see ways to permanently change to the tone and volume using par 37 and establishing multipliers of 256 and adding 1/2/3 to that creating the desired selection rather than the default of 259 [tone1 + volume level 3] incorrectly mentioned in threads as default 13[capture 4].  They also mention things about random alarms in the middle of the night during heals; not something I wish to experience [poor WAF].  Ultimately would be nice to change alert based on which event is generating it...guess I can wait for UI7 patches.

I also  plan on adding some additional logic to the existing zwave temperature sender in the frig compartment to set scenes for the alarm.  For now, next step is the caddx sub-forum.  Thinking I may be able to use some more assistance... ::) as I am a bit stumped with an on-going challenge.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Countdown timer plugin (UI5)
« Reply #161 on: June 19, 2015, 04:54:12 pm »
Thanks for this. I was thinking about creating a timer like this myself until I found this.
I am using it to automatically set the vera house mode to vacation mode (which triggers many other things) after it senses I am in away mode for more than the timer time.
This becomes a 3 scene system:
1. scene 1 to trigger the timer when I go away
2. scene 2 to cancel the timer when I come back home
3. scene 3 to set the house mode to vacation after the timer expires.

Any idea to make it simpler?
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +66/-8
Re: Countdown timer plugin (UI5)
« Reply #162 on: June 19, 2015, 06:20:30 pm »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #163 on: June 20, 2015, 03:06:02 am »
Slight bug in the json file:

So there is.  Thanks.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Countdown timer plugin (UI5)
« Reply #164 on: June 22, 2015, 06:54:05 am »
Source code for this plugin is now at https://github.com/futzle/MiOS-CountdownTimer

I've updated the JSON file to fix the duplicate that a-lurker and amg0 reported.  I haven't yet updated the version on apps.mios.com.