One thing that is driving me crazy is the way LMCE has decided to automagically start controlling my lights. If I hit the green media button it seems to be able to turn on my TV in the basement, or my Stereo and TV in the living-room, and that's good.
Then I navigate to Media > TV and various things turn on (or off) and I don't want that to happen, especially in daylight hours. When I stop TV then it flips on all 4 lights in the basement which I definitely don't want.
Where are these triggers configured and how to disable them all?
I much prefer to move about my media and then manage the lights on my own from the Lights menu...
If you have a media director in a room with lights, a scenario called Showtime is created. This scenario is triggered when media is started.. This scenario can be changed. I typically change it to dim my lights to 30%.
When the movie ends, it triggers the On scenario. You can adjust the On scenario to a comfortable light level.
-Thom
Quote from: tschak909 on June 17, 2008, 08:39:29 PM
If you have a media director in a room with lights, a scenario called Showtime is created. This scenario is triggered when media is started.. This scenario can be changed. I typically change it to dim my lights to 30%.
When the movie ends, it triggers the On scenario. You can adjust the On scenario to a comfortable light level.
I suppose I could make 'showtime' and 'on' lighting scenarios leave everything unchanged.. then I could utilize the TV-Mode and Movie-Mode lighting scenarios I created manually like I want...
Thanks for the tip!
no, go into Events, and alter the watching/stopped watching media events to not fire the command groups for showtime and on.
-Thom
Quote from: tschak909 on June 17, 2008, 09:40:03 PM
no, go into Events, and alter the watching/stopped watching media events to not fire the command groups for showtime and on.
Ok, for us "newbies" that would be...
Automation > Execute scenarios, located up at the top menu bar in the admin panel?
The click on "Edit"
What do you change to make it 'not fire' ?
you can delete the event. The event always fires, what you're editing is what happens when that event fires.
-Thom
Quote from: tschak909 on June 18, 2008, 12:02:02 AM
you can delete the event. The event always fires, what you're editing is what happens when that event fires.
Hi Thom.
I must be missing something, because I just deleted the ON and SHOWTIME lighting events, rebuilt the orbiter, and they are back.
That's why I asked what screen to do this on...
I'm playing with the hybrid/core in the basement, and even after deleting ON and SHOWTIME, it's still flipping lights on and off and I really don't want it doing anything with the lights automatically. I'd much rather do that on my own.
Could you please be specific as to which area of the admin web I should be in?
oh crap, that's right... UpdateEntArea adds them..... it shouldn't mess with them if they already exist though.
-Thom
Just go to Scenarios -> Lighting scenarios in the web admin and use the lighting wizard to leave all of the lights unchanged.
Another way that should work, while preserving your Showtime and On scenarios (so you can use them manually), would be to go to the web admin,
Advanced->Configuration->Events.
The events you are looking to edit will be 'Watching - Room_Name' and 'Not Watching - Room_Name'. These are the actual events that fire when you start and stop media. If you edit the commands, you will notice that you have a DCERouter command of Execute Command, with a command Group parameter. That parameter is actually the primary key of your On/Showtime scenarios.
Now, while you are editing, just hit "Remove" to remove the command totally. This will leave you with an empty command list. That is ok, by leaving these Watching and Not Watching events, it will keep UpdateEntArea from trying to re-add these. And at the same time, you will still have a showtime button that will work as it should (when you want it to)
[EDIT - Nope, that doesn't work either - I just tried it. It even rebuilds the whole thing if you just modify the event responses]
Ok some more suggestions... (I won't have time to test these). Try changing your room type. From what I've noticed on my 4-MD setup, the Showtime scenario is only generated in Living Room, Theatre Room, Bedroom and Master Bedroom. Try changing the room type, then deleting the events and/or scenarios you want to get rid of then doing a reload. For example, try changing the room type to Miscellaneous.
Or, go to Scenarios -> Lighting. You will see the auto-generated scenarios at the top of the list for each room. They have check boxes next to each one. Have you tried unchecking the checkboxes to see what happens?
If all fails then a mantis ticket should be in order. While I like how LMCE auto-generates a lot of helpful things, it would be nice to have some kind of control over it. One suggestion for a Mantis Ticket would be to limit the showtime effect to Theatre Room types for example.
One of the methods above should work though. I'd be interested in hearing how you make out on this.
Quote from: jondecker76 on June 18, 2008, 11:43:45 AM
Just go to Scenarios -> Lighting scenarios in the web admin and use the lighting wizard to leave all of the lights unchanged.
In the end, this is what I did.
Now when I start/stop media, the lights aren't doing weird things for me.
Anytime I tried to delete or disable, the events 'came back' so just setting the lighting scenario to leave everything alone worked out.
Did you try the checkboxes? If they do indeed disable the auto-generated scenarios, then it will allow you to make your own additional Showtime scenario that will operate like it should when you want it to.
The only think I don't like about just leaving everything unchanged is that you end up with a Showtime scenario on your orbiter that essentiall does nothing
for the record, I rather like the automatic scenarios, and I am doing a whole set of truth tables to do more intelligent scenarios...
-Thom
Quote from: jondecker76 on June 18, 2008, 02:59:38 PM
Did you try the checkboxes? If they do indeed disable the auto-generated scenarios, then it will allow you to make your own additional Showtime scenario that will operate like it should when you want it to.
Hmmm. I do recall unchecking them and rebuilding orbiters...
I was doing a lot of little things on the system yesterday so I can't remember exactly, but I think even with them unchecked, it would auto fire the events anyway... which led me to just changing the lighting scenarios to leave everything untouched.
Quote from: tschak909 on June 18, 2008, 03:02:18 PM
for the record, I rather like the automatic scenarios, and I am doing a whole set of truth tables to do more intelligent scenarios...
Hi Thom.
I think this should be a feature set that can be turned On or Off depending on personal preference.
Something in the admin control panel where you can say "Use Automatic Lighting Events: Y/N"
I find them extremely annoying, especially in the daytime when it turns on the fireplace and the corner table lamp when I start TV. So I use the gyro and navigate to Lights > Off.
Then when I stop TV, it turns the fireplace and corner table lamp back on, and the floor lamp! So I use the gyro and navigate to Lights > Off.
Oh, but then I start a Video and the lights change again!
Can you recognize how annoying that can be? I'd much rather prefer to run the lights by myself. In the daytime, I don't need lights. At night, I can flip on the system and navigate to Lights > "TV Mode" or Lights > "Movie Mode" (which are a couple lighting scenarios I created) as I require, with or without media active.
I have other problems with these auto-generated events too. For some reason, in the basement, the core keeps shutting my TV off at weird places. Sometimes I just click the gyro mouse and off goes the TV. Or while watching TV, I click the media button and select OFF and not only does it stop watching TV -- it shuts my TV off!
I'm about ready to remove the TV as a device completely because just like the lights, it might be better to just let me control it. The core is also flipping through the inputs on the TV, for reasons I don't know, since the only thing I use that TV for is LMCE on HDMI, but it likes to turn the TV on and then start hitting the INPUT button. There are about 6 input selections, and it starts hitting INPUT while the TV is in the middle of turning on (at which point the TV doesn't respond to remote key presses) so it leaves me at VIDEO2, forcing me to grab the TV remote and hit INPUT 3 more times to get to HDMI. So I'm either using the TV remote to constantly turn the TV back ON or adjust the INPUT.
I did edit the TV device template to remove the various Inputs, but that hasn't helped, or else I have to use the ReSync button in the edit A/V Properties area?
Upstairs, the MD seems to control the TV and Stereo power just fine, at the appropriate times. I like that. It works great!
I don't know what's up with the core in the basement! HAL is having fun with me! :-)
Yay, another person who says "Let's just add a preference!"
no.
Let's actually try to think things through.
We need to do some serious state table work on the various logic plugins. This will eliminate a lot of the issues that you are seeing. I will not support adding additional UI complexity, just to satisfy the needs of a few people, sorry.
Also, I'm guessing that you have a TV under IR control, with a power toggle, instead of discrete power on/off commands?
guess what?
when you do a quick reload router, the state of all AV devices is reset to assume the device is off, so if you tap the remote, it will think, "Oh, I need to turn on the TV!" and do the power toggle, which...turns the TV off....
Keep this in mind, when you do a quick router reload, turn the TV off...
don't like that? look for a discrete power command, and implement it.
Seek to understand WHY the system is acting like this, instead of blindly just saying, "fsck it! I wanna control it myself!" ..
*shake-head*
-Thom
Quote from: freymann on June 18, 2008, 03:42:52 PM
Quote from: tschak909 on June 18, 2008, 03:02:18 PM
for the record, I rather like the automatic scenarios, and I am doing a whole set of truth tables to do more intelligent scenarios...
Hi Thom.
I think this should be a feature set that can be turned On or Off depending on personal preference.
Something in the admin control panel where you can say "Use Automatic Lighting Events: Y/N"
I find them extremely annoying, especially in the daytime when it turns on the fireplace and the corner table lamp when I start TV. So I use the gyro and navigate to Lights > Off.
Then when I stop TV, it turns the fireplace and corner table lamp back on, and the floor lamp! So I use the gyro and navigate to Lights > Off.
Oh, but then I start a Video and the lights change again!
Can you recognize how annoying that can be? I'd much rather prefer to run the lights by myself. In the daytime, I don't need lights. At night, I can flip on the system and navigate to Lights > "TV Mode" or Lights > "Movie Mode" (which are a couple lighting scenarios I created) as I require, with or without media active.
I have other problems with these auto-generated events too. For some reason, in the basement, the core keeps shutting my TV off at weird places. Sometimes I just click the gyro mouse and off goes the TV. Or while watching TV, I click the media button and select OFF and not only does it stop watching TV -- it shuts my TV off!
I'm about ready to remove the TV as a device completely because just like the lights, it might be better to just let me control it. The core is also flipping through the inputs on the TV, for reasons I don't know, since the only thing I use that TV for is LMCE on HDMI, but it likes to turn the TV on and then start hitting the INPUT button. There are about 6 input selections, and it starts hitting INPUT while the TV is in the middle of turning on (at which point the TV doesn't respond to remote key presses) so it leaves me at VIDEO2, forcing me to grab the TV remote and hit INPUT 3 more times to get to HDMI. So I'm either using the TV remote to constantly turn the TV back ON or adjust the INPUT.
I did edit the TV device template to remove the various Inputs, but that hasn't helped, or else I have to use the ReSync button in the edit A/V Properties area?
Upstairs, the MD seems to control the TV and Stereo power just fine, at the appropriate times. I like that. It works great!
I don't know what's up with the core in the basement! HAL is having fun with me! :-)
Regarding the input select when the TV turns on. In the A/V properties where you define your IR codes, there are some options on top. Use the option to change inputs (keep the inputs as toggle of course, as it sounds like you don't have discreets). In that submenu is an option "Resend Input Select When Toggled" or something similar. Uncheck that and see if it helps.
(It seems to me that it should say something like "Resend Input Select When Power Is Toggled" - for some tv's that might always start at the first input? Also, there seems to be a bug that links this checkbox also to a parameter on the next page "Send Input Select Twice on the First..." (or similar) - so it seems like they are 2 independant parameters, but what you do to one happens to the other, and vice-versa) I was looking at this myselft thismorning before I went to work. I unchecked the "Resend Input Select..." option, did a reload and tested it once very quickly and it seemed to get rid of my tv cycling through all the inputs at power on.
Getting back to the original issue:
Also, I still have to agree on both sides - I really like the automatic scenarios myself - I use pretty much all of them (House to sleep mode etc) as well as a lot of the automatic events that happen (porch lights off at sunrise etc.). But, I can see where this isn't always the desired behavior. I think that some modifications do need made to the system to make it more flexible to everyone. I'm thinking along the lines of small modifications in the current logic (I.e. if the user has a Stopped Watching event, and a showtime scenario exists, then continue, otherwise add them. RIght now it appears to check if the Stopped Watching event actually executes the command group for the showtime scenario. This kind of change will leave all current functionallity, but allow a person to remove the offending command groups from the event)
And last but not least, one more suggestion..
Recently I did a post on how to enable climate devices. There is enough information there to show you how to build your own on/off as well as dimmable light switch device templates as Climate Devices. This way they are unaffected by automatically generated scenarios - and you can still make lighting scenarios for them that appear in the lighting section on your orbiters. The down side is that any scenarios will have to be edited with the Advanced wizard)
Quote from: tschak909 on June 18, 2008, 04:12:18 PM
Yay, another person who says "Let's just add a preference!"
no.
Let's actually try to think things through.
Hi again Thom.
Don't take my comments the wrong way, I'm just talking about what LCME does here and how I like or dislike some of those features.
Quote
Also, I'm guessing that you have a TV under IR control, with a power toggle, instead of discrete power on/off commands?
guess what?
when you do a quick reload router, the state of all AV devices is reset to assume the device is off, so if you tap the remote, it will think, "Oh, I need to turn on the TV!" and do the power toggle, which...turns the TV off....
Yes, exactly.
Quote
Seek to understand WHY the system is acting like this, instead of blindly just saying, "fsck it! I wanna control it myself!" ..
*shake-head*
Well, that's why us "users" post messages in the forums... to find out about these type of things. I thank-you for sharing some of the inner workings of LMCE with me/us. As you've said, it helps me/us understand why the system is acting like it does at times.
Quote from: tschak909 on June 18, 2008, 02:45:32 AM
oh crap, that's right... UpdateEntArea adds them..... it shouldn't mess with them if they already exist though.
After listening to "the wife" whining about HAL flicking on lights toDAY, can we at least agree to:
if a lighting scenario exists, don't recreate it?
That would at least give me the chance to fine tune the On and Showtime scenes to my liking??
We have discussed this behavior, and we did all agree that some changes are in order - including having some auto-generated stuff that is not crucial to LMCE's operation optional. However, everybody is very busy with other projects so I'm sure this won't happen all too soon.
The good thing is, this is an open-souce project, so you can always fine-tune things to your liking. I'm at work right now, but browsing through SVN the changes look pretty easy if you want to recompile some changes.. (if I remember right, you did set up a development environment)
Look in charon-merge/src/UpdateEntArea/UpdateEntArea_Event.cpp. A little more than half way down you will find:
void UpdateEntArea::AddDefaultEventHandlers(Row_Room *pRow_Room)
{
CommandGroup *pCommandGroup;
Row_EventHandler *pRow_EventHandler;
CommandGroupArray commandGroupArray(pRow_Room,ARRAY_Scenarios_for_Event_Handlers_CONST,true);
map<int,int> map_Device_Type_TV; // Where type is a floorplan type
GetDevicesTypes(DEVICECATEGORY_TVsPlasmasLCDsProjectors_CONST,pRow_Room->PK_Room_get(),
&map_Device_Type_TV,NULL);
if( map_Device_Type_TV.size() )
{
// Watching media
pCommandGroup=CreateWatchingMediaCommandGroup(commandGroupArray,pRow_Room,1);
pRow_EventHandler=CreateWatchingMediaEventHandler(commandGroupArray,pRow_Room,1);
if( pRow_EventHandler ) // The user didn't change it, so go ahead and confirm it's current
{
if( pCommandGroup )
pRow_EventHandler->FK_CommandGroup_set( pCommandGroup->m_pRow_CommandGroup->PK_CommandGroup_get() );
SetWatchingMediaCriteria(pRow_EventHandler);
pRow_EventHandler->Table_EventHandler_get()->Commit();
ResetEventHandler_psc_mod(pRow_EventHandler);
}
// Stop Watching
pCommandGroup=CreateWatchingMediaCommandGroup(commandGroupArray,pRow_Room,0);
pRow_EventHandler=CreateWatchingMediaEventHandler(commandGroupArray,pRow_Room,0);
if( pRow_EventHandler ) // The user didn't change it, so go ahead and confirm it's current
{
if( pCommandGroup )
pRow_EventHandler->FK_CommandGroup_set( pCommandGroup->m_pRow_CommandGroup->PK_CommandGroup_get() );
SetWatchingMediaCriteria(pRow_EventHandler);
pRow_EventHandler->Table_EventHandler_get()->Commit();
ResetEventHandler_psc_mod(pRow_EventHandler);
}
}
}
You can see from the code that this is responsible for responding to the events fired when you start/stop media. But where is it called?
Look further up in the file for
for(map<int, pair<LevelOfMedia, bool> >::iterator it=m_mapRoom_Media.begin();it!=m_mapRoom_Media.end();++it)
{
Row_Room *pRow_Room = m_pDatabase_pluto_main->Room_get()->GetRow(it->first);
if( pRow_Room )
AddDefaultEventHandlers(pRow_Room);
}
(sorry, no line numbers, i'm browsing SVN via a web browser at work)
Do you see where it was called? Lets comment it out:
for(map<int, pair<LevelOfMedia, bool> >::iterator it=m_mapRoom_Media.begin();it!=m_mapRoom_Media.end();++it)
{
Row_Room *pRow_Room = m_pDatabase_pluto_main->Room_get()->GetRow(it->first);
//if( pRow_Room )
// AddDefaultEventHandlers(pRow_Room);
}
Simply recompile (try running 'make' or 'make bin' from within the UpdateEntArea folder) and move your new binary into the right place on the core (probably /usr/pluto/bin/). Do a reload of the router and your pesky little friend will not be executed anymore. You should then be able to modify those event handlers or remove them completely if you want without them being regenerated.
(keep in mind that I did not personally test this change, but I'm pretty confident that is all you will need to do. In any case, always make a backup of your original file on the core before you change it)
[EDIT]
I just reread your last post.. I realize now that you were talking about being able to modify the On and Showtime scenarios to your liking. The above fix allows you to modify the event response, not the scenarios themselves. If you are really interested in being able to change the scenarios too, this is that offending piece of code that handles the showtime scenario, located in charon-merge/src/UpdateEntArea/UpdateEntArea_Lighting.cpp:
// If there are any lights or blinds at all, we'll create a ShowTime scenario if there's also a TV
if( map_Device_Type.size() )
{
map<int,int> map_Device_Type_TV; // Where type is a floorplan type
GetDevicesTypes(DEVICECATEGORY_TVsPlasmasLCDsProjectors_CONST,pRow_Room->PK_Room_get(),
&map_Device_Type_TV,NULL);
// If there's a TV in the room, we'll add a Showtime scenario
if( map_Device_Type_TV.size() )
{
iOrder=1;
pCommandGroup = commandGroupArray.FindCommandGroupByTemplate(TEMPLATE_Lighting_Automatic_CONST,"Showtime",ICON_Showtime_CONST,2,0,NULL,3); // Showtime is parm1=2
if( pCommandGroup )
{
for(map<int,int>::iterator it=map_Device_Type.begin();it!=map_Device_Type.end();++it)
{
// Put ceiling lights at 10%, accent lights at 30%, blinds closed, other lights off
if( it->second==FLOORPLANOBJECTTYPE_LIGHT_CEILING_LIGHT_CONST )
pCommandGroup->AddCommand(it->first,COMMAND_Set_Level_CONST,iOrder++,1,COMMANDPARAMETER_Level_CONST,"10");
else if( it->second==FLOORPLANOBJECTTYPE_LIGHT_ACCENT_LIGHT_CONST || it->second==FLOORPLANOBJECTTYPE_LIGHT_PICTURE_LIGHT_CONST )
pCommandGroup->AddCommand(it->first,COMMAND_Set_Level_CONST,iOrder++,1,COMMANDPARAMETER_Level_CONST,"30");
else if( it->second==FLOORPLANOBJECTTYPE_LIGHT_BLINDS_CONST || it->second==FLOORPLANOBJECTTYPE_LIGHTS_DRAPES_CONST )
pCommandGroup->AddCommand(it->first,COMMAND_Generic_Off_CONST,iOrder++,0);
else if( IsLight(it->second) )
pCommandGroup->AddCommand(it->first,COMMAND_Generic_Off_CONST,iOrder++,0);
}
}
}
}
Its commented pretty well, so you should be able to follow that code and make modifications there also if need be. I'll leave it up to you to find the part that handles generating the "On" scenario if you desire to change that as well.
Quote from: jondecker76 on July 01, 2008, 01:19:34 PM
We have discussed this behavior, and we did all agree that some changes are in order - including having some auto-generated stuff that is not crucial to LMCE's operation optional. However, everybody is very busy with other projects so I'm sure this won't happen all too soon.
The good thing is, this is an open-souce project, so you can always fine-tune things to your liking. I'm at work right now, but browsing through SVN the changes look pretty easy if you want to recompile some changes.. (if I remember right, you did set up a development environment)
I think this is an easy solution to be incorporated into future releases:
*if* the lighting scenario already exists, *don't* recreate it.
I can see where I can disable the building of the Showtime lighting scene in the source code, but the On, which is rather important and needed in each room, looks like a slightly different story.
However, this did remind me of one of your earlier options, and that is to set the room type from Living Room to Misc.
I just updated the Living Room and Basement to a type of Misc. and we'll see what happens from here.
jondecker76, you should be commended for the way you respond and help everybody here in the forums. You have been extremely helpful to me and I know your tips and suggestions and code work will be enjoyed by many. I'm also looking forward to your playlist editor work.
Many thanks!
No problem, glad to help. I've been on the receiving end of a lot of good help here too myself.
Regarding only generating a scenario if it doesn't exist. The idea is sound, but in reality it would be a little harder than it sounds. Firts, the primary key of any of the scenarios, or any of the autogenerated stuff, will be different from install to install - thus we can't check against a primary key. Also, a user may rename a scnerio that was previously auto-generated, or make their own scenario with the same name as an auto-generated one. I think with that in mind, in some cases it could produce some very unexpected results for some people. What I think should be done is have simple options per room for autogeneration across many categories (Lights, climate, etc...), split into basic, advanced, and events. This combination will make it possible for anyone to have any interaction they desire. And in actuallity should be easier to code than trying to detect and preserve changes made by users (in my opinion anyway)
A couple of other things... I think your best bet is to do the first fix suggested above (commenting out the event handler generation), then you don't have to mess with the On or Showtime scenarios, just get rid of the eventhandler that causes them to be executed automatically when media starts or stops.
Also, it occurred to me while looking at the code, that only Blinds, Ceiling Lights and Accent Lights are affected. Try changing your floorplan icon type to something else (maybe table lamp?) - that should keep your light where you want it with no changes to the source code.
Hi,
it seems that my setup is unintentionally not affected by autogenerated scenarios.. All I did "wrong" is when I add light devices, I don't assign them to any room - so therefore they are unaffected by automatic scenarios. I just simply assign those lights to rooms I want to be affected by autogenerated scenarios...
HTH,
regards,
Bulek.
Very clever trick!