Fixing a bug: should have been pushed, not push.
[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", value: "open", deviceId: "contactSensorID0", descriptionText: "",
23 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
24 contactObject.setValue([name: "contact", value: "closed", 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 locationObject.setValue([name: "sunset", value: "sunset", deviceId: "locationID0", descriptionText: "",
55 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
56 locationObject.setValue([name: "sunrise", value: "sunrise", deviceId: "locationID0", descriptionText: "",
57 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
58 locationObject.setValue([name: "sunsetTime", value: "sunset", deviceId: "locationID0", descriptionText: "",
59 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
60 locationObject.setValue([name: "sunriseTime", value: "sunrise", deviceId: "locationID0", descriptionText: "",
61 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
62 /*events*/
63 //
64 -------------------------------------------------------------------------------
65
66
67 //For Locks:
68 String currentLock or String lockState
69 /*events*/
70 lockObject.setValue([name: "lock", value: "locked", deviceId: "lockID0", descriptionText: "",
71 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
72 lockObject.setValue([name: "lock", value: "unlocked", deviceId: "lockID0", descriptionText: "",
73 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
74 /////
75 /*events*/
76 //
77 -------------------------------------------------------------------------------
78
79
80 //For MotionSensors:
81 String currentMotion or String motion
82 /*events*/
83 motionSensorObject.setValue([name: "motion", value: "active", deviceId: "motionSensorID0", descriptionText: "",
84 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
85 motionSensorObject.setValue([name: "motion", value: "inactive", deviceId: "motionSensorID0", descriptionText: "",
86 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
87 /////
88 /*events*/
89 //
90 -------------------------------------------------------------------------------
91
92
93 //For MusicPlayer:
94 String status
95 int level
96 String trackDescription
97 String trackData
98 String mute
99 /*events*/
100 musicPlayerObject.setValue([name: "status", value: "play", deviceId: "musicPlayerID0", descriptionText: "",
101 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
102 musicPlayerObject.setValue([name: "status", value: "stop", deviceId: "musicPlayerID0", descriptionText: "",
103 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
104 musicPlayerObject.setValue([name: "status", value: "pause", deviceId: "musicPlayerID0", descriptionText: "",
105 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
106 musicPlayerObject.setValue([name: "status", value: "on", deviceId: "musicPlayerID0", descriptionText: "",
107 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
108 musicPlayerObject.setValue([name: "status", value: "off", deviceId: "musicPlayerID0", descriptionText: "",
109 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
110 musicPlayerObject.setValue([name: "level", value: "36"/*A number between 0 to 100 as a charge*/, deviceId: "musicPlayerID0", descriptionText: "",
111 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
112 musicPlayerObject.setValue([name: "trackDescription", value: "someDescriptions", deviceId: "musicPlayerID0", descriptionText: "",
113 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
114 musicPlayerObject.setValue([name: "trackData", value: "someTrack", deviceId: "musicPlayerID0", descriptionText: "",
115 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
116 musicPlayerObject.setValue([name: "mute", value: "unmuted", deviceId: "musicPlayerID0", descriptionText: "",
117 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
118 musicPlayerObject.setValue([name: "mute", value: "muted", deviceId: "musicPlayerID0", descriptionText: "",
119 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
120 /*events*/
121 //
122 -------------------------------------------------------------------------------
123
124
125 //For PresenceSensor:
126 String currentPresence or String presenceState
127 /*events*/
128 presenceSensorObject.setValue([name: "presence", value: "present", deviceId: "presenceSensorID0", descriptionText: "",
129 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"presence":"1","dni":"mobile0"}'])
130 presenceSensorObject.setValue([name: "presence", value: "not present", deviceId: "presenceSensorID0", descriptionText: "",
131 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"presence":"0","dni":"mobile0"}'])
132 /////
133 /*events*/
134 //
135 -------------------------------------------------------------------------------
136
137
138 //For SmokeDetector:
139 String currentSmokeValue or String smoke
140 /*events*/
141 smokeDetectorObject.setValue([name: "smoke", value: "clear", deviceId: "smokeDetectorID0", descriptionText: "",
142 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
143 smokeDetectorObject.setValue([name: "smoke", value: "detected", deviceId: "smokeDetectorID0", descriptionText: "",
144 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
145 smokeDetectorObject.setValue([name: "smoke", value: "tested", deviceId: "smokeDetectorID0", descriptionText: "",
146 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
147 smokeDetectorObject.setValue([name: "battery", value: "5"/*A number between 0 to 100 as a charge*/, deviceId: "smokeDetectorID0", descriptionText: "",
148 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
149 /////
150 /*events*/
151 //
152 -------------------------------------------------------------------------------
153
154
155 //For Thermostats:(we have different features in each line)
156 int heatingSetpoint or currentHeatingSetpoint //heating set point
157 int thermostatSetpoint //normal set point
158 int coolingSetpoint or currentCoolingSetpoint //cooling set point
159 String thermostatOperatingState //operating state
160 String thermostatFanMode //fan mode
161 String thermostatMode or currentThermostatMode //mode
162 /*events*/
163 thermostatObject.setValue([name: "thermostatMode", value: "auto", deviceId: "thermostatID0", descriptionText: "",
164 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
165 thermostatObject.setValue([name: "thermostatMode", value: "cool", deviceId: "thermostatID0", descriptionText: "",
166 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
167 thermostatObject.setValue([name: "thermostatMode", value: "emergencyHeat", deviceId: "thermostatID0", descriptionText: "",
168 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
169 thermostatObject.setValue([name: "thermostatMode", value: "heat", deviceId: "thermostatID0", descriptionText: "",
170 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
171 thermostatObject.setValue([name: "thermostatMode", value: "off", deviceId: "thermostatID0", descriptionText: "",
172 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
173 thermostatObject.setValue([name: "temperature", value: "55", deviceId: "thermostatID0", descriptionText: "",
174 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
175 thermostatObject.setValue([name: "heatingSetpoint", value: "40", deviceId: "thermostatID0", descriptionText: "",
176 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
177 thermostatObject.setValue([name: "coolingSetpoint", value: "60", deviceId: "thermostatID0", descriptionText: "",
178 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
179 thermostatObject.setValue([name: "thermostatSetpoint", value: "50", deviceId: "thermostatID0", descriptionText: "",
180 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
181 thermostatObject.setValue([name: "thermostatFanMode", value: "auto", deviceId: "thermostatID0", descriptionText: "",
182 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
183 thermostatObject.setValue([name: "thermostatFanMode", value: "fanCirculate", deviceId: "thermostatID0", descriptionText: "",
184 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
185 thermostatObject.setValue([name: "thermostatFanMode", value: "circulate", deviceId: "thermostatID0", descriptionText: "",
186 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
187 thermostatObject.setValue([name: "thermostatFanMode", value: "fanOn", deviceId: "thermostatID0", descriptionText: "",
188 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
189 thermostatObject.setValue([name: "thermostatFanMode", value: "on", deviceId: "thermostatID0", descriptionText: "",
190 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
191 thermostatObject.setValue([name: "thermostatOperatingState", value: "cooling", deviceId: "thermostatID0", descriptionText: "",
192 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
193 thermostatObject.setValue([name: "thermostatOperatingState", value: "fan only", deviceId: "thermostatID0", descriptionText: "",
194 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
195 thermostatObject.setValue([name: "thermostatOperatingState", value: "heating", deviceId: "thermostatID0", descriptionText: "",
196 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
197 thermostatObject.setValue([name: "thermostatOperatingState", value: "idle", deviceId: "thermostatID0", descriptionText: "",
198 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
199 thermostatObject.setValue([name: "thermostatOperatingState", value: "pending cool", deviceId: "thermostatID0", descriptionText: "",
200 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
201 thermostatObject.setValue([name: "thermostatOperatingState", value: "pending heat", deviceId: "thermostatID0", descriptionText: "",
202 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
203 thermostatObject.setValue([name: "thermostatOperatingState", value: "vent economizer", deviceId: "thermostatID0", descriptionText: "",
204 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
205 /////
206 /*events*/
207 //
208 -------------------------------------------------------------------------------
209
210
211 //For Switches:
212 String currentSwitch or switchState
213 /*events*/
214 switchObject.setValue([name: "switch", value: "off", deviceId: "switchID0", descriptionText: "",
215 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
216 switchObject.setValue([name: "switch", value: "on", deviceId: "switchID0", descriptionText: "",
217 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
218 /////
219 /*events*/
220 //
221 -------------------------------------------------------------------------------
222
223
224 //For appTouch:
225 /*events*/
226 appObject.setValue([name: "Touched", value: "touched", deviceId: "appTouchID0", descriptionText: "",
227 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
228 /////
229 /*events*/
230 //
231 -------------------------------------------------------------------------------
232
233
234 //For nfcTouch:
235 /*events*/
236 touchSensorObject.setValue([name: "nfcTouch", value: "touched", deviceId: "nfcSensorID0", descriptionText: "",
237 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
238 /////
239 /*events*/
240 //
241 -------------------------------------------------------------------------------
242
243
244 //For aeonKeyFob push button:
245 /*events*/
246 aeonKeyFobObject.setValue([name: "button", value: "pushed", deviceId: "aeonKeyFobID0", descriptionText: "",
247 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
248 aeonKeyFobObject.setValue([name: "button", value: "held", deviceId: "aeonKeyFobID0", descriptionText: "",
249 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
250 /////
251 /////
252 /*events*/
253 //
254 -------------------------------------------------------------------------------
255
256
257 //For acceleration sensor:
258 String currentAcceleration or String acceleration
259 /*events*/
260 accelerationSensorObject.setValue([name: "acceleration", value: "active", deviceId: "accelerationSensorID0", descriptionText: "",
261 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
262 accelerationSensorObject.setValue([name: "acceleration", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "",
263 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
264 /////
265 /*events*/
266 //
267 -------------------------------------------------------------------------------
268
269
270 //For battery:
271 int currentBattery or int battery
272 /*events*/
273 batteryObject.setValue([name: "battery", value: "50"/*number between 0 to 100 as a string*/, deviceId: "batteryID0", descriptionText: "",
274 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
275 /*events*/
276 //
277 -------------------------------------------------------------------------------
278
279
280 //For beacon sensor:
281 String currentPresence or String presence
282 /*events*/
283 beaconSensorObject.setValue([name: "presence", value: "present", deviceId: "beaconeSensorID0", descriptionText: "",
284 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"presence":"1","dni":"mobile0"}'])
285 beaconSensorObject.setValue([name: "presence", value: "not present", deviceId: "beaconSensorID0", descriptionText: "",
286 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"presence":"0","dni":"mobile0"}'])
287 /////
288 /*events*/
289 //
290 -------------------------------------------------------------------------------
291
292
293 //For carbon monoxide:
294 String currentCarbonMonoxideValue or String carbonMonoxide
295 /*events*/
296 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "clear", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
297 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
298 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "detected", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
299 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
300 carbonMonoxideDetectorObject.setValue([name: "carbonMonoxide", value: "tested", deviceId: "carbonMonoxideDetectorID0", descriptionText: "",
301 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
302 /*events*/
303 //
304 -------------------------------------------------------------------------------
305
306
307 //For color control:
308 String color
309 int hue
310 int saturation
311 /*events*/
312 colorControlObject.setValue([name: "color", value: "red", deviceId: "colorControlID0", descriptionText: "",
313 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
314 colorControlObject.setValue([name: "hue", value: "50", deviceId: "colorControlID0", descriptionText: "",
315 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
316 colorControlObject.setValue([name: "saturation", value: "50", deviceId: "colorControlID0", descriptionText: "",
317 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
318 colorControlObject.setValue([name: "level", value: "50", deviceId: "colorControlID0", descriptionText: "",
319 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
320 colorControlObject.setValue([name: "switch", value: "on", deviceId: "colorControlID0", descriptionText: "",
321 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
322 colorControlObject.setValue([name: "switch", value: "off", deviceId: "colorControlID0", descriptionText: "",
323 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
324 colorControlObject.setValue([name: "colorTemperature", value: "50", deviceId: "colorControlID0", descriptionText: "",
325 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
326 /*events*/
327 //
328 -------------------------------------------------------------------------------
329
330
331 //For energy meter:
332 int energy or int currentEnergy
333 /*events*/
334 energyMeterObject.setValue([name: "energy", value: "45"/*A number between 0 to 100 as a charge*/, deviceId: "energyMeterID0", descriptionText: "",
335 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
336 /*events*/
337 //
338 -------------------------------------------------------------------------------
339
340
341 //For illuminance measurement:
342 int illuminance or int currentIlluminance
343 /*events*/
344 illuminanceMeasurementObject.setValue([name: "illuminance", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "illuminanceMeasurementID0", descriptionText: "",
345 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
346 /*events*/
347 //
348 -------------------------------------------------------------------------------
349
350
351 //For power meter:
352 int power or int currentPower
353 /*events*/
354 powerMeterObject.setValue([name: "power", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "powerMeterID0", descriptionText: "",
355 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
356 /*events*/
357 //
358 -------------------------------------------------------------------------------
359
360
361 //For relative humidity measurement:
362 int humidity or int currentHumidity
363 /*events*/
364 humidityMeasurementObject.setValue([name: "humidity", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "humidityMeasurementID0", descriptionText: "",
365 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
366 /*events*/
367 //
368 -------------------------------------------------------------------------------
369
370
371 //For relay switches:
372 String currentSwitch or switchState
373 /*events*/
374 relaySwitchObject.setValue([name: "switch", value: "off", deviceId: "relaySwitchID0", descriptionText: "",
375 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
376 relaySwitchObject.setValue([name: "switch", value: "on", deviceId: "relaySwitchID0", descriptionText: "",
377 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
378 /////
379 /*events*/
380 //
381 -------------------------------------------------------------------------------
382
383
384 //For sleep sensor:
385 String sleeping
386 /*events*/
387 sleepSensorObject.setValue([name: "sleeping", value: "sleeping", deviceId: "sleepSensorID0", descriptionText: "",
388 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
389 sleepSensorObject.setValue([name: "sleeping", value: "not sleeping", deviceId: "sleepSensorID0", descriptionText: "",
390 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
391 /////
392 /*events*/
393 //
394 -------------------------------------------------------------------------------
395
396
397 //For step sensor:
398 int goal
399 int steps
400 /*events*/
401 stepSensorObject.setValue([name: "goal", value: "100"/*A number*/, deviceId: "stepSensorID0", descriptionText: "",
402 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
403 stepSensorObject.setValue([name: "steps", value: "46"/*A number*/, deviceId: "stepSensorID0", descriptionText: "",
404 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
405 /////
406 /*events*/
407 //
408 -------------------------------------------------------------------------------
409
410
411 //For switch levels:
412 int level or int rate
413 /*events*/
414 switchLevelObject.setValue([name: "level", value: "45"/*A number between 0 to 100*/, deviceId: "switchLevelID0", descriptionText: "",
415 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
416 switchLevelObject.setValue([name: "switch", value: "on", deviceId: "switchLevelID0", descriptionText: "",
417 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
418 switchLevelObject.setValue([name: "switch", value: "off", deviceId: "switchLevelID0", descriptionText: "",
419 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
420 /////
421 /*events*/
422 //
423 -------------------------------------------------------------------------------
424
425
426 //For temperature measurement:
427 int temperature
428 /*events*/
429 temperatureMeasurementObject.setValue([name: "temperature", value: "45"/*A number between 0 to 100*/, deviceId: "temperatureMeasurementID0", descriptionText: "",
430 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
431 /////
432 /*events*/
433 //
434 -------------------------------------------------------------------------------
435
436
437 //For valve:
438 String valve
439 /*events*/
440 valveObject.setValue([name: "contact", value: "closed", deviceId: "valveID0", descriptionText: "",
441 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
442 valveObject.setValue([name: "contact", value: "open", deviceId: "valveID0", descriptionText: "",
443 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
444 /////
445 /*events*/
446 //
447 -------------------------------------------------------------------------------
448
449
450 //For water sensor:
451 String water
452 /*events*/
453 waterSensorObject.setValue([name: "water", value: "dry", deviceId: "waterSensorID0", descriptionText: "",
454 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
455 waterSensorObject.setValue([name: "water", value: "wet", deviceId: "waterSensorID0", descriptionText: "",
456 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
457 /////
458 /*events*/
459 //
460 -------------------------------------------------------------------------------
461
462
463 //For color temperature:
464 int colorTemperature
465 String switchState
466 /*events*/
467 colorTemperatureObject.setValue([name: "switch", value: "off", deviceId: "switchID0", descriptionText: "",
468 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
469 colorTemperatureObject.setValue([name: "switch", value: "on", deviceId: "switchID0", descriptionText: "",
470 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
471 colorTemperatureObject.setValue([name: "colorTemperature", value: "13000", deviceId: "switchID0", descriptionText: "",
472 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
473 /////
474 /*events*/
475 //
476 -------------------------------------------------------------------------------
477
478
479 //For button:
480 String button
481 /*events*/
482 buttonObject.setValue([name: "button", value: "held", deviceId: "buttonID0", descriptionText: "",
483 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 1}'])
484 buttonObject.setValue([name: "button", value: "pushed", deviceId: "buttonID0", descriptionText: "",
485 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"buttonNumber": 1}'])
486 /////
487 /*events*/
488 //
489 -------------------------------------------------------------------------------
490
491
492 //For threeAxis:
493 LinkedHashMap threeAxis
494 /*events*/
495 threeAxisObject.setValue([name: "threeAxis", value: '{"x": 1, "y": 2, "z": 3}', deviceId: "threeAxisID0", descriptionText: "",
496 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
497 threeAxisObject.setValue([name: "status", value: '{"x": 1, "y": 2, "z": 3}', deviceId: "threeAxisID0", descriptionText: "",
498 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
499 /////
500 /*events*/
501 //
502