Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / Variables and events for each device
1 //
2 //For Alarms:
3 String currentAlarm or String alarm
4 /*events*/
5 alarmObject.setValue([name: "alarm", value: "both", deviceId: "alarmID0", descriptionText: "",
6 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
7 alarmObject.setValue([name: "alarm", value: "siren", deviceId: "alarmID0", descriptionText: "",
8 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
9 alarmObject.setValue([name: "alarm", value: "strobe", deviceId: "alarmID0", descriptionText: "",
10 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
11 alarmObject.setValue([name: "alarm", value: "off", deviceId: "alarmID0", descriptionText: "",
12 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
13 /*events*/
14 //
15 -------------------------------------------------------------------------------
16
17
18 //For Contact Sensor:
19 String currentContact or String contactState
20 /*events*/
21 /////
22 contactObject.setValue([name: "contact.closed", value: "closed", deviceId: "contactSensorID0", descriptionText: "",
23 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
24 contactObject.setValue([name: "contact.open", value: "open", deviceId: "contactSensorID0", descriptionText: "",
25 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
26 /////
27 /*events*/
28 //
29 -------------------------------------------------------------------------------
30
31
32 //For DoorControl:
33 String doorState
34 /*events*/
35 doorControlObject.setValue([name: "doorState", value: "closed", deviceId: "doorControlID0", descriptionText: "",
36 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
37 doorControlObject.setValue([name: "doorState", value: "open", deviceId: "doorControlID0", descriptionText: "",
38 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
39 /////
40 /*events*/
41 //
42 -------------------------------------------------------------------------------
43
44
45 //For Location:
46 String location.mode
47 /*events*/
48 locationObject.setValue([name: "Location", value: "away", deviceId: "locationID0", descriptionText: "",
49 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
50 locationObject.setValue([name: "Location", value: "home", deviceId: "locationID0", descriptionText: "",
51 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
52 locationObject.setValue([name: "Location", value: "night", deviceId: "locationID0", descriptionText: "",
53 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
54 /*events*/
55 //
56 -------------------------------------------------------------------------------
57
58
59 //For Locks:
60 String currentLock or String lockState
61 /*events*/
62 lockObject.setValue([name: "lock", value: "locked", deviceId: "lockID0", descriptionText: "",
63 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
64 lockObject.setValue([name: "unlock", value: "unlocked ", deviceId: "lockID0", descriptionText: "",
65 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
66 /////
67 /*events*/
68 //
69 -------------------------------------------------------------------------------
70
71
72 //For MotionSensors:
73 String currentMotion or String motion
74 /*events*/
75 motionSensorObject.setValue([name: "motion", value: "active", deviceId: "motionSensorID0", descriptionText: "",
76 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
77 motionSensorObject.setValue([name: "motion", value: "inactive", deviceId: "motionSensorID0", descriptionText: "",
78 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
79 /////
80 /*events*/
81 //
82 -------------------------------------------------------------------------------
83
84
85 //For MusicPlayer:
86 String status
87 int level
88 String trackDescription
89 String trackData
90 String mute
91 /*events*/
92 musicPlayerObject.setValue([name: "status", value: "playing", deviceId: "musicPlayerID0", descriptionText: "",
93 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
94 musicPlayerObject.setValue([name: "status", value: "stopped", deviceId: "musicPlayerID0", descriptionText: "",
95 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
96 musicPlayerObject.setValue([name: "status", value: "paused", deviceId: "musicPlayerID0", descriptionText: "",
97 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
98 musicPlayerObject.setValue([name: "level", value: "36"/*A number between 0 to 100 as a charge*/, deviceId: "musicPlayerID0", descriptionText: "",
99 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
100 musicPlayerObject.setValue([name: "trackDescription", value: "someDescriptions", deviceId: "musicPlayerID0", descriptionText: "",
101 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
102 musicPlayerObject.setValue([name: "trackData", value: "someTrack", deviceId: "musicPlayerID0", descriptionText: "",
103 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
104 musicPlayerObject.setValue([name: "mute", value: "umuted", deviceId: "musicPlayerID0", descriptionText: "",
105 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
106 musicPlayerObject.setValue([name: "mute", value: "muted", deviceId: "musicPlayerID0", descriptionText: "",
107 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
108 /*events*/
109 //
110 -------------------------------------------------------------------------------
111
112
113 //For PresenceSensor:
114 String currentPresence or String presenceState
115 /*events*/
116 presenceSensorObject.setValue([name: "presence", value: "present", deviceId: "presenceSensorID0", descriptionText: "",
117 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
118 presenceSensorObject.setValue([name: "presence", value: "not present", deviceId: "presenceSensorID0", descriptionText: "",
119 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
120 /////
121 /*events*/
122 //
123 -------------------------------------------------------------------------------
124
125
126 //For SmokeDetector:
127 String currentSmokeValue or String smoke
128 /*events*/
129 smokeDetectorObject.setValue([name: "smoke", value: "clear", deviceId: "smokeDetectorID0", descriptionText: "",
130 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
131 smokeDetectorObject.setValue([name: "smoke", value: "detected", deviceId: "smokeDetectorID0", descriptionText: "",
132 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
133 smokeDetectorObject.setValue([name: "smoke", value: "tested", deviceId: "smokeDetectorID0", descriptionText: "",
134 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
135 smokeDetectorObject.setValue([name: "carbonMonoxide", value: "clear", deviceId: "smokeDetectorID0", descriptionText: "",
136 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
137 smokeDetectorObject.setValue([name: "carbonMonoxide", value: "detected", deviceId: "smokeDetectorID0", descriptionText: "",
138 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
139 smokeDetectorObject.setValue([name: "carbonMonoxide", value: "tested", deviceId: "smokeDetectorID0", descriptionText: "",
140 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
141 smokeDetectorObject.setValue([name: "battery", value: "5"/*A number between 0 to 100 as a charge*/, deviceId: "smokeDetectorID0", descriptionText: "",
142 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
143 /////
144 /*events*/
145 //
146 -------------------------------------------------------------------------------
147
148
149 //For Thermostats:(we have different features in each line)
150 int heatingSetpoint or currentHeatingSetpoint //heating set point
151 int thermostatSetpoint //normal set point
152 int coolingSetpoint or currentCoolingSetpoint //cooling set point
153 String thermostatOperatingState //operating state
154 String thermostatFanMode //fan mode
155 String thermostatMode or currentThermostatMode //mode
156 /*events*/
157 thermostatObject.setValue([name: "thermostatMode", value: "auto", deviceId: "thermostatID0", descriptionText: "",
158 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
159 thermostatObject.setValue([name: "thermostatMode", value: "cool", deviceId: "thermostatID0", descriptionText: "",
160 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
161 thermostatObject.setValue([name: "thermostatMode", value: "emergencyHeat", deviceId: "thermostatID0", descriptionText: "",
162 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
163 thermostatObject.setValue([name: "thermostatMode", value: "heat", deviceId: "thermostatID0", descriptionText: "",
164 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
165 thermostatObject.setValue([name: "thermostatMode", value: "off", deviceId: "thermostatID0", descriptionText: "",
166 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
167 thermostatObject.setValue([name: "temperature", value: "55", deviceId: "thermostatID0", descriptionText: "",
168 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
169 thermostatObject.setValue([name: "heatingSetpoint", value: "40", deviceId: "thermostatID0", descriptionText: "",
170 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
171 thermostatObject.setValue([name: "coolingSetpoint", value: "60", deviceId: "thermostatID0", descriptionText: "",
172 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
173 thermostatObject.setValue([name: "thermostatSetpoint", value: "50", deviceId: "thermostatID0", descriptionText: "",
174 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
175 thermostatObject.setValue([name: "thermostatFanMode", value: "auto", deviceId: "thermostatID0", descriptionText: "",
176 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
177 thermostatObject.setValue([name: "thermostatFanMode", value: "fanCirculate", deviceId: "thermostatID0", descriptionText: "",
178 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
179 thermostatObject.setValue([name: "thermostatFanMode", value: "circulate", deviceId: "thermostatID0", descriptionText: "",
180 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
181 thermostatObject.setValue([name: "thermostatFanMode", value: "fanOn", deviceId: "thermostatID0", descriptionText: "",
182 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
183 thermostatObject.setValue([name: "thermostatFanMode", value: "on", deviceId: "thermostatID0", descriptionText: "",
184 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
185 thermostatObject.setValue([name: "thermostatOperatingState", value: "auto", deviceId: "thermostatID0", descriptionText: "",
186 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
187 thermostatObject.setValue([name: "thermostatOperatingState", value: "cool", deviceId: "thermostatID0", descriptionText: "",
188 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
189 thermostatObject.setValue([name: "thermostatOperatingState", value: "off", deviceId: "thermostatID0", descriptionText: "",
190 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
191 thermostatObject.setValue([name: "thermostatOperatingState", value: "emergencyHeat", deviceId: "thermostatID0", descriptionText: "",
192 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
193 thermostatObject.setValue([name: "thermostatOperatingState", value: "heat", deviceId: "thermostatID0", descriptionText: "",
194 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
195 /////
196 /*events*/
197 //
198 -------------------------------------------------------------------------------
199
200
201 //For Switches:
202 String currentSwitch or switchState
203 /*events*/
204 switchObject.setValue([name: "switch", value: "off", deviceId: "switchID0", descriptionText: "",
205 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
206 switchObject.setValue([name: "switch", value: "on", deviceId: "switchID0", descriptionText: "",
207 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
208 /////
209 /*events*/
210 //
211 -------------------------------------------------------------------------------
212
213
214 //For appTouch:
215 /*events*/
216 appObject.setValue([name: "Touched", value: "touched", deviceId: "touchedSensorID0", descriptionText: "",
217 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
218 /////
219 /*events*/
220 //
221 -------------------------------------------------------------------------------
222
223
224 //For nfcTouch:
225 /*events*/
226 touchSensorObject.setValue([name: "nfcTouch", value: "touched", deviceId: "nfcSensorID0", descriptionText: "",
227 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
228 /////
229 /*events*/
230 //
231 -------------------------------------------------------------------------------
232
233
234 //For aeonKeyFob push button:
235 /*events*/
236 aeonKeyFobObject.setValue([name: "button", value: "pushed", deviceId: "aeonKeyFobID0", descriptionText: "",
237 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
238 aeonKeyFobObject.setValue([name: "button", value: "held", deviceId: "aeonKeyFobID0", descriptionText: "",
239 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
240 /////
241 /////
242 /*events*/
243 //
244 -------------------------------------------------------------------------------
245
246
247 //For acceleration sensor:
248 String currentAcceleration or String acceleration
249 /*events*/
250 accelerationSensorObject.setValue([name: "acceleration", value: "active", deviceId: "accelerationSensorID0", descriptionText: "",
251 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
252 accelerationSensorObject.setValue([name: "acceleration", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "",
253 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
254 /////
255 /*events*/
256 //
257 -------------------------------------------------------------------------------
258
259
260 //For battery:
261 int currentBattery or int battery
262 /*events*/
263 batteryObject.setValue([name: "battery", value: "50"/*number between 0 to 100 as a string*/, deviceId: "batteryID0", descriptionText: "",
264 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
265 /*events*/
266 //
267 -------------------------------------------------------------------------------
268
269
270 //For beacon sensor:
271 String currentPresence or String presence
272 /*events*/
273 beaconSensorObject.setValue([name: "beacon", value: "present", deviceId: "beaconeSensorID0", descriptionText: "",
274 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
275 beaconSensorObject.setValue([name: "beacon", value: "not present", deviceId: "beaconSensorID0", descriptionText: "",
276 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
277 /////
278 /*events*/
279 //
280 -------------------------------------------------------------------------------
281
282
283 //For carbon monoxide:
284 String currentCarbonMonoxideValue or String carbonMonoxide
285 /*events*/
286 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "clear", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
287 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
288 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "detected", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
289 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
290 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "tested", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
291 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
292 /*events*/
293 //
294 -------------------------------------------------------------------------------
295
296
297 //For color control:
298 String color
299 int hue
300 int saturation
301 /*events*/
302 colorControlObject.setValue([name: "color", value: "red", deviceId: "colorControlID0", descriptionText: "",
303 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
304 colorControlObject.setValue([name: "hue", value: "50", deviceId: "colorControlID0", descriptionText: "",
305 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
306 colorControlObject.setValue([name: "saturation", value: "50", deviceId: "colorControlID0", descriptionText: "",
307 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
308 /*events*/
309 //
310 -------------------------------------------------------------------------------
311
312
313 //For energy meter:
314 int energy or int currentEnergy
315 /*events*/
316 energyMeterObject.setValue([name: "energy", value: "45"/*A number between 0 to 100 as a charge*/, deviceId: "energyMeterID0", descriptionText: "",
317 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
318 /*events*/
319 //
320 -------------------------------------------------------------------------------
321
322
323 //For illuminance measurement:
324 int illuminance or int currentIlluminance
325 /*events*/
326 illuminanceMeasurementObject.setValue([name: "illuminance", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "illuminanceMeasurementID0", descriptionText: "",
327 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
328 /*events*/
329 //
330 -------------------------------------------------------------------------------
331
332
333 //For power meter:
334 int power or int currentPower
335 /*events*/
336 powerMeterObject.setValue([name: "power", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "powerMeterID0", descriptionText: "",
337 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
338 /*events*/
339 //
340 -------------------------------------------------------------------------------
341
342
343 //For relative humidity measurement:
344 int humidity or int currentHumidity
345 /*events*/
346 humidityMeasurementObject.setValue([name: "humidity", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "humidityMeasurementID0", descriptionText: "",
347 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
348 /*events*/
349 //
350 -------------------------------------------------------------------------------
351
352
353 //For relay switches:
354 String currentSwitch or switchState
355 /*events*/
356 switchObject.setValue([name: "switch", value: "off", deviceId: "relaySwitchID0", descriptionText: "",
357 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
358 switchObject.setValue([name: "switch", value: "on", deviceId: "relaySwitchID0", descriptionText: "",
359 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
360 /////
361 /*events*/
362 //
363 -------------------------------------------------------------------------------
364
365
366 //For sleep sensor:
367 String sleeping
368 /*events*/
369 sleepSensorObject.setValue([name: "sleeping", value: "sleeping", deviceId: "sleepSensorID0", descriptionText: "",
370 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
371 sleepSensorObject.setValue([name: "sleeping", value: "not sleeping", deviceId: "sleepSensorID0", descriptionText: "",
372 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
373 /////
374 /*events*/
375 //
376 -------------------------------------------------------------------------------
377
378
379 //For step sensor:
380 int goal
381 int steps
382 /*events*/
383 stepSensorObject.setValue([name: "goal", value: "100"/*A number*/, deviceId: "stepSensorID0", descriptionText: "",
384 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
385 stepSensorObject.setValue([name: "steps", value: "46"/*A number*/, deviceId: "stepSensorID0", descriptionText: "",
386 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
387 /////
388 /*events*/
389 //
390 -------------------------------------------------------------------------------
391
392
393 //For switch levels:
394 int level or int rate
395 /*events*/
396 switchLevelObject.setValue([name: "level", value: "45"/*A number between 0 to 100*/, deviceId: "switchLevelID0", descriptionText: "",
397 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
398 /////
399 /*events*/
400 //
401 -------------------------------------------------------------------------------
402
403
404 //For temperature measurement:
405 int temperature
406 /*events*/
407 temperatureMeasurementObject.setValue([name: "temperature", value: "45"/*A number between 0 to 100*/, deviceId: "temperatureMeasurementID0", descriptionText: "",
408 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
409 /////
410 /*events*/
411 //
412 -------------------------------------------------------------------------------
413
414
415 //For valve:
416 String valve
417 /*events*/
418 valveObject.setValue([name: "contact", value: "closed", deviceId: "valveID0", descriptionText: "",
419 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
420 valveObject.setValue([name: "contact", value: "open", deviceId: "valveID0", descriptionText: "",
421 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
422 /////
423 /*events*/
424 //
425 -------------------------------------------------------------------------------
426
427
428 //For water sensor:
429 String water
430 /*events*/
431 waterSensorObject.setValue([name: "water", value: "dry", deviceId: "waterSensorID0", descriptionText: "",
432 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
433 waterSensorObject.setValue([name: "water", value: "wet", deviceId: "waterSensorID0", descriptionText: "",
434 displayed: true, linkText: "", isStateChange: false, unit: "", data: [info: "info"]])
435 /////
436 /*events*/
437 //