Update influxdb-logger.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Mon, 12 Aug 2019 23:06:13 +0000 (16:06 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Mon, 12 Aug 2019 23:06:13 +0000 (16:06 -0700)
third-party/influxdb-logger.groovy

index 0cf76b6..e00fd7d 100755 (executable)
@@ -190,9 +190,9 @@ def updated() {
     state.deviceAttributes << [ devices: 'beacons', attributes: ['presence']]
     state.deviceAttributes << [ devices: 'buttons', attributes: ['button']]
     state.deviceAttributes << [ devices: 'cos', attributes: ['carbonMonoxide']]
-    state.deviceAttributes << [ devices: 'co2s', attributes: ['carbonDioxide']]
+    state.deviceAttributes << [ devices: 'co2s', attributes: ['carbonDioxide']]///
     state.deviceAttributes << [ devices: 'colors', attributes: ['hue','saturation','color']]
-    state.deviceAttributes << [ devices: 'consumables', attributes: ['consumableStatus']]
+    state.deviceAttributes << [ devices: 'consumables', attributes: ['consumableStatus']]///
     state.deviceAttributes << [ devices: 'contacts', attributes: ['contact']]
     state.deviceAttributes << [ devices: 'doorsControllers', attributes: ['door']]
     state.deviceAttributes << [ devices: 'energyMeters', attributes: ['energy']]
@@ -202,28 +202,28 @@ def updated() {
     state.deviceAttributes << [ devices: 'motions', attributes: ['motion']]
     state.deviceAttributes << [ devices: 'musicPlayers', attributes: ['status','level','trackDescription','trackData','mute']]
     state.deviceAttributes << [ devices: 'peds', attributes: ['steps','goal']]
-    state.deviceAttributes << [ devices: 'phMeters', attributes: ['pH']]
-    state.deviceAttributes << [ devices: 'powerMeters', attributes: ['power','voltage','current','powerFactor']]
+    state.deviceAttributes << [ devices: 'phMeters', attributes: ['pH']]///
+    state.deviceAttributes << [ devices: 'powerMeters', attributes: ['power']]
     state.deviceAttributes << [ devices: 'presences', attributes: ['presence']]
-    state.deviceAttributes << [ devices: 'pressures', attributes: ['pressure']]
-    state.deviceAttributes << [ devices: 'shockSensors', attributes: ['shock']]
-    state.deviceAttributes << [ devices: 'signalStrengthMeters', attributes: ['lqi','rssi']]
+    state.deviceAttributes << [ devices: 'pressures', attributes: ['pressure']]///
+    state.deviceAttributes << [ devices: 'shockSensors', attributes: ['shock']]///
+    state.deviceAttributes << [ devices: 'signalStrengthMeters', attributes: ['lqi','rssi']]///
     state.deviceAttributes << [ devices: 'sleepSensors', attributes: ['sleeping']]
     state.deviceAttributes << [ devices: 'smokeDetectors', attributes: ['smoke']]
-    state.deviceAttributes << [ devices: 'soundSensors', attributes: ['sound']]
-       state.deviceAttributes << [ devices: 'spls', attributes: ['soundPressureLevel']]
+    state.deviceAttributes << [ devices: 'soundSensors', attributes: ['sound']]///
+       state.deviceAttributes << [ devices: 'spls', attributes: ['soundPressureLevel']]///
        state.deviceAttributes << [ devices: 'switches', attributes: ['switch']]
     state.deviceAttributes << [ devices: 'switchLevels', attributes: ['level']]
-    state.deviceAttributes << [ devices: 'tamperAlerts', attributes: ['tamper']]
+    state.deviceAttributes << [ devices: 'tamperAlerts', attributes: ['tamper']]///
     state.deviceAttributes << [ devices: 'temperatures', attributes: ['temperature']]
-    state.deviceAttributes << [ devices: 'thermostats', attributes: ['temperature','heatingSetpoint','coolingSetpoint','thermostatSetpoint','thermostatMode','thermostatFanMode','thermostatOperatingState','thermostatSetpointMode','scheduledSetpoint','optimisation','windowFunction']]
+    state.deviceAttributes << [ devices: 'thermostats', attributes: ['temperature','heatingSetpoint','coolingSetpoint','thermostatSetpoint','thermostatMode','thermostatFanMode','thermostatOperatingState']]
     state.deviceAttributes << [ devices: 'threeAxis', attributes: ['threeAxis']]
     state.deviceAttributes << [ devices: 'touchs', attributes: ['touch']]
-    state.deviceAttributes << [ devices: 'uvs', attributes: ['ultravioletIndex']]
+    state.deviceAttributes << [ devices: 'uvs', attributes: ['ultravioletIndex']]///
     state.deviceAttributes << [ devices: 'valves', attributes: ['contact']]
-    state.deviceAttributes << [ devices: 'volts', attributes: ['voltage']]
+    state.deviceAttributes << [ devices: 'volts', attributes: ['voltage']]///
     state.deviceAttributes << [ devices: 'waterSensors', attributes: ['water']]
-    state.deviceAttributes << [ devices: 'windowShades', attributes: ['windowShade']]
+    state.deviceAttributes << [ devices: 'windowShades', attributes: ['windowShade']]///
 
     // Configure Scheduling:
     state.softPollingInterval = settings.prefSoftPollingInterval.toInteger()
@@ -699,7 +699,7 @@ private manageSubscriptions() {
     subscribe(beacons, "presence", handleEvent)
     subscribe(buttons, "button", handleEvent)
     subscribe(cos, "carbonMonoxide", handleEvent)
-    subscribe(cos, "carbonDioxide", handleEvent)
+    subscribe(co2s, "carbonDioxide", handleEvent)
     subscribe(colors, "hue", handleEvent)
     subscribe(colors, "saturation", handleEvent)
     subscribe(colors, "color", handleEvent)
@@ -720,8 +720,6 @@ private manageSubscriptions() {
     subscribe(peds, "goal", handleEvent)
     subscribe(phMeters, "pH", handleEvent)
     subscribe(powerMeters, "power", handleEvent)
-    subscribe(powerMeters, "current", handleEvent)
-    subscribe(powerMeters, "powerFactor", handleEvent)
     subscribe(presences, "presence", handleEvent)
     subscribe(pressures, "pressure", handleEvent)
     subscribe(shockSensors, "shock", handleEvent)