We have moved at community.getvera.com

Author Topic: long running scene  (Read 259 times)

Offline invenire1

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
long running scene
« on: August 04, 2018, 12:19:30 pm »
Hi,

Given:
- on closing and re-opening a water-tap (Popp), the next hose/sector in the garden is chosen to be watered (Gardena)
- the configuration is non-proven, so extra checks are sensible
- when a check fails, a STOP-flag can be set which is checked on each action


I'm considering how to program the following on Vera, in "mini specification" format:
for sector = 1 to 6
   open water-tap
   after 3 minutes: check whether water-tap really is opened
   after 30 minutes: close water-tap
   after 33 minutes: check whether water-tap really is closed
   after 40 minutes (10 minutes no watering): ready
   

What is to best way to program this?
or1) UI7
It will get distributed over various scenes and delayed actions, in one way or another
or2) PLEG
Using re-trigger with right condition might simply somewhat.
There is also the automatic logging and restart when Vera goes down.
or3) LUA/LUUP
In the ideal situation of Vera not going down, is this the way to program most similarly to the "mini specification", in just 1 scene?
Or is it not possible to have 1 scene running in Vera for hours ??

Thanks in advance for the advice,
Sander

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: long running scene
« Reply #1 on: August 04, 2018, 01:15:19 pm »
If you understand PLEG, then go ahead with that.

You might also look at some other solutions like the Reactor plugin, which may be more comfortable for you to use.

Vera scenes would be a last, and ineffective, resort.  The chance of a reload ruining the timing is just too great.  Never, ever, rely on scenes with long delays.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.