I am creating a new root device(type: eDeviceType_Thermostat.Root) and I want to place a named object in the device's PlugExtraData. When I call get_PlugExtraData_Get (see below) it returns a null.
This call works fine once the device is created and I'm checking to see if it a root device that contains the Thermostat Data. I have tried calling SaveEventsDevices() and getting a fresh device ref before making the call. Nothing seems to help. I am running the plugin remotely so that I can debug it.
PlugExtraData.clsPlugExtraData EDO = null;
EDO = dv.get_PlugExtraData_Get(null);
if (EDO != null) This is always null!
{
if (EDO.AddNamed("Thermostat Data", statData))
{
dv.set_PlugExtraData_Set(Util.hs, EDO);
Util.hs.SaveEventsDevices();
}
else
{
Util.Log("Error adding named data object to plug-in sample device!", Util.LogType.LOG_TYPE_ERROR);
}
}
Any help would be appreciated.
This call works fine once the device is created and I'm checking to see if it a root device that contains the Thermostat Data. I have tried calling SaveEventsDevices() and getting a fresh device ref before making the call. Nothing seems to help. I am running the plugin remotely so that I can debug it.
PlugExtraData.clsPlugExtraData EDO = null;
EDO = dv.get_PlugExtraData_Get(null);
if (EDO != null) This is always null!
{
if (EDO.AddNamed("Thermostat Data", statData))
{
dv.set_PlugExtraData_Set(Util.hs, EDO);
Util.hs.SaveEventsDevices();
}
else
{
Util.Log("Error adding named data object to plug-in sample device!", Util.LogType.LOG_TYPE_ERROR);
}
}
Any help would be appreciated.
Comment