Skip to main content

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/

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

Project details


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)

Uploaded Source

Built Distribution

smartthings_rest-0.1.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page