Closed rp1231 closed 2 years ago
Hi does wizlight work for you?
$ wizlight state
IP address of the bulb: IP
Get the state from IP
{'mac': MAC, 'rssi': -56, 'src': '', 'state': True, 'sceneId': 23, 'speed': 100, 'dimming': 100}
Yes it works, But the problem is that it requires an extra step of inputting the ip address. The ip address can't be passed as an argument like it can be in wizcon.
I'm trying to use this for a rainmeter skin, so that it can show a deactivated state when the bulb is off.
It works for me in version 0.5.14. if I add the --ip
option:
wizlight state --ip IP
Get the state from IP
{'mac': 'X', 'rssi': -63, 'src': '', 'state': False, 'sceneId': 11, 'temp': 2700, 'dimming': 100}
wizlight state --help
Usage: wizlight state [OPTIONS]
Get the current state of a given bulb.
Options:
--ip TEXT IP address of the bulb.
--help Show this message and exit.
Aah I see, That works for me. Thanks.
Is it possible to get only the state (true or false) via a command? Thanks
Here's a roundabout quick and dirty way of doing it I think, assuming you're using bash shell:
wizlight state --ip 192.168.1.100 > bulb-state.json sed 's/'\''/\"/g' < bulb-state.json python -c 'import json; print(json.load(open("bulb-state.json"))["state"])'
Hi,
It would be nice to have a 'get' command to get the power state(on/off), brightness, color temperature etc.
Thanks