Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 868 Bytes

README.md

File metadata and controls

50 lines (37 loc) · 868 Bytes

Python control for Zengge Wi-Fi LED bulbs

Example usage

Connecting

import zenggewifi

bulb = zenggewifi.ZenggeWifiBulb('192.168.1.20')
bulb.connect()

Get State

state = bulb.get_status()

Returns a status object which contains of these members:

state.deviceType # Type of device
state.isOn # whether device is on
state.Mode # current mode
state.Slowness # current slowness
state.Color # current color, color object
state.LedVersionNum # version of LED

Set Color

bulb.set_on(color)

Color object has these members:

self.R # Red value [0-255]
self.G # Green value [0-255]
self.B # Blue value [0-255]
self.W # Warmwhite value [0-255]
self.IgnoreW # Whether warmwhite is ignored (then RGB is used) or not (then only warmwhite is used)

Turn off

bulb.set_off()