Skip to main content

Library for Shelly smart home devices

Project description

founder-wip buy me a coffee

stability-wip PyPI

pyShelly

Library for Shelly smart home devices. Using CoAP for auto discovery and status updates.

This library was created for Shelly Plugins for Home Assistant and Telldus Tellstick Net/zNet v2.

Features

  • Discover devices
  • Monitor status
  • Monitor switch status
  • Control (turn on/off etc)
  • MQTT Server (buildin MQTT server that devices can connect to directly)
  • MQTT Client (using a MQTT broker)
  • Websocket
  • Run only locally
  • Support user name and password
  • Coexist with Shelly Cloud and Shelly app
  • Support static and dynamic ip address
  • mDns and MQTT discovery
  • RPC (gen 2 devices)
  • Cloud support (Get names of devices etc)

Devices supported

Gen 1 devices

  • Shelly 1
  • Shelly 1 PM (bug in firmware)
  • Shelly 1L
  • Shelly Addon for 1/1PM, temp and humidity
  • Shelly 2 (relay or roller mode)
  • Shelly 4 Pro
  • Shelly Plug
  • Shelly Plug S
  • Shelly BULB
  • Shelly RGBWW
  • Shelly RGBW2
  • Shelly H&T
  • Shelly EM
  • Shelly 2.5 (relay or roller mode)
  • Shelly 2LED
  • Shelly Flood
  • Shelly Door/Window
  • Shelly Door/Window 2
  • Shelly Dimmer
  • Shelly Dimmer 2
  • Shelly EM
  • Shelly 3EM
  • Shelly DUO
  • Shelly Vintage
  • Shelly i3
  • Shelly Button 1
  • Shelly Gas
  • Shelly Air (not tested)

Plus devices

  • Shelly Plus 1
  • Shelly Plus 1 Mini
  • Shelly Plus 1PM
  • Shelly Plus 2
  • Shelly Plus 2PM
  • Shelly Plus i3
  • Shelly Plus Plug S

Pro devices

  • Shelly Pro 1
  • Shelly Pro 1PM
  • Shelly Pro 2
  • Shelly Pro 2PM
  • Shelly Pro 4PM

Comming soon

  • Shelly TRV
  • Shelly Plus H&T

Usage

from pyShelly import pyShelly

def device_added(dev,code):
  print (dev," ",code)

shelly = pyShelly()
print("version:",shelly.version())

shelly.cb_device_added.append(device_added)
shelly.start()
shelly.discover()

while True:
    pass 

Feedback

Please give us feedback on info@styrahem.se or Facebook groups: Shelly grupp (Swedish) or Shelly support group (English)

Founder

This plugin is created by the StyraHem.se, the Swedish distributor of Shelly. In Sweden you can buy Shellies from StyraHem.se or any of the retailers like NetOnNet, Kjell&Company etc.

buy me a coffee

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyshelly-1.0.4.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

pyShelly-1.0.4-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file pyshelly-1.0.4.tar.gz.

File metadata

  • Download URL: pyshelly-1.0.4.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyshelly-1.0.4.tar.gz
Algorithm Hash digest
SHA256 42918dda1145cb673c40133d214b9e255a59c08bece74116a757cdf566ede0a4
MD5 9c86b2fb767a992c4cdfb579726118da
BLAKE2b-256 0165db67d24e4cd9f6aafcd9dd4a79481603a7d1c13fce72623c5bce1ea61c06

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyshelly-1.0.4.tar.gz:

Publisher: python-publish.yml on StyraHem/pyShelly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyShelly-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyShelly-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyShelly-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 55a401997e46d7f284f1cd6eff6fad469b3f560f16214b361a038c9367597fec
MD5 dc33608b6d51e406f1fa29f8dc8924ea
BLAKE2b-256 60db570895e417c3203d60154d757d4e98a00a2e09ecff0a2f518bdd2aedf3f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyShelly-1.0.4-py3-none-any.whl:

Publisher: python-publish.yml on StyraHem/pyShelly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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