We have moved at community.getvera.com

Author Topic: Where do I start?  (Read 1517 times)

Offline Dignan17

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +2/-0
Where do I start?
« on: June 03, 2013, 10:44:45 pm »
Greetings, folks!

I've been using Vera for about a year now, and while I have a decent number of devices and scenes, I haven't done any kind of scripting or conditional programming. I have no idea where to even start!

For example, lets take two scenes that have been set up on my Vera Lite:

1 - two floor lamps and a light in my foyer turn on
2 - all the lights on the main floor of my home turn on

Scene 1 is set to turn on every day at sunset as a security measure.
Scene 2 is only turned on manually, because we don't want it to turn on if we're not home.
The lights controlled in Scene 1 that are also in Scene 2 have different dim levels in each scene.

So here's the situation: we're at home, and we have Scene 2 turned on because we're around and we want the light. But then at sunset Scene 1 gets run, and the lights change a little.

So here's the question: how do I program Scene 1 to not turn on under certain cirumstances, like whether another scene is active or some lights are already one, etc?

And then, how do I take that and do all the other amazing things that you guys have pulled off. Like automatically setting temperatures based on outside temps. Things like that.

I'd really appreciate the help! Thanks!
« Last Edit: June 07, 2013, 10:27:21 am by Dignan17 »

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Where do I start?
« Reply #1 on: June 04, 2013, 05:18:49 am »
Scenes don't represent states (of lights, or anything else) they are just actions which are triggered by certain other events or schedules.  As such, they are not "on" or "off" or "active", they are transient... they run and go away.

A search of the forum will reveal many discussions on ways to make scene activations conditional.  There are plugins to achieve this too.  PLEG, for example.
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.

Offline Dignan17

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +2/-0
Re: Where do I start?
« Reply #2 on: June 07, 2013, 10:27:02 am »
Thanks, I'll look into PLEG! It seems pretty powerful, so it's going to take me some serious tooling around to figure out how to use it :)

I get what you're saying about scenes not having states (although Authomation and Vera seem to try to imply they do - but they're always wrong...). So then how do I just make a scene conditional on the state of a single device? In the above example, how do I keep scene 1 from coming on automatically if it knows a certain light is turned on, for example?

I'll try to search the forums but I'm not having much luck finding more of a beginner's guide to this...

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Where do I start?
« Reply #3 on: June 07, 2013, 10:46:22 am »
So many posts to choose from on this topic.
Here's a recent one that you may find relevant:
http://forum.micasaverde.com/index.php/topic,14936.0.html

Yes, everyone starts out wanting a beginner's guide, then thinking they'll write one, then not needing one at all.  Then it gets interesting and you're glad the forum is here...

...nobody quite gets back to writing the guide.

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.

Offline Dignan17

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +2/-0
Re: Where do I start?
« Reply #4 on: June 07, 2013, 11:09:09 am »
Haha! Yeah, I can see that. Maybe I'll be that person!

...probably not.

I did write that Tasker/Authomation guide, but it was pretty short.

I'll check out that link and wander around the forums here. I'll ask for specific help if I need it :)

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Where do I start?
« Reply #5 on: June 07, 2013, 01:32:06 pm »
Actually the scene status is not wrong in the app. As long as the conditions are met for the scene, it is considered active. When you create the scene in Vera, under the advanced tab, there is a drop down menu at the top which allows you to choose when the scene is considered active.

- Garrett

Offline Dignan17

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +2/-0
Re: Where do I start?
« Reply #6 on: June 07, 2013, 01:38:53 pm »
Sorry, didn't mean to bad mouth your app. I LOVE your app. I've just though it was odd that it sometimes describes a scene as active when it's definitely not active. I guess I don't understand what that means. I also don't understand what you mean by the drop down box. You have to go into the settings every time to say a scene is active?

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Where do I start?
« Reply #7 on: June 07, 2013, 01:57:47 pm »
When you create or edit a scene in Vera under the web interface, the advanced tab has a drop down to specify when to consider a scene active. Usually it defaults to "when all devices in the scene are properly set".

- Garrett