This library (and its accompanying cli tool) is used to interface with opple mobile-control lights.
All opple light with WIFI support (mobile control)
pip install pyoppleioclass OppleLightDevice
property:
- is_onlinee [True|False] Readonly
- power_on [True|False] Read/Write
- brightness [10-255] Read/Write
- color_temperature [2700-6500] Read/Write
method:
- init(ip)
- update()
frompyoppleio.OppleLightDeviceimportOppleLightDevicelight=OppleLightDevice('192.168.0.222')
ifnotlight.is_online:
print('light is offline')
elifnotlight.power_on:
light.power_on=Trueelse:
light.brightness=255- search lights
oppleio search
- get one light's status
oppleio get -a [light ip address]
- turn on of turn off one light
oppleio set -a [device ip address] -p on oppleio set -a [device ip address] -p off
- set light's brightness and color temperature
oppleio set -a [device ip address] -b 200 -c 4200