From a0b8ecee2698a2b14936bfe34873daacfb32e249 Mon Sep 17 00:00:00 2001 From: DaveL17 Date: Wed, 29 May 2019 04:39:01 -0500 Subject: [PATCH] Adds proc.returncode to curl error warning to start to be more explicit about trapping unsuccessful results. --- GhostXML.indigoPlugin/Contents/Info.plist | 2 +- .../Contents/Server Plugin/plugin.py | 7 +++++-- _changelog.txt | 3 +++ feature_requests.txt | 11 +++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 feature_requests.txt diff --git a/GhostXML.indigoPlugin/Contents/Info.plist b/GhostXML.indigoPlugin/Contents/Info.plist index d32bb29..c47a40d 100755 --- a/GhostXML.indigoPlugin/Contents/Info.plist +++ b/GhostXML.indigoPlugin/Contents/Info.plist @@ -3,7 +3,7 @@ PluginVersion - 0.4.30 + 0.4.31 ServerApiVersion 2.0 IwsApiVersion diff --git a/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py b/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py index 7944155..f1dce2d 100644 --- a/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py +++ b/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py @@ -45,7 +45,7 @@ __copyright__ = u"There is no copyright for the GhostXML code base." __license__ = u"MIT" __title__ = u"GhostXML Plugin for Indigo Home Control" -__version__ = u"0.4.30" +__version__ = u"0.4.31" # Establish default plugin prefs; create them if they don't already exist. kDefaultPluginPrefs = { @@ -749,8 +749,11 @@ def get_the_data(self, dev): timer_kill.cancel() # ============================================================================= + # TODO: Get more specific on what the proc.returncode is. For example, this error: + # 2019-05-28 22:59:02.650 GhostXML Warning [607047935] curl error * Trying 162.58.33.179... * TCP_NODELAY set . + # doesn't give the user much information on why the call was unsuccessful. if int(proc.returncode) != 0: - self.host_plugin.logger.warning(u"[{0}] curl error {1}.".format(dev.name, err.replace('\n', ' '))) + self.host_plugin.logger.warning(u"[{0}] curl error {1}. [Return code: {2}".format(dev.name, err.replace('\n', ' '), proc.returncode)) return result diff --git a/_changelog.txt b/_changelog.txt index bfb87f0..82cf546 100644 --- a/_changelog.txt +++ b/_changelog.txt @@ -1,5 +1,8 @@ GhostXML Change Log +v0.4.31 +- + v0.4.30 - Adds sendDevicePing() trap. diff --git a/feature_requests.txt b/feature_requests.txt new file mode 100644 index 0000000..2b71ae9 --- /dev/null +++ b/feature_requests.txt @@ -0,0 +1,11 @@ +=============================================================================== +GhostXML Plugin Feature Requests +=============================================================================== + +=============================================================================== +2019-05-24 Multiple Users +=============================================================================== +Present custom states as their "inherent" type. + +DaveL17 - Consider howartp's suggestion to present this as a second device +type (i.e., original string states and another literal states).