Hi guys,
I came across a problem while building a floorplan screen using HA Designer. I used the Basic skin as an example, however the Screen itself (Floorplan with elements, Floorplan selection, Selection text) is working, beside the control box for a single light switch (On, Off, Dim).
When playing around with this, I noticed that the toolbar (control group) for a element is defined in Lightning Plugin function GetFloorplanDeviceInfo.
void Lighting_Plugin::GetFloorplanDeviceInfo(DeviceData_Router *pDeviceData_Router,EntertainArea *pEntertainArea,int iFloorplanObjectType,int &iPK_FloorplanObjectType_Color,int &Color,string &sDescription,string &OSD,int &PK_DesignObj_Toolbar)
{
switch(iFloorplanObjectType)
{
case FLOORPLANOBJECTTYPE_LIGHT_CEILING_LIGHT_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_TABLE_LAMP_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_WALL_SCONCE_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_FLOOR_LAMP_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_CHANDALIER_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_PICTURE_LIGHT_CONST:
case FLOORPLANOBJECTTYPE_LIGHT_ACCENT_LIGHT_CONST:
OSD = pDeviceData_Router->m_sState_get();
if(OSD.find("OFF") != string::npos)
iPK_FloorplanObjectType_Color = FLOORPLANOBJECTTYPE_COLOR_LIGHT_CEILING_LIGHT_OFF_CONST;
else
iPK_FloorplanObjectType_Color = FLOORPLANOBJECTTYPE_COLOR_LIGHT_CEILING_LIGHT_ON_CONST;
PK_DesignObj_Toolbar=DESIGNOBJ_grpLightControls_CONST;
break;
default:
OSD = pDeviceData_Router->m_sState_get();
if(OSD.find("OFF") != string::npos)
iPK_FloorplanObjectType_Color = FLOORPLANOBJECTTYPE_COLOR_LIGHT_CEILING_LIGHT_OFF_CONST;
else
iPK_FloorplanObjectType_Color = FLOORPLANOBJECTTYPE_COLOR_LIGHT_CEILING_LIGHT_ON_CONST;
PK_DesignObj_Toolbar=DESIGNOBJ_grpLightControlsOnOff_CONST;
break;
};
}
Of course my Control Group (id: 5646) isn't shown, because DESIGNOBJ_grpLightControls_CONST is set to the id of the Basic skin (which is 2275). So I gave it a try and added the control group of the basic skin. Guess what? it is working, it is toggled when I select and deselect elements on the floorplan and it is sending the commands to the device.
So, how to go on with this? Building a new Lighting plugin based on the given one or is there a better way to solve that and get my control group shown, what do you think?
Thanks in advance,
eNoodle