Coder Social home page Coder Social logo

shellypy's Introduction

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

shellypy's People

Contributors

jan200101 avatar h3tz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.