Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [2.6.3]

### Bugfix
* **Exit if the connection closed**
* **Example logging disabled**

## [2.6.2]

### Bugfix
Expand Down
2 changes: 1 addition & 1 deletion examples/blinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def range_value(device_id,state):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [BLINDS_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [BLINDS_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())
2 changes: 1 addition & 1 deletion examples/custom_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ def mode_value(device_id, mode_value, instance_id):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [DEVICE_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [DEVICE_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())
2 changes: 1 addition & 1 deletion examples/dim_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def power_level(device_id, powerLevel):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [DIM_SWITCH_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [DIM_SWITCH_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())

# client.event_handler.raiseEvent(deviceId1, 'setPowerState',data={'state': 'On'})
2 changes: 1 addition & 1 deletion examples/garagedoor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def set_mode(did, state):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [GARAGEDOOR_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [GARAGEDOOR_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())
2 changes: 1 addition & 1 deletion examples/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def decrease_color_temperature(device_id, value):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [LIGHT_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [LIGHT_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())

# To update the light state on server.
Expand Down
2 changes: 1 addition & 1 deletion examples/smart_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def lock_state(device_id, state):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [LOCK_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [LOCK_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())


Expand Down
2 changes: 1 addition & 1 deletion examples/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def set_mute(device_id, mute):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [SPEAKER_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [SPEAKER_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())

# To update the speaker state on server.
Expand Down
2 changes: 1 addition & 1 deletion examples/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def power_state(device_id, state):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [SWITCH_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [SWITCH_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())

# To update the power state on server.
Expand Down
2 changes: 1 addition & 1 deletion examples/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def skip_channels(device_id, channel_count):

if __name__ == '__main__':
loop = asyncio.get_event_loop()
client = SinricPro(APP_KEY, [TV_ID], callbacks, enable_log=True, restore_states=False, secretKey=APP_SECRET)
client = SinricPro(APP_KEY, [TV_ID], callbacks, enable_log=False, restore_states=False, secretKey=APP_SECRET)
loop.run_until_complete(client.connect())

# To update the TV state on server:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if sys.version_info < (3,6):
sys.exit('Sorry, Python < 3.6 is not supported')

VERSION = "2.6.2"
VERSION = "2.6.3"

with open('README.rst', 'r') as f:
long_description = f.read()
Expand Down
3 changes: 1 addition & 2 deletions sinric/_sinricprosocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ async def receiveMessage(self, connection):
await asyncio.sleep(self.loopDelay)
except ConnectionClosed as e:
self.logger.info('Connection with server closed')
self.logger.exception(e)
break
raise e

async def handleQueue(self):
while True:
Expand Down