LinuxMCE Forums

General => Users => Topic started by: apagg on February 03, 2010, 11:28:10 pm

Title: House Mode
Post by: apagg on February 03, 2010, 11:28:10 pm
I have made an event I want to get executed only if the house mode is sett to sleeping. The event looks like this: http://imagebin.org/83189.

But it does not get executed no mater what house mode I set.

If anyone have a working event using House Mode I would be very happy if  you could post your setup.

apagg
Title: Re: House Mode
Post by: los93sol on February 04, 2010, 06:55:33 am
You've got more criteria to be met in there than just the right housemode...what exactly are you trying to do?
Title: Re: House Mode
Post by: apagg on February 04, 2010, 08:04:59 am
I am trying to get a heater to turn on if the temperature drops below 21C, but only if the house is set to sleep mode.

I have made similar events that use "Day of week" instead of "House Mode" and they work.

 
Title: Re: House Mode
Post by: totallymaxed on February 04, 2010, 09:35:27 am
I am trying to get a heater to turn on if the temperature drops below 21C, but only if the house is set to sleep mode.

I have made similar events that use "Day of week" instead of "House Mode" and they work.

 

Hi apagg

I have been adding some events that use motion cameras to fade up lights...leave them on for a configurable amount of time before switching them off etc etc. So can you step us through what you have currently in more detail?...its difficult I know as its not just a piece of code you can cut-n-paste here!

All the best

Andrew
Title: Re: House Mode
Post by: apagg on February 04, 2010, 11:49:38 am
i will try to go through my steps:
Thank you for helping, here are my steps to set up the event.

From the top menu:
Advanced>>Configuration>>Events

Then I pushed:
Create advanced event
 
Gave it a name and chose "Temperature changed" from the dropdown menu.

I then edited the criteria to look like the image I posted, and added the command to turn the heater on.

Quick reload router.

PS! if I don't add the line whit House mode the event turns on the heater if temperature drops below 21C so I know that part works.

Both the Temperature sensor and the switch controlling the heater is zwave.
Title: Re: House Mode
Post by: totallymaxed on February 04, 2010, 01:17:53 pm
i will try to go through my steps:
Thank you for helping, here are my steps to set up the event.

From the top menu:
Advanced>>Configuration>>Events

Then I pushed:
Create advanced event
 
Gave it a name and chose "Temperature changed" from the dropdown menu.

I then edited the criteria to look like the image I posted, and added the command to turn the heater on.

Quick reload router.

PS! if I don't add the line whit House mode the event turns on the heater if temperature drops below 21C so I know that part works.

Both the Temperature sensor and the switch controlling the heater is zwave.

Hi again... that Advanced Event looks ok too me... I will see if i can replicate it here in the next day or so once i have added a ZWave multi-sensor to one of our test systems. I'll post any findings back here as soon as i have done so.

All the best


Andrew
Title: Re: House Mode
Post by: apagg on February 05, 2010, 11:59:58 am
Turn out this is a bug http://svn.linuxmce.org/trac.cgi/ticket/587
Title: Re: House Mode
Post by: totallymaxed on February 05, 2010, 12:37:06 pm
Turn out this is a bug http://svn.linuxmce.org/trac.cgi/ticket/587

Hmmm... ok. Looks to be working here as far as i can tell though (but i'm doing my testing of this on a Cascade system...and that is 0710 based with 0810 & other fixes applied) so we either fixed the bug :-)....or it was only introduced after the switch to 0810 :-(

Anyway i will digg a little more into this here...if our fix is ok we'll submit it to the public svn asap.

All the best


Andrew
Title: Re: House Mode
Post by: chrisbirkinshaw on February 05, 2010, 08:42:24 pm
I'm trying to setup some rules for my heating system, but having difficulty finding out available values for the following:

Room Mode
User Mode
State (how is this used?)

Do you have any idea about these?

Also, I would like to setup a rule to turn on the heat when the temp drops below a certain threshold between certain hours of the day, but am not sure if I can specify a range for the Time of Day box. How should I approach this?

Going forward I would like to do some cool stuff and turn off heat if no movement has been detected for a long period (several hours). I'm not sure quite how to approach that either as a motion sensor normally has a low delay (5 mins max) and I don't want to have a whole extra set of motion sensors. It would be nice if the house could drop back to the sleeping mode if no movement was detected for 1 hour and it was not in away mode. Any thoughts on this? I could script this externally but it would be nice to do in LinuxMCE.

I also thought about setting an alarm, which could be adjusted from the orbiter in the bedroom, and somehow turning the heat on an hour before the alarm time, though I don't think this is possible right now (subtracting the hour). Even if it was then this would need to trigger some kind of state change which you could then reference in the normal respond to temp change events - something like a "Waking Up" room state? Maybe it is easy to add new room states?

I suppose ideally you would like to have multiple heating profiles and have different temp thresholds for each room - e.g. Low, Normal, Sleep, etc. You should be able to trigger those then from other events or buttons on the orbiters. Is this possible? I am having a hard time seeing how to trigger room and house mode changes at all from other scenarios. Which device do you target?

Sorry this is a bit long. Hope someone has some info here!

Thanks,

Chris


Title: Re: House Mode
Post by: apagg on February 05, 2010, 10:05:53 pm
Hi Chris

This is exactly the same thing I want to do. At the moment I have only implemented a system for my car heater and a simple event that turns on the heater in the bedroom a set time before we go to bed and wake up (it has to be manually turned off). I am documenting my progress here: http://wiki.linuxmce.org/index.php/User:Apagg

 
Quote
Also, I would like to setup a rule to turn on the heat when the temp drops below a certain threshold between certain hours of the day, but am not sure if I can specify a range for the Time of Day box. How should I approach this?
I am experimenting with this at the moment, but i think the only parameter you can use are DAY and NIGHT which are controlled by  sunup/sundown. If it was possible to specify a time range I think I can create the logic required to do most of what you describe.

Quote
Going forward I would like to do some cool stuff and turn off heat if no movement has been detected for a long period (several hours). I'm not sure quite how to approach that either as a motion sensor normally has a low delay (5 mins max) and I don't want to have a whole extra set of motion sensors. It would be nice if the house could drop back to the sleeping mode if no movement was detected for 1 hour and it was not in away mode. Any thoughts on this? I could script this externally but it would be nice to do in LinuxMCE.
I think this can be accomplished using the DCErouter Delay command.

Quote
I suppose ideally you would like to have multiple heating profiles and have different temp thresholds for each room - e.g. Low, Normal, Sleep, etc. You should be able to trigger those then from other events or buttons on the orbiters. Is this possible? I am having a hard time seeing how to trigger room and house mode changes at all from other scenarios. Which device do you target?
House mode can be changed from an event using "Security Plug-in -- Set house mode" command.

Quote
Sorry this is a bit long. Hope someone has some info here!
I hope this was off some help. It is nice to see someone whit the same vision for LinuxMCE.

PS! You can cache me on irc I am usually on from 1800CET just ping me.

Andreas
Title: Re: House Mode
Post by: chrisbirkinshaw on February 05, 2010, 11:04:47 pm
Thanks! Yes, we should try to work on something together then get a really good wiki page up.

About time of day - did you try this in two consecutive segments of an event? Looks promising.

Time of Day > 05:00
Time of Day < 11:00


Do you know anything about State, and about creating custom Room, House, and User modes?

I just noticed that you can stop a currently executing command group, which is interesting. If this works it may give a way of having a timer which you can reset! :-)

Regards,

Chris
Title: Re: House Mode
Post by: apagg on February 05, 2010, 11:36:30 pm
Quote
Time of Day > 05:00
Time of Day < 11:00
I have been trying this using various formats but never been successful. If you get this to work that would be grate.

Quote
Do you know anything about State, and about creating custom Room, House, and User modes?
No, but this looks very interesting.


Andreas  
Title: Re: House Mode
Post by: chrisbirkinshaw on February 06, 2010, 12:24:24 am
I am just hoping that somewhere you can set a state, e.g. Heating = 1 using a timed event, and then reference this in the conditions of an event triggered by temp change.

I'll dig around in the code, but I don't know C :-(

Chris
Title: Re: House Mode
Post by: chrisbirkinshaw on February 11, 2010, 09:30:18 pm
Did you figure out a workaround for this yet? My heating is on 24/7 at the moment, lol.

It's a shame that in the event criteria you cannot reference the state of other devices.

I think house mode is the only state you can really manipulate and then reference in an event. If there was something else then we would have a workaround...

Chris
Title: Re: House Mode
Post by: apagg on February 11, 2010, 09:54:02 pm
Quote
My heating is on 24/7 at the moment, lol.
Mine tomoney just flying out the window :P

Until the bug regarding HouseMode is resolved I am not getting much further. Good news is that sambuca and possy is working on the bug.

Regarding the Time of Day issue I have don a lot of testing, but the only thing I can test against is DAY and NIGHT so this does not help much.
Title: Re: House Mode
Post by: jimbodude on February 11, 2010, 10:54:58 pm
Regarding the Time of Day issue I have don a lot of testing, but the only thing I can test against is DAY and NIGHT so this does not help much.

Yes - I've looked at this before.  Those are the only two values accepted by that rule, and I believe it's even case sensitive.  You can find it in the code, I forget where, but I remember it is obvious.

There is no way to make rules that say things like "if it is before sunrise" or "if it is before 8am" - I looked pretty hard over the summer.  I wanted my projector to automatically adjust the light level based on sunrise and sunset.  The DAY/NIGHT worked ok, but only supplied 2 light-level modes when I wanted 3 or 4.  I triggered on "Watching Media", which was ok so long as you didn't watch a long movie that started when it was light out, and finished after it was dark.  Now the projector is in a basement, so I don't care as much :).

It seems like you're getting pretty deep into the rules.  It would be great if you put some of your knowledge into Wiki pages.  I don't remember there being much documentation on this stuff, and it is ridiculously powerful if you can figure it out... problem is, that takes a lot of code reading right now.
Title: Re: House Mode
Post by: apagg on February 17, 2010, 11:03:06 am
House mode and Time of day is now fixed a big thanks to sambuca:) I have created a wiki page to list valid parameters  it is not complete but all parameters  are tested.

http://wiki.linuxmce.org/index.php/Event_criteria
Title: Re: House Mode
Post by: jimbodude on February 17, 2010, 05:05:02 pm
Much better... Thank you both, keep it up!