mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Adds SystemMonitroMessenger to bridge between SystemMonitorController and AppServer (untested)
This commit is contained in:
@@ -15,6 +15,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Room.Cotija;
|
using PepperDash.Essentials.Room.Cotija;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="eisc"></param>
|
/// <param name="eisc"></param>
|
||||||
/// <param name="messagePath"></param>
|
/// <param name="messagePath"></param>
|
||||||
public Ddvc01AtcMessenger(BasicTriList eisc, string messagePath)
|
public Ddvc01AtcMessenger(string key, BasicTriList eisc, string messagePath)
|
||||||
: base(messagePath)
|
: base(key, messagePath)
|
||||||
{
|
{
|
||||||
EISC = eisc;
|
EISC = eisc;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ using Crestron.SimplSharp;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
|
||||||
@@ -15,8 +17,10 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a messaging bridge for a VideoCodecBase
|
/// Provides a messaging bridge for a VideoCodecBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class MessengerBase
|
public abstract class MessengerBase : IKeyed
|
||||||
{
|
{
|
||||||
|
public string Key { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,8 +32,10 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="codec"></param>
|
/// <param name="codec"></param>
|
||||||
public MessengerBase(string messagePath)
|
public MessengerBase(string key, string messagePath)
|
||||||
{
|
{
|
||||||
|
Key = key;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(messagePath))
|
if (string.IsNullOrEmpty(messagePath))
|
||||||
throw new ArgumentException("messagePath must not be empty or null");
|
throw new ArgumentException("messagePath must not be empty or null");
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core.Monitoring;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
|
{
|
||||||
|
public class SystemMonitorMessenger : MessengerBase
|
||||||
|
{
|
||||||
|
public SystemMonitorController SysMon { get; private set; }
|
||||||
|
|
||||||
|
public SystemMonitorMessenger(string key, SystemMonitorController sysMon, string messagePath)
|
||||||
|
: base(key, messagePath)
|
||||||
|
{
|
||||||
|
if (sysMon == null)
|
||||||
|
throw new ArgumentNullException("sysMon");
|
||||||
|
|
||||||
|
SysMon = sysMon;
|
||||||
|
|
||||||
|
SysMon.SystemMonitorPropertiesChanged += new EventHandler<EventArgs>(SysMon_SystemMonitorPropertiesChanged);
|
||||||
|
|
||||||
|
foreach (var p in SysMon.ProgramStatusFeedbackCollection)
|
||||||
|
{
|
||||||
|
p.Value.AggregatedProgramInfoFeedback.OutputChange += new EventHandler<PepperDash.Essentials.Core.FeedbackEventArgs>(AggregatedProgramInfoFeedback_OutputChange);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posts the program information message
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
void AggregatedProgramInfoFeedback_OutputChange(object sender, PepperDash.Essentials.Core.FeedbackEventArgs e)
|
||||||
|
{
|
||||||
|
SendProgramInfoStatusMessage(e.StringValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deserializes the program info into an object that can be setn in a status message
|
||||||
|
void SendProgramInfoStatusMessage(string serializedProgramInfo)
|
||||||
|
{
|
||||||
|
var programInfo = JsonConvert.DeserializeObject<ProgramInfo>(serializedProgramInfo);
|
||||||
|
|
||||||
|
PostStatusMessage(programInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posts the system monitor properties
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
void SysMon_SystemMonitorPropertiesChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SendSystemMonitorStatusMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendFullStatusMessage()
|
||||||
|
{
|
||||||
|
SendSystemMonitorStatusMessage();
|
||||||
|
|
||||||
|
foreach (var p in SysMon.ProgramStatusFeedbackCollection)
|
||||||
|
{
|
||||||
|
SendProgramInfoStatusMessage(p.Value.AggregatedProgramInfoFeedback.StringValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendSystemMonitorStatusMessage()
|
||||||
|
{
|
||||||
|
// This takes a while, launch a new thread
|
||||||
|
CrestronInvoke.BeginInvoke((o) =>
|
||||||
|
{
|
||||||
|
PostStatusMessage(new
|
||||||
|
{
|
||||||
|
timeZone = SysMon.TimeZoneFeedback.IntValue,
|
||||||
|
timeZoneName = SysMon.TimeZoneTextFeedback.StringValue,
|
||||||
|
ioControllerVersion = SysMon.IOControllerVersionFeedback.StringValue,
|
||||||
|
snmpVersion = SysMon.SnmpVersionFeedback.StringValue,
|
||||||
|
bacnetVersion = SysMon.BACnetAppVersionFeedback.StringValue,
|
||||||
|
controllerVersion = SysMon.ControllerVersionFeedback.StringValue
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void CustomRegisterWithAppServer(CotijaSystemController appServerController)
|
||||||
|
{
|
||||||
|
AppServerController.AddAction(MessagePath + "/fullStatus", new Action(SendFullStatusMessage));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,7 +26,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="codec"></param>
|
/// <param name="codec"></param>
|
||||||
public VideoCodecBaseMessenger(VideoCodecBase codec, string messagePath) : base(messagePath)
|
public VideoCodecBaseMessenger(string key, VideoCodecBase codec, string messagePath)
|
||||||
|
: base(key, messagePath)
|
||||||
{
|
{
|
||||||
if (codec == null)
|
if (codec == null)
|
||||||
throw new ArgumentNullException("codec");
|
throw new ArgumentNullException("codec");
|
||||||
|
|||||||
@@ -204,7 +204,8 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
SetupFunctions();
|
SetupFunctions();
|
||||||
SetupFeedbacks();
|
SetupFeedbacks();
|
||||||
|
|
||||||
AtcMessenger = new Ddvc01AtcMessenger(EISC, "/device/audioCodec");
|
var key = this.Key + "-" + Parent.Key;
|
||||||
|
AtcMessenger = new Ddvc01AtcMessenger(key, EISC, "/device/audioCodec");
|
||||||
AtcMessenger.RegisterWithAppServer(Parent);
|
AtcMessenger.RegisterWithAppServer(Parent);
|
||||||
|
|
||||||
EISC.SigChange += EISC_SigChange;
|
EISC.SigChange += EISC_SigChange;
|
||||||
@@ -384,8 +385,8 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
//Room
|
//Room
|
||||||
//if (co.Rooms == null)
|
//if (co.Rooms == null)
|
||||||
// always start fresh in case simpl changed
|
// always start fresh in case simpl changed
|
||||||
co.Rooms = new List<EssentialsRoomConfig>();
|
co.Rooms = new List<DeviceConfig>();
|
||||||
var rm = new EssentialsRoomConfig();
|
var rm = new DeviceConfig();
|
||||||
if (co.Rooms.Count == 0)
|
if (co.Rooms.Count == 0)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, "Adding room to config");
|
Debug.Console(0, this, "Adding room to config");
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ namespace PepperDash.Essentials
|
|||||||
if (vcRoom != null)
|
if (vcRoom != null)
|
||||||
{
|
{
|
||||||
var codec = vcRoom.VideoCodec;
|
var codec = vcRoom.VideoCodec;
|
||||||
VCMessenger = new VideoCodecBaseMessenger(vcRoom.VideoCodec, "/device/videoCodec");
|
var key = vcRoom.VideoCodec.Key + "-" + parent.Key;
|
||||||
|
VCMessenger = new VideoCodecBaseMessenger(key, vcRoom.VideoCodec, "/device/videoCodec");
|
||||||
VCMessenger.RegisterWithAppServer(Parent);
|
VCMessenger.RegisterWithAppServer(Parent);
|
||||||
|
|
||||||
// May need to move this or remove this
|
// May need to move this or remove this
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ namespace PepperDash.Essentials
|
|||||||
void Load()
|
void Load()
|
||||||
{
|
{
|
||||||
LoadDevices();
|
LoadDevices();
|
||||||
|
LinkSystemMonitorToAppServer();
|
||||||
LoadTieLines();
|
LoadTieLines();
|
||||||
LoadRooms();
|
LoadRooms();
|
||||||
LoadLogoServer();
|
LoadLogoServer();
|
||||||
@@ -219,6 +220,24 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.ActivateAll();
|
DeviceManager.ActivateAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LinkSystemMonitorToAppServer()
|
||||||
|
{
|
||||||
|
var sysMon = DeviceManager.GetDeviceForKey("systemMonitor") as PepperDash.Essentials.Core.Monitoring.SystemMonitorController;
|
||||||
|
|
||||||
|
var appServer = DeviceManager.GetDeviceForKey("appServer") as CotijaSystemController;
|
||||||
|
|
||||||
|
|
||||||
|
if (sysMon != null && appServer != null)
|
||||||
|
{
|
||||||
|
var key = sysMon.Key + "-" + appServer.Key;
|
||||||
|
var messenger = new PepperDash.Essentials.AppServer.Messengers.SystemMonitorMessenger
|
||||||
|
(key, sysMon, "/device/systemMonitor");
|
||||||
|
|
||||||
|
DeviceManager.AddDevice(messenger);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads all devices from config and adds them to DeviceManager
|
/// Reads all devices from config and adds them to DeviceManager
|
||||||
@@ -278,6 +297,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper method to load tie lines. This should run after devices have loaded
|
/// Helper method to load tie lines. This should run after devices have loaded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,119 +1,119 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Devices;
|
using PepperDash.Essentials.Core.Devices;
|
||||||
using PepperDash.Essentials.Room.Behaviours;
|
using PepperDash.Essentials.Room.Behaviours;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Fusion
|
namespace PepperDash.Essentials.Fusion
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles mapping Fusion Custom Property values to system properties
|
/// Handles mapping Fusion Custom Property values to system properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class FusionCustomPropertiesBridge
|
public class FusionCustomPropertiesBridge
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Evaluates the room info and custom properties from Fusion and updates the system properties aa needed
|
/// Evaluates the room info and custom properties from Fusion and updates the system properties aa needed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="roomInfo"></param>
|
/// <param name="roomInfo"></param>
|
||||||
public void EvaluateRoomInfo(string roomKey, RoomInformation roomInfo)
|
public void EvaluateRoomInfo(string roomKey, RoomInformation roomInfo)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var reconfigurableDevices = DeviceManager.AllDevices.Where(d => d is ReconfigurableDevice);
|
var reconfigurableDevices = DeviceManager.AllDevices.Where(d => d is ReconfigurableDevice);
|
||||||
|
|
||||||
foreach (var device in reconfigurableDevices)
|
foreach (var device in reconfigurableDevices)
|
||||||
{
|
{
|
||||||
// Get the current device config so new values can be overwritten over existing
|
// Get the current device config so new values can be overwritten over existing
|
||||||
var deviceConfig = (device as ReconfigurableDevice).Config;
|
var deviceConfig = (device as ReconfigurableDevice).Config;
|
||||||
|
|
||||||
if (device is RoomOnToDefaultSourceWhenOccupied)
|
if (device is RoomOnToDefaultSourceWhenOccupied)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Mapping Room on via Occupancy values from Fusion");
|
Debug.Console(1, "Mapping Room on via Occupancy values from Fusion");
|
||||||
|
|
||||||
var devProps = JsonConvert.DeserializeObject<RoomOnToDefaultSourceWhenOccupiedConfig>(deviceConfig.Properties.ToString());
|
var devProps = JsonConvert.DeserializeObject<RoomOnToDefaultSourceWhenOccupiedConfig>(deviceConfig.Properties.ToString());
|
||||||
|
|
||||||
var enableFeature = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupied"));
|
var enableFeature = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupied"));
|
||||||
if (enableFeature != null)
|
if (enableFeature != null)
|
||||||
devProps.EnableRoomOnWhenOccupied = bool.Parse(enableFeature.CustomFieldValue);
|
devProps.EnableRoomOnWhenOccupied = bool.Parse(enableFeature.CustomFieldValue);
|
||||||
|
|
||||||
var enableTime = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomOnWhenOccupiedStartTime"));
|
var enableTime = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomOnWhenOccupiedStartTime"));
|
||||||
if (enableTime != null)
|
if (enableTime != null)
|
||||||
devProps.OccupancyStartTime = enableTime.CustomFieldValue;
|
devProps.OccupancyStartTime = enableTime.CustomFieldValue;
|
||||||
|
|
||||||
var disableTime = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomOnWhenOccupiedEndTime"));
|
var disableTime = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomOnWhenOccupiedEndTime"));
|
||||||
if (disableTime != null)
|
if (disableTime != null)
|
||||||
devProps.OccupancyEndTime = disableTime.CustomFieldValue;
|
devProps.OccupancyEndTime = disableTime.CustomFieldValue;
|
||||||
|
|
||||||
var enableSunday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedSun"));
|
var enableSunday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedSun"));
|
||||||
if (enableSunday != null)
|
if (enableSunday != null)
|
||||||
devProps.EnableSunday = bool.Parse(enableSunday.CustomFieldValue);
|
devProps.EnableSunday = bool.Parse(enableSunday.CustomFieldValue);
|
||||||
|
|
||||||
var enableMonday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedMon"));
|
var enableMonday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedMon"));
|
||||||
if (enableMonday != null)
|
if (enableMonday != null)
|
||||||
devProps.EnableMonday = bool.Parse(enableMonday.CustomFieldValue);
|
devProps.EnableMonday = bool.Parse(enableMonday.CustomFieldValue);
|
||||||
|
|
||||||
var enableTuesday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedTue"));
|
var enableTuesday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedTue"));
|
||||||
if (enableTuesday != null)
|
if (enableTuesday != null)
|
||||||
devProps.EnableTuesday = bool.Parse(enableTuesday.CustomFieldValue);
|
devProps.EnableTuesday = bool.Parse(enableTuesday.CustomFieldValue);
|
||||||
|
|
||||||
var enableWednesday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedWed"));
|
var enableWednesday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedWed"));
|
||||||
if (enableWednesday != null)
|
if (enableWednesday != null)
|
||||||
devProps.EnableWednesday = bool.Parse(enableWednesday.CustomFieldValue);
|
devProps.EnableWednesday = bool.Parse(enableWednesday.CustomFieldValue);
|
||||||
|
|
||||||
var enableThursday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedThu"));
|
var enableThursday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedThu"));
|
||||||
if (enableThursday != null)
|
if (enableThursday != null)
|
||||||
devProps.EnableThursday = bool.Parse(enableThursday.CustomFieldValue);
|
devProps.EnableThursday = bool.Parse(enableThursday.CustomFieldValue);
|
||||||
|
|
||||||
var enableFriday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedFri"));
|
var enableFriday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedFri"));
|
||||||
if (enableFriday != null)
|
if (enableFriday != null)
|
||||||
devProps.EnableFriday = bool.Parse(enableFriday.CustomFieldValue);
|
devProps.EnableFriday = bool.Parse(enableFriday.CustomFieldValue);
|
||||||
|
|
||||||
var enableSaturday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedSat"));
|
var enableSaturday = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("EnRoomOnWhenOccupiedSat"));
|
||||||
if (enableSaturday != null)
|
if (enableSaturday != null)
|
||||||
devProps.EnableSaturday = bool.Parse(enableSaturday.CustomFieldValue);
|
devProps.EnableSaturday = bool.Parse(enableSaturday.CustomFieldValue);
|
||||||
|
|
||||||
deviceConfig.Properties = JToken.FromObject(devProps);
|
deviceConfig.Properties = JToken.FromObject(devProps);
|
||||||
}
|
}
|
||||||
else if (device is EssentialsRoomBase)
|
else if (device is EssentialsRoomBase)
|
||||||
{
|
{
|
||||||
// Set the room name
|
// Set the room name
|
||||||
if (!string.IsNullOrEmpty(roomInfo.Name))
|
if (!string.IsNullOrEmpty(roomInfo.Name))
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Current Room Name: {0}. New Room Name: {1}", deviceConfig.Name, roomInfo.Name);
|
Debug.Console(1, "Current Room Name: {0}. New Room Name: {1}", deviceConfig.Name, roomInfo.Name);
|
||||||
// Set the name in config
|
// Set the name in config
|
||||||
deviceConfig.Name = roomInfo.Name;
|
deviceConfig.Name = roomInfo.Name;
|
||||||
|
|
||||||
Debug.Console(1, "Room Name Successfully Changed.");
|
Debug.Console(1, "Room Name Successfully Changed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the help message
|
// Set the help message
|
||||||
var helpMessage = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomHelpMessage"));
|
var helpMessage = roomInfo.FusionCustomProperties.FirstOrDefault(p => p.ID.Equals("RoomHelpMessage"));
|
||||||
if (helpMessage != null)
|
if (helpMessage != null)
|
||||||
{
|
{
|
||||||
//Debug.Console(1, "Current Help Message: {0}. New Help Message: {1}", deviceConfig.Properties["help"]["message"].Value<string>(ToString()), helpMessage.CustomFieldValue);
|
//Debug.Console(1, "Current Help Message: {0}. New Help Message: {1}", deviceConfig.Properties["help"]["message"].Value<string>(ToString()), helpMessage.CustomFieldValue);
|
||||||
deviceConfig.Properties["helpMessage"] = (string)helpMessage.CustomFieldValue;
|
deviceConfig.Properties["helpMessage"] = (string)helpMessage.CustomFieldValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the config on the device
|
// Set the config on the device
|
||||||
(device as ReconfigurableDevice).SetConfig(deviceConfig);
|
(device as ReconfigurableDevice).SetConfig(deviceConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "FusionCustomPropetiesBridge: Error mapping properties: {0}", e);
|
Debug.Console(1, "FusionCustomPropetiesBridge: Error mapping properties: {0}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,6 +110,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AppServer\Messengers\AtcDdvc01Messenger.cs" />
|
<Compile Include="AppServer\Messengers\AtcDdvc01Messenger.cs" />
|
||||||
<Compile Include="AppServer\Messengers\MessengerBase.cs" />
|
<Compile Include="AppServer\Messengers\MessengerBase.cs" />
|
||||||
|
<Compile Include="AppServer\Messengers\SystemMonitorMessenger.cs" />
|
||||||
<Compile Include="AppServer\Messengers\VideoCodecBaseMessenger.cs" />
|
<Compile Include="AppServer\Messengers\VideoCodecBaseMessenger.cs" />
|
||||||
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
||||||
<Compile Include="Bridges\BridgeBase.cs" />
|
<Compile Include="Bridges\BridgeBase.cs" />
|
||||||
@@ -142,13 +143,13 @@
|
|||||||
<Compile Include="Devices\NUMERIC AppleTV.cs" />
|
<Compile Include="Devices\NUMERIC AppleTV.cs" />
|
||||||
<Compile Include="ControlSystem.cs" />
|
<Compile Include="ControlSystem.cs" />
|
||||||
<Compile Include="Factory\UiDeviceFactory.cs" />
|
<Compile Include="Factory\UiDeviceFactory.cs" />
|
||||||
<Compile Include="OTHER\Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\EssentialsHuddleVtc1FusionController.cs" />
|
||||||
<Compile Include="OTHER\Fusion\FusionCustomPropertiesBridge.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\FusionCustomPropertiesBridge.cs" />
|
||||||
<Compile Include="OTHER\Fusion\FusionEventHandlers.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\FusionEventHandlers.cs" />
|
||||||
<Compile Include="OTHER\Fusion\FusionProcessorQueries.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\FusionProcessorQueries.cs" />
|
||||||
<Compile Include="OTHER\Fusion\FusionRviDataClasses.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\FusionRviDataClasses.cs" />
|
||||||
<Compile Include="REMOVE EssentialsApp.cs" />
|
<Compile Include="REMOVE EssentialsApp.cs" />
|
||||||
<Compile Include="OTHER\Fusion\EssentialsHuddleSpaceFusionSystemControllerBase.cs" />
|
<Compile Include="FOR REFERENCE UI\OTHER\Fusion\EssentialsHuddleSpaceFusionSystemControllerBase.cs" />
|
||||||
<Compile Include="HttpApiHandler.cs" />
|
<Compile Include="HttpApiHandler.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
||||||
|
|||||||
Submodule essentials-framework updated: 67ab8aa632...3d81472afd
Reference in New Issue
Block a user