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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file smartthings-rest-0.1.2.tar.gz.

File metadata

  • Download URL: smartthings-rest-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/4.19.128-microsoft-standard

File hashes

Hashes for smartthings-rest-0.1.2.tar.gz
Algorithm Hash digest
SHA256 20ab19f369de04bf6ff7f7f037fcaf757f4b29e29fae8d20ef994e977d2bf8bf
MD5 63080d58ec73dce568347851b5183ea6
BLAKE2b-256 dbdc53bd2b50ba3626c145d5d6f838b59a6f8af8a713695aeea99796ef821912

See more details on using hashes here.

File details

Details for the file smartthings_rest-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: smartthings_rest-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/4.19.128-microsoft-standard

File hashes

Hashes for smartthings_rest-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb8d24f0c9092abe1a6e67633bae36c0b7d1ef88980bd0ecf2bbb02910949c54
MD5 d8b4d37d74abb95b6a4a4a848b413fe8
BLAKE2b-256 31fb0eb0771d38e4522ccb6fca0e9c2939a5db5c614b860243270402f5b499ad

See more details on using hashes here.

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