Philips HUE lamps module for proxy.
2015.8.3 新版功能.
salt.proxy.philips_hue.
Const
¶Constants for the lamp operations.
COLOR_BLUE
= {'hue': 46920, 'sat': 254}¶COLOR_DAYLIGHT
= {'xy': [0.3806, 0.3576]}¶COLOR_GREEN
= {'hue': 25500, 'sat': 254}¶COLOR_ORANGE
= {'hue': 12000, 'sat': 254}¶COLOR_PINK
= {'xy': [0.3688, 0.2095]}¶COLOR_PURPLE
= {'xy': [0.3787, 0.1724]}¶COLOR_RED
= {'hue': 0, 'sat': 254}¶COLOR_WHITE
= {'xy': [0.3227, 0.329]}¶COLOR_YELLOW
= {'xy': [0.4432, 0.5154]}¶LAMP_OFF
= {'transitiontime': 0, 'on': False}¶LAMP_ON
= {'transitiontime': 0, 'on': True}¶salt.proxy.philips_hue.
call_alert
(*args, **kwargs)¶Lamp alert
Options:
CLI Example:
salt '*' hue.alert
salt '*' hue.alert id=1
salt '*' hue.alert id=1,2,3 on=false
salt.proxy.philips_hue.
call_blink
(*args, **kwargs)¶Blink a lamp. If lamp is ON, then blink ON-OFF-ON, otherwise OFF-ON-OFF.
Options:
CLI Example:
salt '*' hue.blink id=1
salt '*' hue.blink id=1,2,3
salt.proxy.philips_hue.
call_brightness
(*args, **kwargs)¶Set an effect to the lamp.
Arguments:
Options:
CLI Example:
salt '*' hue.brightness value=100
salt '*' hue.brightness id=1 value=150
salt '*' hue.brightness id=1,2,3 value=255
salt.proxy.philips_hue.
call_color
(*args, **kwargs)¶Set a color to the lamp.
Options:
id: Specifies a device ID. Can be a comma-separated values. All, if omitted.
yellow, daylight, purple. Default white.
transition: Transition 0~200.
Advanced:
More: http://www.developers.meethue.com/documentation/hue-xy-values
CLI Example:
salt '*' hue.color
salt '*' hue.color id=1
salt '*' hue.color id=1,2,3 oolor=red transition=30
salt '*' hue.color id=1 gamut=0.3,0.5
salt.proxy.philips_hue.
call_effect
(*args, **kwargs)¶Set an effect to the lamp.
Options:
CLI Example:
salt '*' hue.effect
salt '*' hue.effect id=1
salt '*' hue.effect id=1,2,3 type=colorloop
salt.proxy.philips_hue.
call_lights
(*args, **kwargs)¶Get info about all available lamps.
Options:
CLI Example:
salt '*' hue.lights
salt '*' hue.lights id=1
salt '*' hue.lights id=1,2,3
salt.proxy.philips_hue.
call_ping
(*args, **kwargs)¶Ping the lamps by issuing a short inversion blink to all available devices.
CLI Example:
salt '*' hue.ping
salt.proxy.philips_hue.
call_rename
(*args, **kwargs)¶Rename a device.
Options:
CLI Example:
salt '*' hue.rename id=1 title='WC for cats'
salt.proxy.philips_hue.
call_status
(*args, **kwargs)¶Return the status of the lamps.
Options:
CLI Example:
salt '*' hue.status
salt '*' hue.status id=1
salt '*' hue.status id=1,2,3
salt.proxy.philips_hue.
call_switch
(*args, **kwargs)¶Switch lamp ON/OFF.
If no particular state is passed, then lamp will be switched to the opposite state.
Options:
CLI Example:
salt '*' hue.switch
salt '*' hue.switch id=1
salt '*' hue.switch id=1,2,3 on=True
salt.proxy.philips_hue.
call_temperature
(*args, **kwargs)¶Set the mired color temperature. More: http://en.wikipedia.org/wiki/Mired
Arguments:
Options:
CLI Example:
salt '*' hue.temperature value=150
salt '*' hue.temperature value=150 id=1
salt '*' hue.temperature value=150 id=1,2,3
salt.proxy.philips_hue.
init
(cnf)¶Initialize the module.
salt.proxy.philips_hue.
ping
(*args, **kw)¶Ping the lamps.
salt.proxy.philips_hue.
shutdown
(opts, *args, **kw)¶Shuts down the service.