aboutsummaryrefslogtreecommitdiff
path: root/examples/roller.py
blob: 70a6446665cfc046b0d11f27fce2d0579ed5c926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import ShellyPy

device = ShellyPy.api.Device.connect("192.0.0.20")

# open all rollers
device.rollers.open()

# close all rollers
device.rollers.close()

# stop all rollers
device.rollers.stop()

# set roller 1 position to 50% (requires calibration)
device.rollers[1].pos = 50 # 50%

# calibrate roller 1 (will find new min and max position)
device.rollers[1].calibrate()