diff --git a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs
index f342f25..ff869f7 100644
--- a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs
+++ b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs
@@ -1,6 +1,7 @@
using System;
using Crestron.SimplSharp;
using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
namespace PepperDash.Core
{
@@ -12,38 +13,44 @@ namespace PepperDash.Core
///
/// The method of control
///
+ [JsonProperty("method")]
+ [JsonConverter(typeof(StringEnumConverter))]
public eControlMethod Method { get; set; }
///
/// The key of the device that contains the control port
///
+ [JsonProperty("controlPortDevKey", NullValueHandling = NullValueHandling.Ignore)]
public string ControlPortDevKey { get; set; }
///
/// The number of the control port on the device specified by ControlPortDevKey
///
- [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
- public uint ControlPortNumber { get; set; }
+ [JsonProperty("controlPortNumber", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
+ public uint? ControlPortNumber { get; set; }
///
/// The name of the control port on the device specified by ControlPortDevKey
///
- [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
+ [JsonProperty("controlPortName", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
public string ControlPortName { get; set; }
///
/// Properties for ethernet based communications
///
+ [JsonProperty("tcpSshProperties", NullValueHandling = NullValueHandling.Ignore)]
public TcpSshPropertiesConfig TcpSshProperties { get; set; }
///
/// The filename and path for the IR file
///
+ [JsonProperty("irFile", NullValueHandling = NullValueHandling.Ignore)]
public string IrFile { get; set; }
///
/// The IpId of a Crestron device
///
+ [JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)]
public string IpId { get; set; }
///
@@ -55,29 +62,32 @@ namespace PepperDash.Core
///
/// Char indicating end of line
///
+ [JsonProperty("endOfLineChar", NullValueHandling = NullValueHandling.Ignore)]
public char EndOfLineChar { get; set; }
///
/// Defaults to Environment.NewLine;
///
+ [JsonProperty("endOfLineString", NullValueHandling = NullValueHandling.Ignore)]
public string EndOfLineString { get; set; }
///
/// Indicates
///
+ [JsonProperty("deviceReadyResponsePattern", NullValueHandling = NullValueHandling.Ignore)]
public string DeviceReadyResponsePattern { get; set; }
///
/// Used when communcating to programs running in VC-4
///
+ [JsonProperty("roomId", NullValueHandling = NullValueHandling.Ignore)]
public string RoomId { get; set; }
///
/// Constructor
///
public ControlPropertiesConfig()
- {
- EndOfLineString = CrestronEnvironment.NewLine;
+ {
}
}
}
\ No newline at end of file