LinuxMCE Forums

General => Users => Topic started by: Bobcatt on August 10, 2012, 11:00:16 pm

Title: Conditional Lighting Scenarios,
Post by: Bobcatt on August 10, 2012, 11:00:16 pm
Hey, I’ve scanned the forms, and I can’t seem to find anyone trying to make conditional lighting scenarios.

For example, I’d like to be able to make a “Lamp” button on an orbiter, than when pressed would check if the lamp is on, and turn it off it that is the case. If the lamp is already on it should turn it off. I’ve looked into the respond to events scenario’s, to do something like this, but I can figure out a way to make a button on an orbiter trigger the event.

The above is just a simplistic example, of other things I’d like to do. (for example, I’m pretty sure I read I can toggle lights on and off from an orbiter if I have a floor plan, with devices.) My intent isn’t just to be able to toggle a light, but to have orbiter buttons with “if statement” attached, So that given certain criteria, it’ll do different things. So if I hit “lights on” on an orbiter and it is night, I’d like lights to only come up 10%, but if I hit the same button during the day I’d like 100%.

Any thoughts or Ideas would be appreciated.

Thanks
Title: Re: Conditional Lighting Scenarios,
Post by: tschak909 on August 10, 2012, 11:25:07 pm
Put simply, you have to change your whole perspective on this.

Events in this system are stateless. We react to events as they happen, and as such, the concept of a toggle is meaningless and not possible.

To give a small example:

When the system starts a movie, it fires an event "Started Watching Media". You can respond to this event. Let's say you want to make sure the lights only dim a certain amount during certain times of the day, you would:

* Create an event for Started Watching media
* In the criteria section, state, you want this to happen for PK_Room = Bedroom...
   * you would also state that you would want this to happen if Time of day is > say.. 19:30.

With this, you would then put in the commands section, lighting commands to turn the lights to say, 40 %.

Make sense?

-Thom
Title: Re: Conditional Lighting Scenarios,
Post by: Bobcatt on August 10, 2012, 11:49:21 pm
Thanks, tschak909 I appreciate the response.

That does make sense, and seems to be the wall I keep hitting.

All that said, can you think of a way to make an orbiter button trigger an event (which could then run conditions)?

I attempted to make a “dummy” on/off light, (added an fake X10 light in the LMCE Admin, so there was Zero chance it would mess-up my Z-wave lights). Then I made an event, that would respond when that dummy light was turned on or off. I than made a lighting scenario on my orbiter which sent on or off commands to this dummy light. I thought in theory it would work, connecting the commands from and orbiter with the conditional events of “respond to events”.

No luck.

Anyone got any clever work arounds?
Title: Re: Conditional Lighting Scenarios,
Post by: tschak909 on August 10, 2012, 11:59:45 pm
Toggles like this won't be possible without changes to the Lighting plugin. The issue being that we do not have a command to Toggle On/Off.

Why are you wanting to do this? you seem to be taking the long way around just to make this whole thing fit your mindset.

-Thom
Title: Re: Conditional Lighting Scenarios,
Post by: JaseP on August 11, 2012, 12:17:09 am
Bobcatt,

I kinda agree with Thom here... you're missing the forest for the trees... The idea in LinuxMCE is a home that reacts automatically to conditions,...

But if you must...
What you're looking to do can easily be accomplished by adding a MCV Vera Lite to the system as a secondary controller and using an app like Homebuddy on Android devices to turn individual things on and off using definable scenes. It doesn't even interfere with LinuxMCE's scene control over the devices (unless you somehow create a conflict). The downside is that it won't appear on your LinuxMCE screen as a one-touch item...

In my own setup, I have a MCV Vera (vers. 1) as my primary Z-wave controller and LinuxMCE as secondary, through a second Aeon Labs Z-wave inclusion controller. But regardless of the place on the Z-wave network, to accomplish what you want would just take a little $$$ being thrown at the problem.

Another alternative is to get a physical scene controller device (table-top, remote, whatever) and assign the buttons to what you want...
Title: Re: Conditional Lighting Scenarios,
Post by: Bobcatt on August 11, 2012, 12:49:50 am
Well fair enough, I do have a number of hand controllers to toggle as I wish. I just thought it would be nice to be able to trigger an event from an orbiter.

For example, it seems straight forward from what I’ve read, to set up a motion sensor in the bathroom to turn the lights on 10% if its night, and 100% if its day. Using respond to events. I just thought there must be a way to signal an event the same way from an orbiter. Do this if this and that if that.

I’m able to accomplish something similar with the security settings. I’ve set scenarios based on security mode. For example, if I set the security mode to unarmed from extended away (I made a dedicated orbiter button to do this, as Pins take too long on my BlackBerry orbiter) I have my water cooler turn  back on (and I’m thinking about adding a temperature change based on time of year).  The water cooler command is programmed within “a respond to house mode change event” as I want it to happen whether I use a pin at the door, or use my BB remotely. This is conceptually what I’d like to do with non-security events. Press an orbiter button, trigger a “respond to event”.

I just need a variable I can control from a lighting/climate/whatever scenario, that when changed will start a pre-programmed “respond to event”.

Thanks for the thoughts everyone. I’m pretty new, but got a 60 piece z-wave system (lighting, climate and security) up and running, with 6 7970, and 3 7940’s, just trying to push the limits a little.
Title: Re: Conditional Lighting Scenarios,
Post by: JaseP on August 11, 2012, 01:07:33 am
Well fair enough, I do have a number of hand controllers to toggle as I wish. I just thought it would be nice to be able to trigger an event from an orbiter.

You can,... It just is buried under a menu item or two... The underlying Z-wave system can also act independently of the LinuxMCE control to cause an even to happen based an even triggered by another Z-wave device... provided there's a scene controller at work...

But the thing you're describing is something like what a MCV Vera does well,... For instance,... when I enter my code at the garage door, the lights come on to allow late night entry, and then return to their previous settings 2-3 minutes later. Every evening at 2:30AM, lights throughout the house go out... Every morning at 5:30AM, my office light turns off (sometimes with me asleep in my chair)... ...just to give you an example...

I suspect that you want a setup more like mine, with a MCV Vera acting as an autonomic central nervous system, and LinuxMCE acting as the "brain." It would just take some reconfiguring to work it out...
Title: Re: Conditional Lighting Scenarios,
Post by: tschak909 on August 11, 2012, 03:09:25 am
events are not supposed to be triggered explicitly by a user. That's not what they're for. You can fudge something with MessageSend (I would suggest reading that wiki page) but, really...why don't you TELL US what you want to do exactly, we'll either tell you no, or try to find a way to pull it off.

-Thom
Title: Re: Conditional Lighting Scenarios,
Post by: JaseP on August 11, 2012, 03:32:34 am
Thom,

I think he's trying to do something like what I was describing,... That is, initialize a scene with an explicit user based action, like turning in a light switch and it doing a pre-programmed course of events...

I agree with you that that 's not what LinuxMCE was designed for,... but as I implied, it appears that what he wants is less a "set the mood" thing, and more of a force the environment thing. That's more MCV Vera's territory.

Bobcatt,

I think this is a "right tools for the job" thing. As I said, I have both a Vera and LinuxMCE. LinuxMCE is designed for making a home into a member of the family, like the family dog. A MCV Vera is for making the dog jump through fire hoops. ... As I mentioned in terms of throwing $$$ at the problem, a Vera Lite is about $175... It's a whole lot saner to spend the $$$ and get what you want without forcing LinuxMCE to to back-flips than to try and force a system that was not designed for what you want to do it with trickery and work-arounds (Damn! I oughta take my own advice!  But, I digress).

Title: Re: Conditional Lighting Scenarios,
Post by: Marie.O on August 11, 2012, 01:26:07 pm
For the average user, ie. SWMBOs, there is no reason why there are two buttons for a single light.

The average user does not want to think about what button is what, but want to change the state of the light.
Title: Re: Conditional Lighting Scenarios,
Post by: Bobcatt on August 12, 2012, 03:44:25 pm
You can,... It just is buried under a menu item or two...

Please do tell! I'd like to try and see if I can get it to work.

Also, I thought I had an event setup, to do something based on time and security house code, but it isn't working like I thought. (it's nothing to do with an orbiter triggering an event, but everything to do with how the respond to event feature works, which is what this thread is really about)

Has anyone gotten an event to fire based on both Time and Security House mode? Specifically, my wife and I always forget to turn off the security system in the morning. I’d like to trigger and event that at 7:30 if security system is “At Home Secure” disarm system. I obviously don’t want it to do this if it’s “Armed” or “Extended Away”. I’ve tried and retried testing different options for hours it doesn’t work. I told it that Specific Time = 07:30 and House Code = 2, but it seems to ignore house code and simply do whatever I program at 7:30 regardless of house code.

Thanks,

Title: Re: Conditional Lighting Scenarios,
Post by: Techstyle on August 12, 2012, 04:40:21 pm
Can't you just go to the lighting floor plan, see the state of the light then turn it on or off?

With regard to the security question, it would be nice if the system checked for your Bluetooth mobile phone or wifi smart phone and then set the security accordingly....
Title: Re: Conditional Lighting Scenarios,
Post by: Marie.O on August 12, 2012, 06:28:19 pm
Can't you just go to the lighting floor plan, see the state of the light then turn it on or off?

Did you ever work with the lighting floor plan on more than a 30sqm setup? You will end up with multiple floorplans to cover everything. And it is very time consuming to switch around. I do use the floorplan every now and then, but they are not the fastest way of getting things done. For regular folks the current way of having two buttons for a room is not the best. Unfortunately, not all automation technology support bi-directional communication, so LinuxMCE does not know about the state of a light, if it was turned on/off by other means sometimes. The chosen route is the most error proven route to go, but for intelligent automation technology not the best.
Title: Re: Conditional Lighting Scenarios,
Post by: stedaniels on August 13, 2012, 03:37:52 pm
For the average user, ie. SWMBOs, there is no reason why there are two buttons for a single light.

The average user does not want to think about what button is what, but want to change the state of the light.

Give the man a Gold Medal!

E.g. from a remote orbiter, perhaps by the side of the bed, the SWMBO wants to turn the light off. She doesn't want to have to navigate x, y & z. Neither should she.
Title: Re: Conditional Lighting Scenarios,
Post by: Armor Gnome on August 13, 2012, 04:47:48 pm
I don't know it's level of functionality but I see a data logger plugin available on the web admin page.  With the right interface it seems like a query could be done for recent commands and a current status inferred.  This would work for everything except manual changes to a state as I doubt a device would bother to communicate that back to a controller. 

A light level sensor inside the lamp shade could query state as could an energy usage module in a sense.  The level of automation as stated very early in this topic is as advanced as the pile of coin you throw at it.  To do it without adding more modules you have to think about things in terms of 'what do I want to happen' not 'how do I want to make this thing happen.'

With the exception of the morning following a great night out at bars... When I go into my bathroom I want a light on. Add a sensor and the act of walking in gives me the desired outcome.

"If it is on already, send it an off command. If it's off, leave it off."  That four part statement can be simplified to, "I want the light off.". Send an off command to device x, mission accomplished. 

To make things quasi-automated or more user friendly than not automated at all there is an orbiter to allow control over devices.  If hunting for a button means reading 5 letters spaced out over two buttons, remove one of the buttons from that room.  Create events that are quick to turn things on for you and in places you know you will want darkness use the single showing OFF button on your orbiter.
Title: Re: Conditional Lighting Scenarios,
Post by: JaseP on August 13, 2012, 05:08:43 pm
Please do tell! I'd like to try and see if I can get it to work.

I was referring to the UI2 lighting menu option on the main F7 menu... I think there's two options, though,... On & Off... So not exactly what you want.

Quote from: Bobcatt
Also, I thought I had an event setup, to do something based on time and security house code, but it isn't working like I thought. (it's nothing to do with an orbiter triggering an event, but everything to do with how the respond to event feature works, which is what this thread is really about)

Has anyone gotten an event to fire based on both Time and Security House mode? Specifically, my wife and I always forget to turn off the security system in the morning. I’d like to trigger and event that at 7:30 if security system is “At Home Secure” disarm system. I obviously don’t want it to do this if it’s “Armed” or “Extended Away”. I’ve tried and retried testing different options for hours it doesn’t work. I told it that Specific Time = 07:30 and House Code = 2, but it seems to ignore house code and simply do whatever I program at 7:30 regardless of house code.

On my MCV Vera, that would be set up by creating a global scene,... Which you could be activated or not activated,... In other words, you create a scene which does what you want while your away and another that does things while you're home, and a third, which switches between the two.

E.G.:


The scene settings can be pretty involved on a MCV Vera (even supporting the LUA programming language). Whereas, in LinuxMCE, making them too complex can mess up things like playback. I saw that in the wiki, and don't know if it's ever been addressed.

In your scenario, if you had a a MCV Vera as a secondary controller, as I do, you could have your more elaborate security scenarios be triggered in MCV Vera by arming a particular sensor using LinuxMCE. In other words, security setting #1 can be triggered by having LinuxMCE arming an IR movement sensor, while a particular scene or device is active. If it is armed while another scene or device is activated, it could trigger a security setting #2.

To accomplish this, you might need to have a plug-in scene controller, such as a Wayne Dalton WDHA-12R (which is a rebranded device), to act as intermediary, and figure out a way to have LinuxMCE trigger both the scene used (at home, out, extended away) and arm the system (second trigger in the form of arming a sensor). If you have multiple sensors, you might be able to trigger the particular security scenarios by arming particular combinations of the sensors, which can then trigger a MCV Vera to respond by going into that scenario (treating the arming sequence like it was a combination trigger,... e.g.; sensor1=armed + sensor2=not-armed + sensor3=armed --> security profile #2).
Title: Re: Conditional Lighting Scenarios,
Post by: JaseP on August 13, 2012, 05:16:55 pm
With the exception of the morning following a great night out at bars... When I go into my bathroom I want a light on. Add a sensor and the act of walking in gives me the desired outcome.

"If it is on already, send it an off command. If it's off, leave it off."  That four part statement can be simplified to, "I want the light off.". Send an off command to device x, mission accomplished. 

The K-I-S-S philosophy, ... You don't need $225 worth of Z-wave equipment for a bathroom light,...

http://www.smarthome.com/59305IV/GE-57884-Motion-Sensing-Single-Pole-In-Wall-Switch-Ivory/p.aspx
(not an endorsement of Smarthome,... just to illustrate the point)

Title: Re: Conditional Lighting Scenarios,
Post by: davegravy on August 14, 2012, 02:45:57 pm
Please do tell! I'd like to try and see if I can get it to work.

Also, I thought I had an event setup, to do something based on time and security house code, but it isn't working like I thought. (it's nothing to do with an orbiter triggering an event, but everything to do with how the respond to event feature works, which is what this thread is really about)

Has anyone gotten an event to fire based on both Time and Security House mode? Specifically, my wife and I always forget to turn off the security system in the morning. I’d like to trigger and event that at 7:30 if security system is “At Home Secure” disarm system. I obviously don’t want it to do this if it’s “Armed” or “Extended Away”. I’ve tried and retried testing different options for hours it doesn’t work. I told it that Specific Time = 07:30 and House Code = 2, but it seems to ignore house code and simply do whatever I program at 7:30 regardless of house code.

Thanks,

I tried to get something like this to work a while back, and don't recall if I ever succeeded (I've been without LMCE for a bit while doing renos) .Basically my approach was to trigger a bash script which:

1)uses messagesend to query the device status / house mode / etc
2)performs whatever logic necessary
3)uses messagesend to send the appropriate commands to the appropriate devices given 1 and 2.

The issue was with #1, as it wasn't returning live data properly. Again, I can't remember how or if I got around it.

The thread, for reference, is here:

http://forum.linuxmce.org/index.php/topic,12456.0.html