forked from studioimaginaire/phue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamples.py
211 lines (210 loc) · 8.43 KB
/
samples.py
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
LIGHTS1 = {
u'1': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Living Room Bulb',
u'state': {u'alert': u'none',
u'bri': 254,
u'colormode': u'xy',
u'ct': 382,
u'effect': u'none',
u'hue': 14665,
u'on': True,
u'reachable': True,
u'sat': 156,
u'xy': [0.4677, 0.4121]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:d1:fd:53-0b'},
u'10': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Porch 4',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 500,
u'effect': u'none',
u'hue': 11004,
u'on': False,
u'reachable': True,
u'sat': 252,
u'xy': [0.5593, 0.406]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:ec:74:ab-0b'},
u'11': {u'manufacturername': u'Philips',
u'modelid': u'LST002',
u'name': u'Living Room light strips',
u'state': {u'alert': u'none',
u'bri': 254,
u'colormode': u'xy',
u'ct': 389,
u'effect': u'none',
u'hue': 64967,
u'on': True,
u'reachable': True,
u'sat': 79,
u'xy': [0.472, 0.353]},
u'swversion': u'5.50.2.19072',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:01:1a:22:cd-0b'},
u'12': {u'manufacturername': u'Philips',
u'modelid': u'LCT007',
u'name': u'Arwen Dresser',
u'state': {u'alert': u'none',
u'bri': 251,
u'colormode': u'xy',
u'ct': 403,
u'effect': u'none',
u'hue': 14314,
u'on': False,
u'reachable': True,
u'sat': 172,
u'xy': [0.4791, 0.4139]},
u'swversion': u'5.50.1.19085',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:10:47:9a:fe-0b'},
u'13': {u'manufacturername': u'Philips',
u'modelid': u'LCT007',
u'name': u'Arwen Changing Table',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 488,
u'effect': u'none',
u'hue': 12713,
u'on': False,
u'reachable': True,
u'sat': 222,
u'xy': [0.5224, 0.414]},
u'swversion': u'5.50.1.19085',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:10:31:ee:f0-0b'},
u'2': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Bedroom Susan',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 153,
u'effect': u'none',
u'hue': 52067,
u'on': False,
u'reachable': True,
u'sat': 237,
u'xy': [0.3089, 0.1334]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:f9:02:ae-0b'},
u'3': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Bedroom Sean',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 153,
u'effect': u'none',
u'hue': 52067,
u'on': False,
u'reachable': True,
u'sat': 237,
u'xy': [0.3089, 0.1334]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:fe:00:e3-0b'},
u'4': {u'manufacturername': u'Philips',
u'modelid': u'LLC010',
u'name': u'Living Room Iris',
u'state': {u'alert': u'none',
u'bri': 254,
u'colormode': u'xy',
u'effect': u'none',
u'hue': 58619,
u'on': True,
u'reachable': True,
u'sat': 81,
u'xy': [0.4715, 0.3499]},
u'swversion': u'5.23.1.13452',
u'type': u'Color light',
u'uniqueid': u'00:17:88:01:00:12:01:83-0b'},
u'5': {u'manufacturername': u'Philips',
u'modelid': u'LST001',
u'name': u'Living Room Dim Strip',
u'state': {u'alert': u'none',
u'bri': 254,
u'colormode': u'xy',
u'effect': u'none',
u'hue': 58619,
u'on': True,
u'reachable': True,
u'sat': 81,
u'xy': [0.4715, 0.3499]},
u'swversion': u'5.23.1.13452',
u'type': u'Color light',
u'uniqueid': u'00:17:88:01:00:cd:b2:03-0b'},
u'6': {u'manufacturername': u'Philips',
u'modelid': u'LLC011',
u'name': u'Arwen Flower',
u'state': {u'alert': u'none',
u'bri': 3,
u'colormode': u'xy',
u'effect': u'none',
u'hue': 64654,
u'on': True,
u'reachable': True,
u'sat': 249,
u'xy': [0.6855, 0.2927]},
u'swversion': u'5.23.1.13452',
u'type': u'Color light',
u'uniqueid': u'00:17:88:01:00:c5:23:7e-0b'},
u'7': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Porch Fan 1',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 500,
u'effect': u'none',
u'hue': 11004,
u'on': False,
u'reachable': True,
u'sat': 252,
u'xy': [0.5593, 0.406]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:fe:8a:df-0b'},
u'8': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Porch Fan 2',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 500,
u'effect': u'none',
u'hue': 11004,
u'on': False,
u'reachable': True,
u'sat': 252,
u'xy': [0.5593, 0.406]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:f9:88:37-0b'},
u'9': {u'manufacturername': u'Philips',
u'modelid': u'LCT001',
u'name': u'Porch 3',
u'state': {u'alert': u'none',
u'bri': 117,
u'colormode': u'xy',
u'ct': 500,
u'effect': u'none',
u'hue': 11004,
u'on': False,
u'reachable': True,
u'sat': 252,
u'xy': [0.5593, 0.406]},
u'swversion': u'5.23.1.13452',
u'type': u'Extended color light',
u'uniqueid': u'00:17:88:01:00:fe:88:17-0b'}}
RESP = dict(GET=dict(), POST=dict(), PUT=dict(), DELETE=dict())
RESP['GET']['/api/username/lights/'] = LIGHTS1
for key, value in LIGHTS1.items():
RESP['GET']['/api/username/lights/%s' % key] = LIGHTS1[key]