Wrapper around the Shelly HTTP api
Project description
ShellyPy
not to be confused with pyShelly
Python 2 and 3 Wrapper around the Shelly HTTP api
why
other packages like pyShelly only support CoAP or MSQT, neither I am comfortable with using in personal projects
examples
relay
a simple working example for the Shelly 1 that turns a relay on
import ShellyPy
device = ShellyPy.Shelly("192.168.0.5")
device.relay(0, turn=True)
monitor
a simple working example for the Shelly 1 that request monitor information
import ShellyPy
device = ShellyPy.Shelly("192.168.68.121")
deviceMeter = device.meter(0) #request meter information
print(deviceMeter['power']) #print power information
print(deviceMeter['total']) #print total information
other examples are available as well examples/meter.py
devices
supported
- Shelly1
- Shelly1PM
- Shelly2
- Shelly2.5
- Shelly4Pro (untested)
- Shelly Plug (untested)
- Shelly PlugS (untested)
- Shelly Bulb (untested)
- Shelly H&T (untested)
- Shelly Smoke (untested)
- Shelly EM (untested)
- Shelly flood (untested)
unsupported
- Shelly Sense (documentation is inaccurate, incomplete)
- Shelly RGBW (documentation is incomplete)
applicability
this wrapper is best used in closed networks where other solutions are either not an option or not desired
give your shelly devices static IP adresses for best results
license
this project is licensed under the MIT License
feel free to do whatever you want with it
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
Built Distribution
File details
Details for the file ShellyPy-0.3.0.tar.gz
.
File metadata
- Download URL: ShellyPy-0.3.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0749dc6cd0599b3acc12a97d59963ad8a87400c7c644a3ef21c8c9a8da155369 |
|
MD5 | 26f20100193a74d5c6bf54ad67e05f33 |
|
BLAKE2b-256 | 7fd91f1b84fdbff431feae5e843d92cf3b593616b10d8f1decc8e7c9a8573610 |
File details
Details for the file ShellyPy-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: ShellyPy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a78d75aa6a7775da13cafb480a06651943792aa909dac006da15cf64f312f08c |
|
MD5 | 2984cfb56a2594ff82da5018d0a31a42 |
|
BLAKE2b-256 | 2e5da1fe73bd37d18ea09467866160131ea7bdab1fda0dc5072f2a70b4ab02dd |