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) udp_client.enableUdpPrint(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-0.1.0.tar.gz
(10.7 kB
view hashes)
Built Distribution
sinricpro-0.1.0-py3-none-any.whl
(15.4 kB
view hashes)
Close
Hashes for sinricpro-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d1b8a5f293cdd0bb9e60dd4dc5d203aab7177f249167379f67c5f67e297f60 |
|
MD5 | fda4523ec10df161c2519b092e8a7b0c |
|
BLAKE2b-256 | ffd7ee3a3a1629fb89f92bb99e88982371e357233861866cfd1e1d04725d8c3e |