Aeotec Temperature & Humidity Sensor

I just purchased a Aeotec Temperature and Humidity sensor (ZWA009). This is not the 6 multisensor that has been out for a bit. I try adding the device using the QR code, but it just gets added as a Z-Wave device. I don’t get anything else. It doesn’t even show that it has temperature or humidity. The device just shows Z-Wave device. Never had a problem with their other devices.

Has anyone else tried one of these devices? Any advice on how to add this correctly to the SmartThings hub?

2 Likes

Try changing device type to smartsence temp and humidity sensor in IDE

I have the same challange and is not able to add a Climate sensor from Nedis

smartsense is zigbee. ZWA009 is Zwave. wouldnot expect switching those DH to work.

You are correct… I completely missed the ZW in the post

Create your own DTH

Or just assign stock “Temperature Sensor” DTH as contains temperature and humidity DTH.

I’m in the same boat. Says it’s compatible with SmartThings when you buy it and it does connect it just doesn’t share temperature and humidity like what it’s purchased for. We’re you able to use the ide to change get it? May be returning this.

I have been able to get these devices to work. I had to add a new device handler first. Here are the steps that you need to do:

  1. You need to log into your IDE.
  2. Click on My Locations and choose your hub. It’s usually ‘Home’.
  3. Go to My Device Handlers.
  4. Click on New Device Handler
  5. Click From Code
  6. Copy the code below and paste it into the code section.
  7. Click on Save
  8. Click on Publish -> Publish for me.

Once you have the new device handler installed, you can then add the device into your SmartThings app.

  1. Push the button on the from of the Temp/Humidity Sensor for 15 seconds.
  2. In the app select add device or the “+” sign
  3. Select ‘Device’
  4. Select 'Scan QR code at bottom left of screen
  5. Scan the QR code on the inside cover. You need to take off the back cover to see the QR code.
  6. Once it scans the code, on the next screen you choose the hub and room you want to add the device to.
  7. When it starts searching for the device, push the button on the front 3 times very quickly.

Just wait and then it should be added. Sometimes mine it would come up with Z-wave device and not Temperature and Humidity device. If it comes up with Z-wave device, it won’t have any Temperature or Humidity settings. You will need to force delete and try again. Eventually, I was able to get them added correctly into my hub. I have been working with Aeotec on this issue. These sensors are so brand new that they aren’t integrated into the SmartThings hub yet.

Let me know how you make out.

Cliff

/**

  • Copyright 2020 SmartThings
  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.
  • Generic Z-Wave Water/Temp/Humidity Sensor
  • Author: SmartThings
  • Date: 2020-07-06
    */

metadata {
definition(name: “Z-Wave Temp/Humidity Sensor”, namespace: “smartthings”, author: “SmartThings”, mnmn: “SmartThings”, vid: “generic-leak-5”, ocfDeviceType: “x.com.st.d.sensor.moisture”) {
capability “Water Sensor”
capability “Temperature Measurement”
capability “Relative Humidity Measurement”
capability “Tamper Alert”
capability “Battery”
capability “Sensor”
capability “Health Check”
capability “Configuration”

	fingerprint mfr:"0154", prod:"0004", model:"0014", deviceJoinName: "Popp Mold Detector", mnmn: "SmartThings", vid: "aeotec-water-sensor-7-pro" //EU //Mold Detector
    fingerprint mfr:"0371", prod:"0002", model:"0009", deviceJoinName: "Temperature Humidity Sensor", mnmn: "SmartThings", vid: "aeotec-water-sensor-7-pro" //EU //aerQ Sensor
    fingerprint mfr:"0371", prod:"0102", model:"0009", deviceJoinName: "Temperature Humidity Sensor", mnmn: "SmartThings", vid: "aeotec-water-sensor-7-pro" //US //aerQ Sensor
}

tiles(scale: 2) {
	multiAttributeTile(name: "water", type: "generic", width: 6, height: 4) {
		tileAttribute("device.water", key: "PRIMARY_CONTROL") {
			attributeState("dry", label:'${name}', icon: "st.alarm.water.dry", backgroundColor: "#ffffff")
			attributeState("wet", label:'${name}', icon: "st.alarm.water.wet", backgroundColor: "#00A0DC")
		}
	}
	valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
		state "battery", label: '${currentValue}% battery'
	}
	valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
		state "humidity", label: '${currentValue}% humidity', unit: ""
	}
	valueTile("temperature", "device.temperature", width: 2, height: 2) {
		state("temperature", label: '${currentValue}°',
				backgroundColors: [
						// Celsius
						[value: 0, color: "#153591"],
						[value: 7, color: "#1e9cbb"],
						[value: 15, color: "#90d2a7"],
						[value: 23, color: "#44b621"],
						[value: 28, color: "#f1d801"],
						[value: 35, color: "#d04e00"],
						[value: 37, color: "#bc2323"],
						// Fahrenheit
						[value: 40, color: "#153591"],
						[value: 44, color: "#1e9cbb"],
						[value: 59, color: "#90d2a7"],
						[value: 74, color: "#44b621"],
						[value: 84, color: "#f1d801"],
						[value: 95, color: "#d04e00"],
						[value: 96, color: "#bc2323"]
				])
	}
    /*valueTile("dewpoint", "device.dewpoint", width: 2, height: 2) {
		state("dewpoint", label: '${currentValue}°',
				backgroundColors: [
						// Celsius
						[value: 0, color: "#153591"],
						[value: 7, color: "#1e9cbb"],
						[value: 15, color: "#90d2a7"],
						[value: 23, color: "#44b621"],
						[value: 28, color: "#f1d801"],
						[value: 35, color: "#d04e00"],
						[value: 37, color: "#bc2323"],
						// Fahrenheit
						[value: 40, color: "#153591"],
						[value: 44, color: "#1e9cbb"],
						[value: 59, color: "#90d2a7"],
						[value: 74, color: "#44b621"],
						[value: 84, color: "#f1d801"],
						[value: 95, color: "#d04e00"],
						[value: 96, color: "#bc2323"]
				])
	}*/
	valueTile("tamper", "device.tamper", height: 2, width: 2, decoration: "flat") {
		state "clear", label: 'tamper clear', backgroundColor: "#ffffff"
		state "detected", label: 'tampered', backgroundColor: "#ff0000"
	}

	main (["humidity", "temperature"])
	details(["humidity", "temperature", "battery", "tamper"])
}

}

def installed() {
clearTamper()
response([
secure(zwave.batteryV1.batteryGet()),
“delay 500”,
secure(zwave.notificationV3.notificationGet(notificationType: 0x05)), // water
“delay 500”,
secure(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 0x01)), // temperature
“delay 500”,
secure(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 0x05)), // humidity
“delay 500”,
//secure(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 0x0B)), // dewpoint
//“delay 500”,
secure(zwave.wakeUpV2.wakeUpNoMoreInformation())
])
}

def updated() {
configure()
}

def configure() {
sendEvent(name: “checkInterval”, value: 8 * 60 * 60 + 10 * 60, displayed: false, data: [protocol: “zwave”, hubHardwareId: device.hub.hardwareID])
}

def parse(String description) {
def results =

if (description.startsWith("Err")) {
	results += createEvent(descriptionText: description, displayed: true)
} else {
	def cmd = zwave.parse(description)
	if (cmd) {
		results += zwaveEvent(cmd)
	}
}

log.debug "parse() result ${results.inspect()}"

return results

}

def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
def encapsulatedCommand = cmd.encapsulatedCommand()

if (encapsulatedCommand) {
	zwaveEvent(encapsulatedCommand)
} else {
	log.warn "Unable to extract encapsulated cmd from $cmd"
	createEvent(descriptionText: cmd.toString())
}

}

def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd) {
log.debug "Notification " +cmd
if (cmd.notificationType == 0x05) {
if (cmd.event == 0x01 || cmd.event == 0x02) {
sensorWaterEvent(1)
} else if (cmd.event == 0x00) {
sensorWaterEvent(0)
}
} else if (cmd.notificationType == 0x07) {
if (cmd.event == 0x03) {
runIn(10, clearTamper, [overwrite: true, forceForLocallyExecuting: true])
createEvent(name: “tamper”, value: “detected”, descriptionText: “$device.displayName was tampered”)
} else if (cmd.event == 0x00) {
createEvent(name: “tamper”, value: “clear”)
}
}
}

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
log.debug "Sensor Binary " +cmd
return sensorWaterEvent(cmd.sensorValue)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
log.debug "BASIC " +cmd
return sensorWaterEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
log.debug "BASIC " +cmd
return sensorWaterEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd) {
log.debug "Sensor Alarm " +cmd
return sensorWaterEvent(cmd.sensorState)
}

def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [name: “battery”, unit: “%”, isStateChange: true]
state.lastbatt = now()

if (cmd.batteryLevel == 0xFF) {
	map.value = 1
	map.descriptionText = "$device.displayName battery is low!"
} else {
	map.value = cmd.batteryLevel
}

createEvent(map)

}

def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd) {
def map = [:]

switch (cmd.sensorType) {
	case 0x01:
		map.name = "temperature"
        map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmd.scale == 1 ? "F" : "C", cmd.precision)
		map.unit = temperatureScale
		break
	case 0x05:
		map.name = "humidity"
		map.value = cmd.scaledSensorValue.toInteger()
		map.unit = "%"
		break
	/*case 0x0B:
    	map.name = "dewpoint"
		map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmd.scale == 1 ? "F" : "C", cmd.precision)
		map.unit = temperatureScale
		break*/
    default:
		map.descriptionText = cmd.toString()
}

createEvent(map)

}

def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
def cmds =
def result = createEvent(descriptionText: “$device.displayName woke up”, isStateChange: false)
//cmds += secure(zwave.batteryV1.batteryGet())

if (!state.lastbatt || (now() - state.lastbatt) >= 10 * 60 * 60 * 1000) {
	cmds += ["delay 1000",
			 secure(zwave.batteryV1.batteryGet()),
			 "delay 2000"
	]
}

cmds += secure(zwave.wakeUpV2.wakeUpNoMoreInformation())

[result, response(cmds)]

}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
log.warn “Unhandled command: ${cmd}”
}

def sensorWaterEvent(value) {
log.debug “water event”
if (value) {
createEvent(name: “water”, value: “wet”, descriptionText: “$device.displayName detected water leakage”)
} else {
createEvent(name: “water”, value: “dry”, descriptionText: “$device.displayName detected that leakage is no longer present”)
}
}

def clearTamper() {
sendEvent(name: “tamper”, value: “clear”)
}

private secure(cmd) {
if (zwaveInfo.zw.contains(“s”)) {
zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
} else {
cmd.format()
}
}

1 Like

Missed this thread first time when searching “AerQ” but didnt come up. I emailed Aeotec and received reply they are working on the new device type aiming for end of December (fingers crossed). I’ve tried pair and un-pair multiple times usinig QR code or as a Z-Wave generic device then switch to Temperature Sensor among other types as others have suggested. The end result is abit of a mess. Even though I force delete the z-wave device, because at one point i set the type to “Temperature Sensor”, it somehow changed the Temperature setting from F to C and always remains Celsius regardless which temperature device I pick now.

1 Like

Receiving numerous errors when trying to save this DH. Any suggestions as I am trying to add the Aeotec aerQ Temp and Humid sensor with absolutely no luck other than it showing up as a door sensor.

1 Like

If you are trying to copy and paste the code in an earlier post you will hit problems with the ‘smart quotes’ (the opening and closing quotes or what we used to call “sixty-sixes and ninety-nines” in Primary School). They need to be the plain generic 'single quotes' or "double quotes".

1 Like

I have uploaded the DH I received from Aeotec as a JPEG. Not sure how to upload a text file. Hopefully this will help with the copy and paste.

2 Likes

Thanks!

Hopefully this also means Aeotec is close to releasing the official integration. I have one of these enroute, but I’m lazy, so I’d love to avoid manually mishmashing a DH for it on my own.

You can find DTH here

1 Like

That one referenced Aeotech solutions above in really dose not work. It also trys to show light, leak, etc. Battery dose not work… It is a cut and paste from a different product from 2018. They have been notified it is not correct. I would love to see the one inthe JPEG.

1 Like

Here is the jpeg dth
https://raw.githubusercontent.com/SmartThingsCommunity/SmartThingsPublic/master/devicetypes/smartthings/zwave-water-temp-humidity-sensor.src/zwave-water-temp-humidity-sensor.groovy

1 Like

General reply to everyone trying to get this work. I’ve also received Aeotec Helpdesk email link to the basic data handler, it does work, but if you have previously paired with the device (1 or more times), you’ll get residual non-working data options leftover from previous attempts (example: first time show up as contact sensor, then you change type to another, you’ll continue to see non working contact option for the device). The best way is to force delete it either from Graph IDE or last step in the device delete attempt, and start clean.

The instruction Aeotec provided is to use the Scan option, which I assume is the same as Graph IDE live log option that puts Hub in inclusion mode. From there, I think it’ll pair as a generic Z-Wave device, then you’ll need follow Aeotec instruction to create a custom data handler, cut-and-paste, publish, and switch the AerQ device from the generic z-wave to the custom type.

Note: The basic temperature and humidity seem to work, but the update interval is very long (like hours instead of each hour, I assume this is to save battery). The Bar chart for Temperature seems to work, but not humidity, hopefully they’ll include it in subsequent updates.

1 Like

Hero! Thank you!

`

Thanks for this info - it’s helpful. It aat least confirms I’m not going crazy!

I’ve got the latest 2020 DH (not the 2018 one) added/published in my IDE, but when I try to re-pair the aerQ after deleting it, it always first picks up a stock/default Open/Closed Contact Sensor -related DH.

How can we force the aerQ to join with the correct DH from the get-go?

If I change the DH once joined, I can’t shake that stupid Contact attribute from the default DH.

First world problem, I realize!