Aqara SmartThings Humidity Sensor and Alexa integration

Hi. I’m having some trouble with Alexa finding the Aqara temp/humidity sensor I added to SmartThings.
IFTTT also doesn’t recognize the aqara on SmartThings. What am I doing wrong?

You’re likely not doing anything wrong. Alexa doesn’t see some SmartThings device types, including temperature sensors. If you only need access to temperature you might be able to access it by editing the DTH to make it appear like a thermostat, which Alexa can see. Not sure about IFTTT, but likely a similar issue there.

What @MinerJason said. I have a ton of the Aqara temp/humidity sensors and Alexa has never recognized them. What she does recognize, however, is the three sensors I have connected to my Ecobee thermostat - at least I can ask her about temperature in a few of my rooms.

Thanks, I’ll look in to editing the DTH.

Did you find a solution?

I have the same issue, I tried changing the dth and setting the definition as

definition (name: "Xiaomi Aqara Temperature Humidity Thermostat", namespace: "bspranger", author: "bspranger", mnmn: "SmartThings", vid: "SmartThings-smartthings-Xiaomi_Temperature_Humidity_Thermostat", ocfDeviceType: "oic.d.thermostat"){

but still Alexa cannot find it

My first thought would be to add -
capability “Thermostat”
in the metadata rather than changing the ocfDeviceType. Once this is done you’ll need to use ST to authorize the device to Alexa, and then have Alexa discover devices. I’d also revert to the original ocfDeviceType so that they look/behave properly in the new app.

I believe you can also use Alexa to query temperature of contact sensors and motion sensors, and adding either of those capabilities should allow Alexa to see them also. This might be a better option since it would limit the number of potential voice commands that won’t work and likely limit confusing responses from Alexa to some extent. Not sure if you can query humidity of those devices with Alexa though.

Edit: Just tried adding capability “Thermostat”, capability “Contact Sensor”, and capability “Motion Sensor” to the DTH and now all of my Aqara temp sensors are visible in Alexa. The thermostat option does give the device a nice thermometer icon in Alexa, but as mentioned I think using contact sensor or motion sensor might be a better option to limit confusing commands/responses.

1 Like

Ok I added all three capability and now I can find it in Alexa but when I try to check it in alexa it gives in the smartthings log

“thermostat mode state is invalid”

Do I have to get back to the previous ocfDeviceType?

I would only add one of those capabilities, not all three. And yes, I would also revert to the original ocfDeviceType.

Getting some type of error is pretty likely since you’re adding capabilities to the sensors that they’re not actually capable of. Error could also be from the device type though. You might try deleting the devices from Alexa, using only the contact sensor capability in the dth, and then rediscovering. I would think contact sensor would have the least likelihood of throwing errors.

1 Like

But if I set the type to contact sensor I can ask alexa for temperature or humidity?

Temperature yes. Not sure about humidity, but my guess would be no.

Anyway I revert to the original DTH, the bspranger Xiaomi Aqara Temperature Humidity Sensor DTH, and just added "capability “Thermostat”, deleted from Alexa, deactived the smartthings skill and the reconnect and search for devices. I found the Sensor but still when I open it in Alexa it just shows animated dots and a message saying “waiting for SmartThings”.
Now I will try contact sensor

Ok, adding the Contact Sensor capability it shows on Alexa and when I open it it just tells it’s closed.
If I ask Alexa for temperature it answer me
If I ask Alexa for humidity it says that option is not available
It’s a pity it doesn’t work as Thermostat, I would prefer to have the chance to ask/view temperature and humidity

Anyway if I set as Thermostat the behaviour is similar, it stills answe me with temperature, it doesn’t answer for humidity and in the alexa app it waits for smartthings

Yeah, I just tested all three. With contact or motion sensor you can query temperature, but asking for humidity throws an error. Using thermostat you can also query temperature, but when asking for humidity Alexa says “that’s not supported yet” instead of throwing an error.

That’s strange as I have the same behaviour and I don’t get an error with the motion sensor but the “not supported yet” message

Do you have any idea on how I can change the DTH to avoid the “thermostat mode state is invalid” error in smartthings and let Alexa display temperature correctly?

I don’t, sorry.