I worked around the Log issue by creating a directory called "Logs." and the plugin then started logging. Here is what I found:
6/30/2017 20:23:21.778 Debug WebClientEx.DownloadDataIfAvailable - WebClient is busy, waiting 100ms... (100)
6/30/2017 20:23:21.781 Debug WebClientEx.DownloadDataIfAvailable - Downloading data from 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782478?_=1498879402'
6/30/2017 20:23:21.783 Debug WebClientEx.GetWebRequest - Getting WebRequest for 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782478?_=1498879402'
6/30/2017 20:23:21.785 Error HWConnection.GetData - Error retrieving data for device 2782478: An error occurred performing a WebClient request.
System.Net.WebException: An error occurred performing a WebClient request. ---> System.ArgumentException: This header must be modified with the appropiate property.
at System.Net.WebHeaderCollection.CheckRestrictedHeader (System.String headerName) [0x00000] in <filename unknown>:0
at System.Net.WebHeaderCollection.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.set_Headers (System.Net.WebHeaderCollection value) [0x00000] in <filename unknown>:0
at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.Uri address) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.String address) [0x00000] in <filename unknown>:0
at HSPI_SKWARE_HW_WIFI_TSTAT.WebClientEx.DownloadDataIfAvailabl e (System.String strURL) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HSPI_SKWARE_HW_WIFI_TSTAT.WebClientExownloadDataIfAvailable (string)
at HSPI_SKWARE_HW_WIFI_TSTAT.HWConnection.GetData (System.String strDeviceID, HSPI_SKWARE_HW_WIFI_TSTAT.ThermostatData& objCurrentData) [0x00000] in <filename unknown>:0
6/30/2017 20:23:21.800 Error ThermostatCommand.ProcessUpdateResults - Failed to retrieve thermostat data - error occurred, will retry
6/30/2017 20:23:21.803 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:24.803 Debug PluginLogic.m_objTimer_Elapsed - Queue is empty - stopping processor.
6/30/2017 20:23:24.804 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:33.616 Debug ThermostatDevice.RequestUpdate - Scheduling update of thermostat 'Media Room' (2782568)
6/30/2017 20:23:36.618 Debug PluginLogic.m_objTimer_Elapsed - Timer interval temporarily set to 2147483647, should not fire again for a while.
6/30/2017 20:23:36.619 Debug CommandQueue.CheckDuplicate - Checking for duplicate command scheduled in the future...
6/30/2017 20:23:36.621 Debug CommandQueue.Dequeue - Retrieved Update command.
6/30/2017 20:23:36.623 Debug PluginLogic.m_objTimer_Elapsed - Retrieved a command - processing...
6/30/2017 20:23:36.624 Debug ThermostatCommand.Execute - Processing Update command object
6/30/2017 20:23:36.626 Debug HWConnection.LoginIfNeeded - Last Login: 6/30/2017 20:17:03.385
6/30/2017 20:23:36.728 Debug WebClientEx.DownloadDataIfAvailable - WebClient is busy, waiting 100ms... (100)
6/30/2017 20:23:36.730 Debug WebClientEx.DownloadDataIfAvailable - Downloading data from 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782568?_=1498879417'
6/30/2017 20:23:36.732 Debug WebClientEx.GetWebRequest - Getting WebRequest for 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782568?_=1498879417'
6/30/2017 20:23:36.734 Error HWConnection.GetData - Error retrieving data for device 2782568: An error occurred performing a WebClient request.
System.Net.WebException: An error occurred performing a WebClient request. ---> System.ArgumentException: This header must be modified with the appropiate property.
at System.Net.WebHeaderCollection.CheckRestrictedHeader (System.String headerName) [0x00000] in <filename unknown>:0
at System.Net.WebHeaderCollection.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.set_Headers (System.Net.WebHeaderCollection value) [0x00000] in <filename unknown>:0
at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.Uri address) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.String address) [0x00000] in <filename unknown>:0
at HSPI_SKWARE_HW_WIFI_TSTAT.WebClientEx.DownloadDataIfAvailabl e (System.String strURL) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HSPI_SKWARE_HW_WIFI_TSTAT.WebClientExownloadDataIfAvailable (string)
at HSPI_SKWARE_HW_WIFI_TSTAT.HWConnection.GetData (System.String strDeviceID, HSPI_SKWARE_HW_WIFI_TSTAT.ThermostatData& objCurrentData) [0x00000] in <filename unknown>:0
6/30/2017 20:23:36.742 Error ThermostatCommand.ProcessUpdateResults - Failed to retrieve thermostat data - error occurred, will retry
6/30/2017 20:23:36.745 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:39.746 Debug PluginLogic.m_objTimer_Elapsed - Queue is empty - stopping processor.
6/30/2017 20:23:39.747 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
This article lists the restricted headers: https://stackoverflow.com/questions/...net-webrequest
Solution is to check if the header exists already or is restricted (WebHeaderCollection.IsRestricted(key)) before calling add (and use the modifier if it already exists vs adding it)
6/30/2017 20:23:21.778 Debug WebClientEx.DownloadDataIfAvailable - WebClient is busy, waiting 100ms... (100)
6/30/2017 20:23:21.781 Debug WebClientEx.DownloadDataIfAvailable - Downloading data from 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782478?_=1498879402'
6/30/2017 20:23:21.783 Debug WebClientEx.GetWebRequest - Getting WebRequest for 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782478?_=1498879402'
6/30/2017 20:23:21.785 Error HWConnection.GetData - Error retrieving data for device 2782478: An error occurred performing a WebClient request.
System.Net.WebException: An error occurred performing a WebClient request. ---> System.ArgumentException: This header must be modified with the appropiate property.
at System.Net.WebHeaderCollection.CheckRestrictedHeader (System.String headerName) [0x00000] in <filename unknown>:0
at System.Net.WebHeaderCollection.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.set_Headers (System.Net.WebHeaderCollection value) [0x00000] in <filename unknown>:0
at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.Uri address) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.String address) [0x00000] in <filename unknown>:0
at HSPI_SKWARE_HW_WIFI_TSTAT.WebClientEx.DownloadDataIfAvailabl e (System.String strURL) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HSPI_SKWARE_HW_WIFI_TSTAT.WebClientExownloadDataIfAvailable (string)
at HSPI_SKWARE_HW_WIFI_TSTAT.HWConnection.GetData (System.String strDeviceID, HSPI_SKWARE_HW_WIFI_TSTAT.ThermostatData& objCurrentData) [0x00000] in <filename unknown>:0
6/30/2017 20:23:21.800 Error ThermostatCommand.ProcessUpdateResults - Failed to retrieve thermostat data - error occurred, will retry
6/30/2017 20:23:21.803 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:24.803 Debug PluginLogic.m_objTimer_Elapsed - Queue is empty - stopping processor.
6/30/2017 20:23:24.804 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:33.616 Debug ThermostatDevice.RequestUpdate - Scheduling update of thermostat 'Media Room' (2782568)
6/30/2017 20:23:36.618 Debug PluginLogic.m_objTimer_Elapsed - Timer interval temporarily set to 2147483647, should not fire again for a while.
6/30/2017 20:23:36.619 Debug CommandQueue.CheckDuplicate - Checking for duplicate command scheduled in the future...
6/30/2017 20:23:36.621 Debug CommandQueue.Dequeue - Retrieved Update command.
6/30/2017 20:23:36.623 Debug PluginLogic.m_objTimer_Elapsed - Retrieved a command - processing...
6/30/2017 20:23:36.624 Debug ThermostatCommand.Execute - Processing Update command object
6/30/2017 20:23:36.626 Debug HWConnection.LoginIfNeeded - Last Login: 6/30/2017 20:17:03.385
6/30/2017 20:23:36.728 Debug WebClientEx.DownloadDataIfAvailable - WebClient is busy, waiting 100ms... (100)
6/30/2017 20:23:36.730 Debug WebClientEx.DownloadDataIfAvailable - Downloading data from 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782568?_=1498879417'
6/30/2017 20:23:36.732 Debug WebClientEx.GetWebRequest - Getting WebRequest for 'https://mytotalconnectcomfort.com/portal/Device/CheckDataSession/2782568?_=1498879417'
6/30/2017 20:23:36.734 Error HWConnection.GetData - Error retrieving data for device 2782568: An error occurred performing a WebClient request.
System.Net.WebException: An error occurred performing a WebClient request. ---> System.ArgumentException: This header must be modified with the appropiate property.
at System.Net.WebHeaderCollection.CheckRestrictedHeader (System.String headerName) [0x00000] in <filename unknown>:0
at System.Net.WebHeaderCollection.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.set_Headers (System.Net.WebHeaderCollection value) [0x00000] in <filename unknown>:0
at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.Uri address) [0x00000] in <filename unknown>:0
at System.Net.WebClient.DownloadData (System.String address) [0x00000] in <filename unknown>:0
at HSPI_SKWARE_HW_WIFI_TSTAT.WebClientEx.DownloadDataIfAvailabl e (System.String strURL) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HSPI_SKWARE_HW_WIFI_TSTAT.WebClientExownloadDataIfAvailable (string)
at HSPI_SKWARE_HW_WIFI_TSTAT.HWConnection.GetData (System.String strDeviceID, HSPI_SKWARE_HW_WIFI_TSTAT.ThermostatData& objCurrentData) [0x00000] in <filename unknown>:0
6/30/2017 20:23:36.742 Error ThermostatCommand.ProcessUpdateResults - Failed to retrieve thermostat data - error occurred, will retry
6/30/2017 20:23:36.745 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
6/30/2017 20:23:39.746 Debug PluginLogic.m_objTimer_Elapsed - Queue is empty - stopping processor.
6/30/2017 20:23:39.747 Debug PluginLogic.m_objTimer_Elapsed - Timer interval reset to 3000, should fire again soon.
This article lists the restricted headers: https://stackoverflow.com/questions/...net-webrequest
Solution is to check if the header exists already or is restricted (WebHeaderCollection.IsRestricted(key)) before calling add (and use the modifier if it already exists vs adding it)
Comment