Skip to main content

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)

examples/toggle_relay.py

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

ShellyPy-0.3.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

ShellyPy-0.3.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for ShellyPy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0749dc6cd0599b3acc12a97d59963ad8a87400c7c644a3ef21c8c9a8da155369
MD5 26f20100193a74d5c6bf54ad67e05f33
BLAKE2b-256 7fd91f1b84fdbff431feae5e843d92cf3b593616b10d8f1decc8e7c9a8573610

See more details on using hashes here.

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

Hashes for ShellyPy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a78d75aa6a7775da13cafb480a06651943792aa909dac006da15cf64f312f08c
MD5 2984cfb56a2594ff82da5018d0a31a42
BLAKE2b-256 2e5da1fe73bd37d18ea09467866160131ea7bdab1fda0dc5072f2a70b4ab02dd

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