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