ZachBenz / RingForIndigo

Ring plugin for Indigo Home Automation Server from Indigo Domotics
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Handle system sleep gracefully #3

Open ZachBenz opened 4 years ago

ZachBenz commented 4 years ago

These come up on my development laptop when putting system to sleep or waking from it:

   Ring Error                      Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 120, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/__init__.py", line 291, in doorbells
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/__init__.py", line 265, in __devices
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/__init__.py", line 183, in query
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/ring_doorbell/__init__.py", line 98, in _get_oauth_token
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/requests/sessions.py", line 581, in post
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/requests/sessions.py", line 533, in request
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/requests/sessions.py", line 646, in send
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/RingForIndigo.indigoPlugin/Contents/Server Plugin/requests/adapters.py", line 498, in send
ConnectionError: ('Connection aborted.', error("(60, 'ETIMEDOUT')",))

   Ring Error                      plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
ZachBenz commented 4 years ago

Probably should handle ConnectionError in addition to coding in graceful sleep/wake

ZachBenz commented 4 years ago

Added issue #23 to separately track ConnectionError issue