Skip to main content

Smartthings-rest

NOTE! work in progress

Smart and straightforward lib for controlling things with https://www.smartthings.com/

Offical smartthings docs

# 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

Metadata

Release files for smartthings-rest 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smartthings-rest 0.1.2
File Size Uploaded
smartthings-rest-0.1.2.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smartthings-rest 0.1.2
File Interpreter ABI Platform
smartthings_rest-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / smartthings-rest-0.1.2.tar.gz

Download URL smartthings-rest-0.1.2.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
20ab19f369de04bf6ff7f7f037fcaf757f4b29e29fae8d20ef994e977d2bf8bf
BLAKE2b-256 checksum
How to use checksums
dbdc53bd2b50ba3626c145d5d6f838b59a6f8af8a713695aeea99796ef821912
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/4.19.128-microsoft-standard

Release files / smartthings_rest-0.1.2-py3-none-any.whl

Download URL smartthings_rest-0.1.2-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb8d24f0c9092abe1a6e67633bae36c0b7d1ef88980bd0ecf2bbb02910949c54
BLAKE2b-256 checksum
How to use checksums
31fb0eb0771d38e4522ccb6fca0e9c2939a5db5c614b860243270402f5b499ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/4.19.128-microsoft-standard

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page