-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphilips_hue_osram_lightify.conf
51 lines (31 loc) · 2.97 KB
/
philips_hue_osram_lightify.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# OLA Trigger config to control Philips Hue lights or Osram Lightify products (using a Philips Hue bridge)
# Copyright (C) 2015-2019 Johan Nilsson. https://gobo.ws
# Thanks to Simon Newton and Sean Sill
# Resources used from developers.meethue.com
# DMX protocol
###############################################################################
# Channel 1 lamp on/off. Value 0-114 lamp off. 140-255 lamp on
# Channel 2 lamp intensity. Value 0-255 low -> high
# Channel 3 Lightify plug on/off. Value 0-114 plug off. 140-255 plug on
# Comments
###############################################################################
# Responsiveness of the Hue bridge will slow down if you repeatedly send the on command, that's why we use 2 channels for the lamp
# Please notice that the Hue bridge has some frame rate limits
# Hue uses the range 1-254 to control the intensity, that's why the DMX value 0 is the same as 1 and the DMX value 255 is the same as 254
# Configuration
###############################################################################
hostname='192.168.0.1' # Hue bridge hostname or IP address
username='1028d66426293e821ecfd9ef1a0731df' # Hue bridge username
light_id='1' # Light ID number
plug_id='2' # Lightify plug ID number
ttime='4' # Set the soft fade time from the light's current state to the new state. Default value is 4 (400 ms) Set 0 to disable
# Triggers
###############################################################################
# Slot Values Action
1 0-114 -`curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":false,"transitiontime":${ttime}}' 'https://${hostname}/api/${username}/lights/${light_id}/state'`
1 140-255 +`curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":true,"transitiontime":${ttime}}' 'https://${hostname}/api/${username}/lights/${light_id}/state'`
2 0 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":1,"transitiontime":${ttime}}' 'https://${hostname}/api/${username}/lights/${light_id}/state'`
2 1-254 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":${slot_value},"transitiontime":${ttime}}' 'https://${hostname}/api/${username}/lights/${light_id}/state'`
2 255 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":254,"transitiontime":${ttime}}' 'https://${hostname}/api/${username}/lights/${light_id}/state'`
3 0-114 -`curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":false}' 'https://${hostname}/api/${username}/lights/${plug_id}/state'`
3 140-255 +`curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":true}' 'https://${hostname}/api/${username}/lights/${plug_id}/state'`