Author Topic: How Does Scenes Work in Vera  (Read 408 times)

Offline jackieni

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
How Does Scenes Work in Vera
« on: July 22, 2017, 09:29:09 pm »
When a User uses Vera, they are able to set scenes which can be time based or sensor based. Are the preferences and the processing of sensor and time data stored and done on the Vera Hub or on Vera servers and then the servers send instructions to the Hub to execute?

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 906
  • Karma: +19/-18
    • Worthington Engineering, Inc.
Re: How Does Scenes Work in Vera
« Reply #1 on: July 25, 2017, 06:35:11 pm »
I understand all of the logic executes within your network - one of the reasons I chose Vera to not rely on a remote server except when accessing it remotely.
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline John M.

  • Administrator
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +44/-4
    • getvera.com
Re: How Does Scenes Work in Vera
« Reply #2 on: July 26, 2017, 12:20:25 pm »
Scenes logic and and data are not cloud dependent.


The only type of scene where it might rely on cloud is the "sunset/sunrise"  trigger scene because it takes this value from the cloud.


Everything else is local, and it does not inquiry the cloud. It might update the cloud, with alerts, if user has selected so, but the scene is still run, even if event server is not accessible.
John.M. ▾ Senior Customer Care Advocate
Vera Control, Ltd. ▾ Smarter Home Control  ▾ support@getvera.com ▾www.getvera.com ▾ +1 (866) 966-2272

HOURS OF OPERATION (Pacific Time Zone, UTC -8 )
Monday - Friday   12:00 am ? 06:00 pm
Saturday - Sunday   04:00 am ? 06:00 pm

Offline jswim788

  • Hero Member
  • *****
  • Posts: 538
  • Karma: +29/-2
Re: How Does Scenes Work in Vera
« Reply #3 on: July 26, 2017, 12:34:50 pm »
The only type of scene where it might rely on cloud is the "sunset/sunrise"  trigger scene because it takes this value from the cloud.

Can we get a definitive answer on whether sunset/sunrise is calculated in the cloud or not?  It is entirely possible to calculate this in lua from the given location (latitude/longitude), but I understand that the existing Vera code might not do this.

Also, is the luup.is_night() affected by this as well?  Probably yes?

I will re-code my scenes to remove this dependency if it is cloud reliant.

Online akbooer

  • Master Member
  • *******
  • Posts: 5234
  • Karma: +226/-67
  • "Less is more"
Re: How Does Scenes Work in Vera
« Reply #4 on: July 26, 2017, 01:31:24 pm »
The only type of scene where it might rely on cloud is the "sunset/sunrise"  trigger scene because it takes this value from the cloud.

That seems somewhat perverse.  Given that you have location and time locally, the calculation is relatively straight-forward, and very well tested.  For example...

http://aa.usno.navy.mil/faq/docs/SunApprox.php
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9741
  • Karma: +737/-136
    • RTS Services Plugins
Re: How Does Scenes Work in Vera
« Reply #5 on: July 26, 2017, 01:52:32 pm »
What part of John's answer did you not read.
Scenes, even sunrise or sunset triggered scenes
DO NOT NEED THE INTERNET!!!!!



Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2410
  • Karma: +112/-139
Re: How Does Scenes Work in Vera
« Reply #6 on: July 26, 2017, 03:14:25 pm »
Actually Richard, John M. stated that sunrise/sunset triggered scenes MIGHT rely on the 'cloud'. Indicating to me he's not sure and would have to check with the developers. I'm hoping that's the case and he can provide us with the definitive answer to this question...
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Online akbooer

  • Master Member
  • *******
  • Posts: 5234
  • Karma: +226/-67
  • "Less is more"
Re: How Does Scenes Work in Vera
« Reply #7 on: July 26, 2017, 04:12:03 pm »
What part of John's answer did you not read.

This bit? ...

The only type of scene where it might rely on cloud is the "sunset/sunrise"  trigger scene because it takes this value from the cloud.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline John M.

  • Administrator
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +44/-4
    • getvera.com
Re: How Does Scenes Work in Vera
« Reply #8 on: July 27, 2017, 08:39:27 am »
"might" is there, because Vera units do not have an internal clock, and relies on NTP servers for sync. On short to medium term, or short term internet loss, if the unit is not in a bad state with lots of reloads, it should keep time pretty well and this should not pose an issue, otherwise it will drift, and of course calculate sunrise/sunset incorrectly.



However, all other types of logic and scenes are and will always be calculated and stored locally on the unit, this is how the engine is built.
« Last Edit: July 27, 2017, 08:45:17 am by John M. »
John.M. ▾ Senior Customer Care Advocate
Vera Control, Ltd. ▾ Smarter Home Control  ▾ support@getvera.com ▾www.getvera.com ▾ +1 (866) 966-2272

HOURS OF OPERATION (Pacific Time Zone, UTC -8 )
Monday - Friday   12:00 am ? 06:00 pm
Saturday - Sunday   04:00 am ? 06:00 pm

Online akbooer

  • Master Member
  • *******
  • Posts: 5234
  • Karma: +226/-67
  • "Less is more"
Re: How Does Scenes Work in Vera
« Reply #9 on: July 27, 2017, 08:56:55 am »
Ah, that makes much more sense, thanks.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P.
Razberry, MySensors Arduino, HomeWave, AltUI, DataYours, openLuup, ZWay, ZeroBrane Studio.

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2410
  • Karma: +112/-139
Re: How Does Scenes Work in Vera
« Reply #10 on: July 27, 2017, 12:24:42 pm »
John M. +1 on the Thank You as now it makes sense. It seems Vera has the NTP servers hardcoded? Can we change them as I can easily standup a backup NTP server on my Unix box and point them to there.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline John M.

  • Administrator
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +44/-4
    • getvera.com
Re: How Does Scenes Work in Vera
« Reply #11 on: July 27, 2017, 12:51:36 pm »
Vera uses openwrt's default location and NTP servers under /etc/config/ntpclient and they can be changed at will. But I think this has already been discussed on the forum and even applied and working a local LAN functional NTP server. Now, only if I can still find that discussion topic.


Few details here as well: http://wiki.micasaverde.com/index.php/Time_Syncronization#Installing_the_NTP_client
« Last Edit: July 27, 2017, 12:56:57 pm by John M. »
John.M. ▾ Senior Customer Care Advocate
Vera Control, Ltd. ▾ Smarter Home Control  ▾ support@getvera.com ▾www.getvera.com ▾ +1 (866) 966-2272

HOURS OF OPERATION (Pacific Time Zone, UTC -8 )
Monday - Friday   12:00 am ? 06:00 pm
Saturday - Sunday   04:00 am ? 06:00 pm