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.5.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sinricpro-2.3.5-py3-none-any.whl
(18.1 kB
view details)
File details
Details for the file sinricpro-2.3.5.tar.gz.
File metadata
- Download URL: sinricpro-2.3.5.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
214da5759e9e132a65a69443f6f832a483a883337682d1c0ab8ea5792bc21c76
|
|
| MD5 |
707f0bcc38742fd9ce25a870ce65d4ca
|
|
| BLAKE2b-256 |
7044e270a8c3bcc678e686684b8d3ef1a9832bfcc060c6a1b75978840519971d
|
File details
Details for the file sinricpro-2.3.5-py3-none-any.whl.
File metadata
- Download URL: sinricpro-2.3.5-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5458d93e0208310d85711c2b55f6d4009ebf8209383abcaedc8907ee180fa57b
|
|
| MD5 |
8bd53daab577302b64661c2c5f43e963
|
|
| BLAKE2b-256 |
529e87308d931cb535f503d0ef84f94fabb33c842443feeac0490b6e083dcad9
|