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.