[ANSWERED]Rather advanced condition evaluations

Posted on
Tue May 06, 2014 4:56 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

[ANSWERED]Rather advanced condition evaluations

I have started to look into converting my HA system to Indigo.
Today I am a Vera user, but I am starting to get limited by the lacking memory and speed of the Vera light (I have to of them).

So I want to start by checking if my most used condition can be "converted" to indigo. I use a plugin called PLEG to run my logic on Vera.

In my bathroom I have a fibaro dimmer module and a motion sensor. The fibaro dimmer module can as I am sure you know be operated locally and remotely.

What I want my logic to do:
1 On daytime turn the light to 100% when movement is detected. Turn off after 20 minutes if no movement.
2 On night time turn the light to 5% when movement is detected. Turn off after 10 minutes if no movement.
3 If the light is turned off and on by the manual switch enter manual mode and turn off light after 1 hour.



Is this possible to do with Indigo?
Is it possible to do sequential logic in Indigo? Something is true if light came on after motion.

Hope someone can share their thoughts.
regards

Håvard

Posted on
Tue May 06, 2014 5:20 am
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Rather advanced condition evaluations

Welcome! I, too, moved from Vera last summer. I could not be happier with Indigo.

I'll take a stab at these.

What I want my logic to do:
1 On daytime turn the light to 100% when movement is detected. Turn off after 20 minutes if no movement.


This one should be a simple TRIGGER. The Indigo TRIGGER event requires a TRIGGER, can have CONDITIONS, and results in ACTIONS. This is all done via the GUI.

The TRIGGER can be a change in almost anything. In your case it would be 'motion sensor turns on' or whatever.

The CONDITION would be to check the variable 'is daylight' is true.

The ACTION is to turn on the light, then auto-off after 20 minutes. If the trigger gets re-triggered within the auto-off time period, the timer starts over.

Your question #2 would be handled with a similar trigger. I'm not really sure on your #3. How would you determine the switch is manually turned on vs. an indigo action?

You can also embed scripting (python or applescript) in the ACTIONS tab for further conditional checks.

I was able to convert my entire Vera setup to Indigo within a few hours. The UI with indigo is so much better than Vera in my opinion. Changes, tests, viewing event log for issues, etc. is a pleasure. I run indigo on a mini, but do programming from my macbook using the indigo client.

Posted on
Tue May 06, 2014 7:41 am
DomoPat offline
User avatar
Posts: 210
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Rather advanced condition evaluations

#3 will also be a trigger on the switch state becoming "ON" and auto-off after one hour...

Posted on
Wed May 07, 2014 3:57 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Rather advanced condition evaluations

Thank you for your answers. Lets just say that I am very eager to make this work. I just want to make sure I dont lose any important functionality that I have today.

I have played around with Indigo for some years now, but have not used it as my primary controller.
For some days ago I upgraded to Indigo 6, and this is what got me started thinking about converting.
Anyone know if it is possible to run the Vera as a secondary controller to Indigo? I also have some devices that is not currently supported by Indigo.

I'm not really sure on your #3. How would you determine the switch is manually turned on vs. an indigo action?


With the PLEG plugin I can set a sequential expression that is true if light was turned on less that 3 seconds after a motion detection. I assume that if this is true then the light was automatically turned on.
I dont doubt that this is possible via the scripting, but I was wondering how far I could take it without coding.

As a reference this is my auto on condition I use today:
DayPlan and !LightOn and Motion and (!LightOn; Motion)

Translation:
If it is Day and Light is off and there is motion and Light was off before there were motion.
Then this condition is true, and light is turned on.

Håvard

Posted on
Wed May 07, 2014 12:38 pm
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Rather advanced condition evaluations

You can probably achieve that using a variable.
Create a trigger that has an action to update a boolean variable to true if triggered and the condition is met (is it day etc.)
You can use that variable as your condition in the schedule or trigger for your "if button is pressed" trigger.

I have a timer device (timers and pesters) of x hours that gets updated when there is motion and counts down to 0 from 4 hours.

Trigger: On Motion
Condition: If Day = False and Light = False and Timer = False
Action: Light on

You just need a trigger to set the Timer on motion to 3 seconds.

You can do parenthesis as such by clicking the "+" button with the option key held down in the condition so you can say in the condition "All" must match, but have sub sections within the All condition that say "Any"... See here for an image of what i mean:Image

I too am a Vera convert from the Vera3 as I was told by them that i have to many devices... I had 150, their own website said 300 but hey ho, I go (went). Much happier with Indigo and WAY more reliable. The only loyalty i had to Vera was PLEG as i used it extensively but once you get your head around doing it the Indigo way (which is way simpler) then 99% of the time you can achieve the same result with out any scripting, I classed PLEG as scripting by the end as my PLEG logic was so extensive, i was constantly having to debug my own conditions.

Hope that helps (or make sense for that matter)

Posted on
Thu May 08, 2014 1:47 pm
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Rather advanced condition evaluations

Thank you for all your answers. After some back and forth I have decided to start my migration of my zwave devices over to Indigo!
I have confirmed that most of the plugins I use on vera is available for indigo. And I feel that Indigo is a more professional tool than Vera. With a software that is developing. One of the things that I am a bit curios of is how much work it is going to take to get a set of decent working control pages. I have been playing a bit whit it the last week and there seams to be a lot more possibilities than I have used earlier.

thanks again.

reagards

Håvard

Posted on
Thu May 08, 2014 6:09 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Rather advanced condition evaluations

AndyVirus wrote:
You can probably achieve that using a variable.
Create a trigger that has an action to update a boolean variable to true if triggered and the condition is met (is it day etc.)
You can use that variable as your condition in the schedule or trigger for your "if button is pressed" trigger.

I have a timer device (timers and pesters) of x hours that gets updated when there is motion and counts down to 0 from 4 hours.

Trigger: On Motion
Condition: If Day = False and Light = False and Timer = False
Action: Light on

You just need a trigger to set the Timer on motion to 3 seconds.

You can do parenthesis as such by clicking the "+" button with the option key held down in the condition so you can say in the condition "All" must match, but have sub sections within the All condition that say "Any"... See here for an image of what i mean:Image

I too am a Vera convert from the Vera3 as I was told by them that i have to many devices... I had 150, their own website said 300 but hey ho, I go (went). Much happier with Indigo and WAY more reliable. The only loyalty i had to Vera was PLEG as i used it extensively but once you get your head around doing it the Indigo way (which is way simpler) then 99% of the time you can achieve the same result with out any scripting, I classed PLEG as scripting by the end as my PLEG logic was so extensive, i was constantly having to debug my own conditions.

Hope that helps (or make sense for that matter)


Oh my, I had no idea about the option key thing. great helpful post!

edit: yes, this is all documented at...
http://www.perceptiveautomation.com/wiki/doku.php?id=indigo_6_documentation:overview&#conditions
....but the 'option +' to embed sub-rules was not obvious to me and I did not know about it. Very, very powerful.
Last edited by Seeker on Fri May 09, 2014 4:58 am, edited 1 time in total.

Posted on
Thu May 08, 2014 6:16 pm
Seeker offline
Posts: 440
Joined: Aug 05, 2013

Re: Rather advanced condition evaluations

haavarda wrote:
Thank you for all your answers. After some back and forth I have decided to start my migration of my zwave devices over to Indigo!
I have confirmed that most of the plugins I use on vera is available for indigo. And I feel that Indigo is a more professional tool than Vera. With a software that is developing. One of the things that I am a bit curios of is how much work it is going to take to get a set of decent working control pages. I have been playing a bit whit it the last week and there seams to be a lot more possibilities than I have used earlier.

thanks again.

reagards


When I first converted to Indigo, I was kindof missing the simplicity and structure of homewave for iPhone. But I did not like the native UI5 web interface at all.

But after a few months, I love Indigo's control page flexibility. Some things have taken me a while to implement (like my Sonos graphical zone toggle selector which is awesome and I use every day) but once you get some basics down it is easy to copy/duplicate elements. I really like it now.

I have two control pages that I use: big and small. 'big' has controls for most everything and a lot of status displays and is for laptop/tablet use. 'small' is an abbreviated version for iPhone use. I like to keep these as simple as possible (it ain't supposed to be a remote control; it's an automation system). But I find myself tweaking my 'big' page almost daily.

That said, I think touch is in line for a refresh in the near future. I can't wait to see what these guys are up to!

Posted on
Fri May 09, 2014 9:46 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rather advanced condition evaluations

The general approach is to take a step-wise approach. Pick something, preferably limited in scope, that you want to do/automate, do that and get a win. It builds your understanding of Indigo and gives you a sense of accomplishment. Then pick something else. Rinse and repeat.

DIY automation is not a one-shot deal - which is what frustrates most people. They assume that they can do it once, in a short period of time, and that's it. That may work for professionally installed systems (though everyone invariably calls the installer back out to fix/change/improve things - that's where the hidden cost comes in) but in DIY systems you have the luxury of allowing the system to evolve at your own pace.

As you learn more you'll find more things to do. Don't try to do it all at once: that's a recipe for frustration. Control Pages are very simple to create really. Making them look good, particularly if you're a very visually oriented person, takes more work. I recommend the same approach: start with just the basics on your page. Show interesting data and add simple commands just using the built-in tools. Once you get functional pages (that maybe don't LOOK that great) then move on to making them look better. It's all about iteration.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 09, 2014 1:58 pm
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Rather advanced condition evaluations

Thanks for your feedback. This is the way I plan to move over my system to Indigo. One step at a time.
But in this case I wanted to know that it was possible to solve it with Indigo. It would have been frustration to move all my zwave components only to figure out that I cant make it solve my tasks. But I think it can do this and much more...

regards

Håvard

Posted on
Sat May 10, 2014 9:19 am
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Rather advanced condition evaluations

jay (support) wrote:
The general approach is to take a step-wise approach. Pick something, preferably limited in scope, that you want to do/automate, do that and get a win. It builds your understanding of Indigo and gives you a sense of accomplishment. Then pick something else. Rinse and repeat.

DIY automation is not a one-shot deal - which is what frustrates most people. They assume that they can do it once, in a short period of time, and that's it. That may work for professionally installed systems (though everyone invariably calls the installer back out to fix/change/improve things - that's where the hidden cost comes in) but in DIY systems you have the luxury of allowing the system to evolve at your own pace.

As you learn more you'll find more things to do. Don't try to do it all at once: that's a recipe for frustration. Control Pages are very simple to create really. Making them look good, particularly if you're a very visually oriented person, takes more work. I recommend the same approach: start with just the basics on your page. Show interesting data and add simple commands just using the built-in tools. Once you get functional pages (that maybe don't LOOK that great) then move on to making them look better. It's all about iteration.


^ Best advice you'll ever get on these forums. Not bashing the forums because everyone here is incredibly helpful and patient, but getting frustrated and quitting is really easy if you try to eat the whole elephant in one bite.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests