A python package for your sinric-pro alexa skill
Project description
SINRIC PRO
- This is a python library for alexa home automation skill
SINRIC PRO https://sinric.pro/
Python-2.7 Not Supported
Functions:
Automate your home using alexa with sinricpro
Installation :
Python3
python3 -m pip install sinricpro --user
Pro Switch Demo:
from sinric import SinricPro from sinric import SinricProUdp from credentials import appKey, deviceId, secretKey from time import sleep def Events(): while True: # Select as per your requirements # REMOVE THE COMMENTS TO USE # client.event_handler.raiseEvent(deviceId1, 'setPowerState',data={'state': 'On'}) sleep(2) #Sleep for 2 seconds def onPowerState(did, state): # Alexa, turn ON/OFF Device print(did, state) return True, state eventsCallbacks={ "Events": Events } callbacks = { 'powerState': onPowerState } if __name__ == '__main__': client = SinricPro(appKey, deviceId, callbacks,event_callbacks=eventsCallbacks, enable_trace=False,secretKey=secretKey) udp_client = SinricProUdp(callbacks,deviceId,enable_trace=False) # Set it to True to start logging request Offline Request/Response client.handle_all(udp_client)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sinricpro-2.3.8.tar.gz
(10.6 kB
view hashes)
Built Distribution
sinricpro-2.3.8-py3-none-any.whl
(18.2 kB
view hashes)
Close
Hashes for sinricpro-2.3.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 018e358fdfa02e612b80693c1601518ef9f48fa9b7aff375858ac8cc1227e520 |
|
MD5 | c5d81243132919a2a14fd5860914c16d |
|
BLAKE2b-256 | 2991b988cd3512da113c5a130dd74ace96782e86ce8715bdd47ca126b16d9ec0 |