LinuxMCE Forums

General => Developers => Topic started by: jondecker76 on January 06, 2009, 12:23:07 AM

Title: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 12:23:07 AM
This feature has been requested several times in the past, and I wanted to implement it this weekend. First, I wanted to see what everyone thought of the idea..

The general idea is to have a way that a user can opt out of having auto generated scenarios. Some people want to have ultimate control of all scenarios displayed. For example, if I didn't want a Showtime scenario in my bedroom, I could have a way to make sure that it is not generated by UpdateEntArea.

Upon looking over the code again, two different methods came to mind:

Method 1): Use the "Miscellaneous" room type to designate that auto-generated scenarios should not be generated.

Method 2:) (my preference) Add an "Unmanaged" room type. Then, do not auto-generate any scenarios for this "Unmanaged" room type. Then if someone wants full control of scenarios, they can set the room type to "Unmanaged" and make their own scenarios. The advantage of doing this method is that it is guaranteed not to break current installations. The coding would be very easy - essentially checking if FK_RoomType_get()!=ROOMTYPE_Unmanaged_CONST


I think this would be a great addition to LMCE and users that wish to have full control over their scenarios.
If you have any opinions against this, or other ideas, please post them here.
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: freymann on January 06, 2009, 01:45:07 AM
Quote from: jondecker76 on January 06, 2009, 12:23:07 AM
I think this would be a great addition to LMCE and users that wish to have full control over their scenarios.
If you have any opinions against this, or other ideas, please post them here.

I'm one of those users that would LOVE to see this happen. Specifying a room type that will be ignored by UpdateEntArea seems like a fine approach by me!
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 02:31:16 AM
The only downside is that truely useful scenarios wouldn't be generated either (such as Video, Audio, etc. under media)
Maybe this warrents 2 new room types:
Unmanaged - no auto scenarios are generated
Unmanaged Lights - all auto scenarios will be generated except for the lighting category

One other option would be to instead have a new room type of "No Frills" (or similar name) which allows generation of scenarios that are truely needed and useful (such as On/Off for lighting, Video and Audio etc for Media, etc.), but skips fancy features such as showtime (or any automatically-executing feature for that matter).

Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 06, 2009, 02:51:39 AM
***siiggghh****

heaven forbid we would actually TRY to improve the logic of UpdateEntArea. oh no, let's just DUCT TAPE OVER IT!

I'm against this, but.. he who provides the patch, makes the rules.

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 02:59:13 AM
How is this duct tape? Its an added feature, not a dirty hack.
Room types have only one use for LMCE, and that is UpdateEntArea logic. Therefore, the creation of room types that tell UpdateEntArea that room is unmanaged is falling directly in line with what that system is supposed to do and designed to do. Its just like using a room type of Kitchen tell UpdateEntArea to show a recipe scenario.

If you have a better proposal I'm all ears, but I think this a good and proper solution (no duct tape involved)
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 06, 2009, 03:01:39 AM
okay..

but I still think the fact that you're wanting to manually manage a room completely defeats the purpose of a smart home.

we need to spend time actually doing proper smart logic, not trying to make it where you have to program every little freaking thing.

*hmm*

but, whatever.

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: freymann on January 06, 2009, 03:05:18 AM
I do believe at one time the discussion about this went something like:

"wouldn't it be nice if UpdateEntArea didn't make changes if the scenario already existed"

giving us the ability to fine-tune "On" and "Showtime" Light Scenarios and not have them blown over and rewritten.

Jon's idea seems like a fair solution if no one can tackle it the way indicated above in italics.

Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 06, 2009, 03:06:52 AM
like i said, we can make this patch, and we'll integrate it,

but I see this as a short term solution only.

We need to improve our smart home logic instead of seeing this as a final solution.

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 03:13:52 AM
It is possible that either
A) A person doesn't want a smart home solution entirely, but wants to use LMCE as a home automation device
B) A person wants a smart home solution which LMCE provides, but there exists a situation where the smart solution isn't really desired
C) A person simply wants to be the brains behind their smart home solution

All of the above are possible, and I'm sure there are a lot of people that fall into one of the above listed categories

Please give me some suggestions, I do want to fix this and make it better.

For example, my first thought was to code in that showtime should only happen in room types of Theatre, Bedrooms and Living Room.. But is this a hack? It seems so to me.
Thats why I thought a designated room type made more sense because its how it is designed to work.
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 03:20:33 AM
Now that I think about it - if you don't agree to an unmanaged room type, thats fine. I agree that this is what give LMCE its usefulness.

However, a room type that designates a room to have no automatically executed scenarios (like showtime for example) still makes a lot of sense.

I'll keep racking my brain though for a solution that everyone can be happy with.

Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 06, 2009, 04:29:30 AM
Hey Jon, don't take my disagreement as a stopping block.

I understand the utility of this.

But what i'm saying is that we need to think of this as a temporary solution, so that we put our mind sets on improving the smart logic in the long run.

Go ahead with the unmanaged room patch, and we'll roll it in, for now. But let's keep working on a better solution after you do this.

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 04:31:30 AM
Ok very well. In the time being, it wouldn't hurt to throw around more ideas.
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 06, 2009, 09:34:42 AM
I wanted to get opinions. I have it narrowed down to 2 implementations and I would like to see which most people would agree is more useful.

A) Have an "Unmanaged" room type which prevents any and all auto generated scenarios from happening to that room, along with a "No Frills" room type which prevents any automatically executing scenarios from being created for that room (like the Showtime scenario). Note that in a "No Frills" room type, normal scenarios in which you must press the scenario button to activate the scenario will still be generated.

B) Have an "Unmanaged" room type to add flexability for those who want it, and change the logic for the "Showtime" scenario to only be created for Living Room and Home Theatre room types (Afterall, if you have a TV in the kitchen, you don't want the lights to dim on you when you want to watch a movie while you cook. Or in your bedroom you watch a movie at night - you start the movie and turn the lights off.. But at 2:00 in the morning when you stop the movie, its horrible to have the lights pop back on full bore). Maybe this is more towards the Intelligent logic improvements that Thom is striving for.

What do you guys think would be the better implementation?
Any other UpdateEntArea improvements anyone can think of?

thanks

Jon
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: hari on January 08, 2009, 08:08:54 PM
|          15 | Unmanaged               |        |     15 |      2141 |    35987 |          0 | 2009-01-08 20:07:44 |         NULL |
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 08, 2009, 08:35:56 PM
thank you very much Hari this code will be very simple.

On another note,
I've decided on the final implementation of the Showtime scenario. It will be created for rooms:
Living Room
Home Theatre
Master Bedroom
and only for lights that support dimming commands (will not effect simple On/Off lights)
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 08, 2009, 08:44:34 PM
Why not simple on/off lights?

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 08, 2009, 11:31:23 PM
simple on/off lights don't dim - so what is the use of showtime for these?

I only have X10 dimmers in my theatre room..  The rest of the rooms have X10 On/Off lights as they work very well with compact fluorescent lights...

In the case of Showtime, sending an On/Off light a Dim command to set it to say 30% causes the light to turn on full bore. (this is just the way X10 works)
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: tschak909 on January 08, 2009, 11:35:49 PM
if you look at showtime a bit further, only accent lights are dimmed. The rest are shut off.

-Thom
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: jondecker76 on January 08, 2009, 11:46:28 PM
actually accent lights and ceiling lights dim per Showtime (30% and 10% respectively)

To be more clear - I plan on only dimming Accent lights and Ceiling lights IF they are dimmable. All other lights will work as they do now. Hope that makes a bit more sense.

Done this way, depending on your setup, the Showtime scenario can be different from one room to the next.
Title: Re: UpdateEntArea improvement suggestion (Unmanaged room)
Post by: bulek on January 09, 2009, 01:16:55 AM
Hi,

I also like "unmanaged approach". It would be also fine if user could change that behaviour later. But regarding autogenerated scenarios I also see another huge problem....

When scenarios are autogenerated, they are generated in weird way, cause copies are made for each room - that means that you get separate copies of same scenario for each room. And then editing them is a night mare (I think that Wizard for Scenarios also does that).

It would be muuuuuuuch more convenient if we fix such behavour also. I don't use Scenario Wizard because of such silly behavour. I only use Advanced-Scenarios, where I can create scenario and then just click rooms it will appear in and this works much better, since I have only 1 scenario that is easy edited...