diff --git a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs index 4fa1aa8d..04233093 100644 --- a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] -[assembly: AssemblyVersion("1.1.0.*")] +[assembly: AssemblyVersion("1.1.1.*")] diff --git a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs index a0511d88..e3b42c8f 100644 --- a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs +++ b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs @@ -49,6 +49,11 @@ namespace PepperDash.Essentials List RoomBridges = new List(); long ButtonHeartbeatInterval = 1000; + + /// + /// Used for tracking HTTP debugging + /// + bool HttpDebugEnabled; /// /// @@ -65,6 +70,8 @@ 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"); }, + "mobilehttpdebug", "1 enables more verbose HTTP response debugging", ConsoleAccessLevelEnum.AccessOperator); } /// @@ -161,6 +168,8 @@ namespace PepperDash.Essentials req.Url.Parse(url); new HttpClient().DispatchAsync(req, (r, e) => { + CheckHttpDebug(r, e); + if (e == HTTP_CALLBACK_ERROR.COMPLETED && r.Code == 200) { Debug.Console(0, this, "System authorized, sending config."); @@ -307,6 +316,7 @@ namespace PepperDash.Essentials /// void RegistrationConnectionCallback(HttpClientResponse resp, HTTP_CALLBACK_ERROR err) { + CheckHttpDebug(resp, err); Debug.Console(1, this, "RegistrationConnectionCallback: {0}", err); try { @@ -423,6 +433,24 @@ namespace PepperDash.Essentials ResetOrStartHearbeatTimer(); } + /// + /// Outputs debug info when enabled + /// + /// + /// + /// + void CheckHttpDebug(HttpClientResponse r, HTTP_CALLBACK_ERROR e) + { + if (HttpDebugEnabled) + { + Debug.Console(0, this, "HTTP Response URL: {0}", r.ResponseUrl.ToString()); + Debug.Console(0, this, "----------------------------------------------------"); + Debug.Console(0, this, "HTTP Response 'error' {0}", e); + Debug.Console(0, this, "HTTP Response code: {0}", r.Code); + Debug.Console(0, this, "HTTP Response content: \r{0}", r.ContentString); + } + } + /// /// /// diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 1bc5efeb..222d4285 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 dd5f409f..4b926470 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ