Aqara water leak sensors not recognized by Alexa

I have an Aqara contact sensor that I have connected to Hubitat. The device works and Alexa is able to discover it (works great).

I just added an Aqara water leak sensor to Hubitat. The sensor works fine in Hubitat and I'm trying to get Alexa to discover it using the Hubitat Echo Skill but I am unable to get it to work.

I have gone into the Echo Skill (Hubitat UI) and added the device and then asked Alexa to discover new devices and Alexa can never discover it.

I have also disabled the Hubitat Echo Skill from the Alexa UI app and reenabled it and it still can't discover the water sensor.

I've tried removing the sensor from Hubitat and tried the whole process again, and still can't get Alexa to discover it.

Any help/suggestions would be appreciated.

From the documentation, the Hubitat Amazon Echo Skill supports:

switches, dimmers, door locks, fan controllers, garage door controllers, shade controllers, thermostat devices, contact and motion sensors

As you can see, leak sensors are not supported. If you need to get the status of a leak sensor into Amazon, you can do so using a virtual contact sensor along with an automation where the status of the leak sensor is mirrored onto the open/closed status of the virtual contact sensor.


Welcome to the Hubitat forums!

Could you describe why you want these sensors exposed in Alexa? What are you going to do with that information once it is in Alexa?

There might be something you can do on the hub instead of using Alexa.

You can use @cwwilson08's Virtual Contact with switch.... It will look at the water sensor as a contact sensor but present to alexa/google as a switch. Very simple

metadata {
definition (name: "Virtual contact with Switch", namespace: "cwilson08", author: "cwwilson08") {
capability "Sensor"
capability "Contact Sensor"
capability "Switch"

def on() {
sendEvent(name: "contact", value: "closed")
sendEvent(name: "switch", value: "on")

def off() {
sendEvent(name: "contact", value: "open")
sendEvent(name: "switch", value: "off")

def installed() {

1 Like

The purpose of sending to Alexa is to have all devices controlled from one central hub for notifications. The contact switch approach may just work.

Thanks for the help and the quick responses.

So just to clarify, I'm not sure how I tie the Aqara device to the "contact with switch" code. Are these the correct steps?

  1. Create driver code (listed above)
  2. Create a virtual device using the driver as the type
  3. Modify the Aqara device to use the virtual device as its type
  4. Add the Aqara device to the Amazon Echo Skill

If this is correct is there always a way to detect battery life?

No, this is incorrect - real/physical devices will not function if they are assigned virtual drivers. Here is what you do:

  1. Create a virtual contact sensor using the built-in driver "Virtual Contact Sensor". You do not need to install the driver posted earlier in this thread. You'll have to give this contact sensor a name, and expose it to the Amazon Echo Skill, so it will show up in your Alexa app.
  2. Using Rule Machine, create an automation like the following:

Here is what this automation does. When the real leak sensor is wet, it sets the virtual contact sensor to be "open", and when the real leak sensor is dry, it sets the virtual contact sensor to be closed. You can use the commands open() and close() in Rule Machine by "using a Custom Action" on the contact sensor.


And this brings me to why I don't understand what you are doing. Hubitat has extensive Notification capabilities. Notifications can be sent to the phone app (built-in integration), to Pushover (built-in integration), to SMS using Twilio (built-in integration) or Plivo (integration by @ritchierich), by email using two separate integrations written by @erktrek and @kahn-hubitat. These email integrations can also be used for email2SMS.

All these methods of notification, which are native to Hubitat, can be used to notify based on any device capability or attribute, including battery level. I personally prefer to receive my notifications by SMS. Here's a tiny sample of the SMS messages that I received yesterday from my hubs, including status of Hubitat-paired garden hose valves, my garage door, the Housekeeper's lock code being used and my presence.

When Hubitat offers such as rich plethora of notification options, and reporting capabilities, why limit yourself to the small slivers of information provided by Alexa?


Is your intent to use Alexa for notification if you have a water leak? If so, Echo Speaks is your friend. You can also use HSM to monitor and control these, though I just use RM because I take different actions depending on which sensor and whether the cleaners are here.