diff --git a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs index 04233093..dcfb5aea 100644 --- a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,6 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] -[assembly: AssemblyVersion("1.1.1.*")] +[assembly: AssemblyVersion("1.1.4.*")] + \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/Room/Cotija/CotijaConfig.cs b/Essentials/PepperDashEssentials/Room/Cotija/CotijaConfig.cs index 1d4e9718..4564ad6d 100644 --- a/Essentials/PepperDashEssentials/Room/Cotija/CotijaConfig.cs +++ b/Essentials/PepperDashEssentials/Room/Cotija/CotijaConfig.cs @@ -16,7 +16,10 @@ namespace PepperDash.Essentials public class CotijaConfig { [JsonProperty("serverUrl")] - public string ServerUrl { get; set; } + public string ServerUrl { get; set; } + + [JsonProperty("clientAppUrl")] + public string ClientAppUrl { get; set; } } /// diff --git a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs index e3b42c8f..ca93fd42 100644 --- a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs +++ b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs @@ -70,8 +70,41 @@ namespace PepperDash.Essentials "mobileauth", "Authorizes system to talk to cotija server", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => ShowInfo(), "mobileinfo", "Shows information for current mobile control session", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(s => { HttpDebugEnabled = (s.Trim() != "0"); }, + CrestronConsole.AddNewConsoleCommand(s => { + s = s.Trim(); + if(!string.IsNullOrEmpty(s)) + { + HttpDebugEnabled = (s.Trim() != "0"); + } + CrestronConsole.ConsoleCommandResponse("HTTP Debug {0}", HttpDebugEnabled ? "Enabled" : "Disabled"); + }, "mobilehttpdebug", "1 enables more verbose HTTP response debugging", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(s => + { + s = s.Trim(); + if (string.IsNullOrEmpty(s)) + { + CrestronConsole.ConsoleCommandResponse("Command must include http URL"); + return; + } + + try + { + var resp = new HttpClient().Get(s); + CrestronConsole.ConsoleCommandResponse("RESPONSE:\r{0}", resp); + + } + catch (HttpException e) + { + CrestronConsole.ConsoleCommandResponse("Exception in request:"); + CrestronConsole.ConsoleCommandResponse("Response URL: {0}", e.Response.ResponseUrl); + CrestronConsole.ConsoleCommandResponse("Response Error Code: {0}", e.Response.Code); + CrestronConsole.ConsoleCommandResponse("Response body: {0}", e.Response.ContentString); + } + + }, + "mobilehttprequest", "Tests an HTTP get to URL given", ConsoleAccessLevelEnum.AccessOperator); + } /// diff --git a/Essentials/PepperDashEssentials/Room/Cotija/RoomBridges/CotijaDdvc01RoomBridge.cs b/Essentials/PepperDashEssentials/Room/Cotija/RoomBridges/CotijaDdvc01RoomBridge.cs index 88720f3e..148d810d 100644 --- a/Essentials/PepperDashEssentials/Room/Cotija/RoomBridges/CotijaDdvc01RoomBridge.cs +++ b/Essentials/PepperDashEssentials/Room/Cotija/RoomBridges/CotijaDdvc01RoomBridge.cs @@ -520,7 +520,7 @@ namespace PepperDash.Essentials.Room.Cotija { Debug.Console(1, this, "Server user code changed: {0}", UserCode); EISC.StringInput[StringJoin.UserCodeToSystem].StringValue = UserCode; - EISC.StringInput[StringJoin.ServerUrl].StringValue = Parent.Config.ServerUrl; + EISC.StringInput[StringJoin.ServerUrl].StringValue = Parent.Config.ClientAppUrl; } /// diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 222d4285..d516fea6 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index 4b926470..0bf9eb39 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ