mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Room off timing on spark room; debug on load failures; testing on occ sensor and mics
This commit is contained in:
@@ -28,6 +28,7 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
|||||||
: base(key, name, sensor)
|
: base(key, name, sensor)
|
||||||
{
|
{
|
||||||
OccSensor = sensor;
|
OccSensor = sensor;
|
||||||
|
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
||||||
|
|
||||||
OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(sensor_GlsOccupancySensorChange);
|
OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(sensor_GlsOccupancySensorChange);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace PepperDash.Essentials
|
|||||||
else
|
else
|
||||||
merged.Add("tieLines", new JArray());
|
merged.Add("tieLines", new JArray());
|
||||||
|
|
||||||
//Debug.Console(0, "MERGED RESULT: \x0d\x0a{0}", merged);
|
Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
|
||||||
return merged;
|
return merged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,26 +157,34 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
foreach (var devConf in ConfigReader.ConfigObject.Devices)
|
foreach (var devConf in ConfigReader.ConfigObject.Devices)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Creating device '{0}'", devConf.Key);
|
|
||||||
// Skip this to prevent unnecessary warnings
|
|
||||||
if (devConf.Key == "processor")
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Try local factory first
|
|
||||||
var newDev = DeviceFactory.GetDevice(devConf);
|
|
||||||
|
|
||||||
// Then associated library factories
|
try
|
||||||
if (newDev == null)
|
{
|
||||||
newDev = PepperDash.Essentials.Devices.Common.DeviceFactory.GetDevice(devConf);
|
Debug.Console(0, "Creating device '{0}'", devConf.Key);
|
||||||
if (newDev == null)
|
// Skip this to prevent unnecessary warnings
|
||||||
newDev = PepperDash.Essentials.DM.DeviceFactory.GetDevice(devConf);
|
if (devConf.Key == "processor")
|
||||||
if (newDev == null)
|
continue;
|
||||||
newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf);
|
|
||||||
|
|
||||||
if (newDev != null)
|
// Try local factory first
|
||||||
DeviceManager.AddDevice(newDev);
|
var newDev = DeviceFactory.GetDevice(devConf);
|
||||||
else
|
|
||||||
Debug.Console(0, "WARNING: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key);
|
// Then associated library factories
|
||||||
|
if (newDev == null)
|
||||||
|
newDev = PepperDash.Essentials.Devices.Common.DeviceFactory.GetDevice(devConf);
|
||||||
|
if (newDev == null)
|
||||||
|
newDev = PepperDash.Essentials.DM.DeviceFactory.GetDevice(devConf);
|
||||||
|
if (newDev == null)
|
||||||
|
newDev = PepperDash.Essentials.Devices.Displays.DisplayDeviceFactory.GetDevice(devConf);
|
||||||
|
|
||||||
|
if (newDev != null)
|
||||||
|
DeviceManager.AddDevice(newDev);
|
||||||
|
else
|
||||||
|
Debug.Console(0, "WARNING: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
||||||
[assembly: AssemblyProduct("PepperDashEssentials")]
|
[assembly: AssemblyProduct("PepperDashEssentials")]
|
||||||
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
|
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
|
||||||
[assembly: AssemblyVersion("1.0.18.*")]
|
[assembly: AssemblyVersion("1.0.22.*")]
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
// Add Occupancy object from config
|
// Add Occupancy object from config
|
||||||
|
|
||||||
if (props.Occupancy != null)
|
if (props.Occupancy != null)
|
||||||
rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
|
rm.SetRoomOccupancy(DeviceManager.GetDeviceForKey(props.Occupancy.DeviceKey) as
|
||||||
|
PepperDash.Essentials.Devices.Common.Occupancy.IOccupancyStatusProvider);
|
||||||
rm.LogoUrl = props.Logo.GetUrl();
|
rm.LogoUrl = props.Logo.GetUrl();
|
||||||
rm.SourceListKey = props.SourceListKey;
|
rm.SourceListKey = props.SourceListKey;
|
||||||
rm.DefaultSourceItem = props.DefaultSourceItem;
|
rm.DefaultSourceItem = props.DefaultSourceItem;
|
||||||
|
|||||||
@@ -188,6 +188,12 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="statusProvider"></param>
|
/// <param name="statusProvider"></param>
|
||||||
public void SetRoomOccupancy(IOccupancyStatusProvider statusProvider)
|
public void SetRoomOccupancy(IOccupancyStatusProvider statusProvider)
|
||||||
{
|
{
|
||||||
|
if (statusProvider == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "ERROR: Occupancy sensor device is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If status provider is fusion, set flag to remote
|
// If status provider is fusion, set flag to remote
|
||||||
if (statusProvider is PepperDash.Essentials.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
if (statusProvider is PepperDash.Essentials.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
||||||
OccupancyStatusProviderIsRemote = true;
|
OccupancyStatusProviderIsRemote = true;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user