Skip to main content

Wrapper around the Shelly HTTP api forked from shellypy

Project description

shellypy2

not to be confused with pyShelly
Python 3 Wrapper around the Shelly HTTP api forked from the original ShellyPy project that seems to be dead or at least sleeping at the moment.

why

other packages like pyShelly only support CoAP or MSQT, neither I am comfortable 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
  • Shelly2PM
  • Shelly2.5
  • Shelly4Pro (untested)
  • Shelly Plug (untested)
  • Shelly PlugS
  • Shelly Bulb (untested)
  • Shelly H&T (Gen 1 and Gen 3)
  • 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

shellypy2-0.4.0.3.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file shellypy2-0.4.0.3.tar.gz.

File metadata

  • Download URL: shellypy2-0.4.0.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for shellypy2-0.4.0.3.tar.gz
Algorithm Hash digest
SHA256 d219a55acac65703805992e0364849f69d56df1f7807eb67f8d2c44ff8fad89d
MD5 75069cfef71f90ec0daad6c1ba93d92e
BLAKE2b-256 47e60ee7fccffa13fca6a0f714aabfad229f3caeffaeedae7cdcdcc530317917

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