cancel
Showing results for 
Search instead for 
Did you mean: 

Phone notification for Matter open/close sensor

SoccerGeek
Community Member

I am trying to set up an automation in which I get a notification on my phone when my open/close sensor changes to the open state.   I am able to send a broadcast to my smart display, but cannot find an action in which I can get a notification on my phone when the door is open.   I have a Matter open/close sensor and added it to the Google Home app and it does show up there.   I looked to see if there was a way to set a notification for that specific in the Google home app that seemed to be suggested by search, but I cannot find an option for that which is why I was trying to write an automation for it.    I think I must  be missing something since it seems that getting notified on my phone when my door is open is pretty basic.  I know I could probably use the app for the notification, but I was thinking one of the benefits of Matter devices is to reduce the need for multiple apps.

The open/close sensor I have is the Aqara  door and window sensor P2

Any help would b appreciated.

Thanks.

4 REPLIES 4

marcwenning
Community Member

I have the same sensor, cant figure out how to get a notification from the google home app when the door is opened.  I can see if it is opened or closed by looking at the app, but would be great if it would send a notification as well

DWB1973
Community Member

I don't think phone notifications are a supported action, even with scripted automations.  Unless I missed it, there doesn't seem to be anything on the list of supported actions that resembles notification.

References:

https://developers.home.google.com/automations/starters-conditions-and-actions

https://developers.home.google.com/automations/schema/reference/standard/action

JS740
Community Member

I have the same sensors as well... unfortunately you can't even set them up in the Aqara App as they will only connect to an Aqara Hub when it comes out in 2024.  Looking to replace my Nest Secure Sensors and use them as an alarm system with the Aqara motion sensor P1's and Aqara Hub M2.  At this point the Aqara door and window sensor P2 seem useless to me!

Hoping someone has an answer for how to get them to work as the Nest Secure will be a paper weight come April.

Ziflin
Community Member

I just purchased this same sensor and had the same question. It's pretty insane that Google Home does not have a simple / clear way to do this. There are currently two ways that I've found, but using the Google Home app way is basically useless do to how repeat notifications work (see below):

In Google Home App

1. Create a new Household Automation / Routine. It has to be Household in order to respond to a device (b/c?)

2.For Starter: Select "When a device does something" and then the door/window sensor. Then click Opens or closes and select "Opens".

3. For the "Action": Select "Communicate and announce" and then "Make an Announcement".  Click "Announce on device that starts the routine". And enter the message "Door Open" or whatever.

Be sure to save everything for the automation.

Despite using the weird "Announce on device that starts the routine" setting, this should popup a notification on your phone (despite being a Household routine).

The problem with this, is that only the first notification that comes to the phone will make a sound unless you clear the notification. So if you're say leaving the house, you'll get a Ding sound with the notification on your phone. But if you don't clear the notification in your phone's log, you won't get another notification sound (it will simply update the timestamp on the same notification). This makes it pretty useless for knowing when someone enters your home, so hopefully they update this soon!

 

Using the Web-Based Automation Script Editor

1. Open the Google Home Website: https://home.google.com/

2. Click Automations

3. Click Add New

4. Paste the following into the script editor, replacing the previous script:

# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #

metadata:
  name: Door Open Alert # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  description: Do something when the door opens. # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”

automations:
  # “starters” and “actions” are required; “conditions” are optional.
  # Use Ctrl + Space to see autocomplete suggestions.

  # ---- STARTERS ---- #
  # Starters describe events that will start the automation.
  # To add more than one starter, duplicate the "- type" section under "starters".
  # If you add multiple starter events, any one of them happening will start the automation.
  starters:
    - type: device.state.OpenClose
      state: openPercent
      # [available operators: is, isNot, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo]
      is: 100
      device: <Device Name> - <Room Name>

  # ---- CONDITIONS ---- #
  # Conditions are optional. Delete this section if it’s empty.
  # Conditions will prevent an automation from starting if the conditions aren’t met.
  # See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.
  #condition:
  #  type:

  # ---- ACTIONS ---- #
  # Actions will start when a starter event takes place and all conditions are met.
  # Actions will start in the order they appear in the script and with any delay specified.
  # To add more than one action, duplicate the "- type" section under "actions".
  actions:
    - type: home.command.Notification # Send a notification to the specified home members.
      # [Available parameter options: title, body, members]
      title: Door Opened
      body: Door was opened.
      members:
        - ***Edit this to select who receives the notification.***

5. Edit the device: line. Delete the Device Name - Room Name text and it should auto-complete with the possible devices that you have added.

6. Edit the members: line and delete the comment and it should show available members. You can add another by copying that line (indentation and dash matter). 

7. Click Validate and then Save once there are no errors.

 

This method appears to send a new notification (and play your notification sound) for each open event. There is also a note in their script editor: "Coming Soon: ... New actions like custom notifications".  This would be great as some notifications may be more important than others. Hopefully it allows us to get rid of the somewhat useless "Automation by XXX" text that appears in the notification.