zcc-helper 3.2.dev7__tar.gz → 3.2.dev9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/PKG-INFO +1 -1
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/__main__.py +7 -7
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/constants.py +1 -1
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/controller.py +7 -3
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc_helper.egg-info/PKG-INFO +1 -1
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/README.md +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/setup.cfg +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/setup.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/__init__.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/description.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/device.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/discovery.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/errors.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/protocol.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/socket.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/trace.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc/watchdog.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc.py +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc_helper.egg-info/SOURCES.txt +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc_helper.egg-info/dependency_links.txt +0 -0
- {zcc-helper-3.2.dev7 → zcc-helper-3.2.dev9}/zcc_helper.egg-info/top_level.txt +0 -0
|
@@ -81,28 +81,28 @@ async def main(args):
|
|
|
81
81
|
|
|
82
82
|
if device:
|
|
83
83
|
if 'CloseDoor' in options.action:
|
|
84
|
-
device.close_door()
|
|
84
|
+
await device.close_door()
|
|
85
85
|
elif 'OpenDoor' in options.action:
|
|
86
|
-
device.open_door()
|
|
86
|
+
await device.open_door()
|
|
87
87
|
elif 'TurnOn' in options.action:
|
|
88
|
-
device.turn_on()
|
|
88
|
+
await device.turn_on()
|
|
89
89
|
elif 'TurnOff' in options.action:
|
|
90
|
-
device.turn_off()
|
|
90
|
+
await device.turn_off()
|
|
91
91
|
elif 'OpenToPercentage' in options.action:
|
|
92
92
|
if options.value:
|
|
93
|
-
device.open_to_percentage(options.value)
|
|
93
|
+
await device.open_to_percentage(options.value)
|
|
94
94
|
else:
|
|
95
95
|
raise ControlPointError(
|
|
96
96
|
'OpenToPercentage requires --value')
|
|
97
97
|
elif 'SetBrightness' in options.action:
|
|
98
98
|
if options.value:
|
|
99
|
-
device.set_brightness(options.value)
|
|
99
|
+
await device.set_brightness(options.value)
|
|
100
100
|
else:
|
|
101
101
|
raise ControlPointError(
|
|
102
102
|
'SetBrightness requires --value')
|
|
103
103
|
elif 'SetFanSpeed' in options.action:
|
|
104
104
|
if options.value:
|
|
105
|
-
device.set_fanspeed(options.value)
|
|
105
|
+
await device.set_fanspeed(options.value)
|
|
106
106
|
else:
|
|
107
107
|
raise ControlPointError(
|
|
108
108
|
'SetFanSpeed requires --value')
|
|
@@ -318,13 +318,17 @@ class ControlPoint:
|
|
|
318
318
|
ControlPointProtocol.GATEWAY_PROPERTIES, None))
|
|
319
319
|
if response.get(ControlPointProtocol.ZCC_STATUS, None):
|
|
320
320
|
self.logger.error("ZCC status message\n%s", pformat(response))
|
|
321
|
+
await self.re_connect(reset=True)
|
|
321
322
|
|
|
322
|
-
async def re_connect(self):
|
|
323
|
+
async def re_connect(self, reset: bool = False):
|
|
323
324
|
'''Re-connect to a new socket and resend any queued messages.'''
|
|
324
325
|
|
|
325
|
-
|
|
326
|
+
if reset:
|
|
327
|
+
self.logger.error('Initiating new socket after existing socket reset')
|
|
328
|
+
else:
|
|
329
|
+
self.logger.error('Existing socket closed')
|
|
326
330
|
|
|
327
|
-
self.socket.unsubscribe()
|
|
331
|
+
self.socket.unsubscribe(self)
|
|
328
332
|
self.socket.close()
|
|
329
333
|
|
|
330
334
|
self.closed_socket = self.socket
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|