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