Smart and straightforward lib for controlling things with smartthings
Project description
Smartthings-rest
NOTE! work in progress
Smart and straightforward lib for controlling things with https://www.smartthings.com/
# simple json printout of all
from smartthings_rest import SmartThings
st = SmartThings(personal_access_token)
print(st.devices())
export PAT="your_pat"
python3 hello_smartthings.py
Urls to add
https://api.smartthings.com/v1/devices/deviceId/status
https://api.smartthings.com/v1/devices/deviceId/components/main/capabilities/mediaInputSource/status
---
# Turn device on
https://api.smartthings.com/v1/devices/deviceId/commands
{
"commands": [
{
"component": "main",
"capability": "switch",
"command": "on"
}
]
}
# Turn device off
https://api.smartthings.com/v1/devices/deviceId/commands
{
"commands": [
{
"component": "main",
"capability": "switch",
"command": "off"
}
]
}
https://api.smartthings.com/v1/capabilities
https://api.smartthings.com/v1/capabilities/switch/1
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
smartthings-rest-0.1.2.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for smartthings_rest-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb8d24f0c9092abe1a6e67633bae36c0b7d1ef88980bd0ecf2bbb02910949c54 |
|
MD5 | d8b4d37d74abb95b6a4a4a848b413fe8 |
|
BLAKE2b-256 | 31fb0eb0771d38e4522ccb6fca0e9c2939a5db5c614b860243270402f5b499ad |