summaryrefslogtreecommitdiff
path: root/README.md
blob: 7e844d648ede5bf33f8a0ecd34a0f4b31b8f50d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# ShellyPy
not to be confused with [pyShelly](https://github.com/StyraHem/pyShelly)  
Python 2 and 3 Wrapper around the Shelly HTTP api


## why
other packages like [pyShelly](https://github.com/StyraHem/pyShelly) only support CoAP or MSQT, neither I am comfortable with using in personal projects


## example
here is a simple working example for the Shelly 1 that turns a relay on
```python
import ShellyPy

device = ShellyPy.Shelly("192.168.0.5")

device.relay(0, turn=True)
```
this example with comments can be found on [examples/toggle_relay.py](examples/toggle_relay.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](LICENSE)  
feel free to do whatever you want with it