{
    "id": 129,
    "date": "2026-09-13T22:46:58",
    "date_gmt": "2026-09-13T19:46:58",
    "guid": {
        "rendered": "http:\/\/realhomeautomations.com\/bg\/projects\/tema-45\/"
    },
    "modified": "2026-11-23T18:24:03",
    "modified_gmt": "2026-11-23T16:24:03",
    "slug": "zabravi-li-da-zaklyuchish-avtomatichno-zaklyuchvane-i-izvestie",
    "status": "publish",
    "type": "diy_project",
    "link": "https:\/\/realhomeautomations.com\/en\/projects\/zabravi-li-da-zaklyuchish-avtomatichno-zaklyuchvane-i-izvestie\/",
    "title": {
        "rendered": "Forgot to lock up? Automatic locking and a notification"
    },
    "content": {
        "rendered": "<p class=\"wp-block-paragraph\">You leave in a hurry, pull the door shut and on the way you wonder whether you locked it. Two automations take that question away: one locks the door after it has stayed closed for some time, the other writes to you if an unlocked door has been left with nobody at home.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How it works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The door sensor says &#8220;open&#8221; or &#8220;closed&#8221;. The lock says &#8220;locked&#8221; or &#8220;unlocked&#8221;. Home Assistant compares the two. If the door has been closed for 10 minutes and the lock is still unlocked, it sends a lock command. The sensor stops the rule from locking onto an open door.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second automation locks nothing. It watches the people you track in Home Assistant ( <code>person.*<\/code>). If everyone is away from home for a chosen time and the lock is unlocked, you get a notification on your phone. You decide: you go back or you lock from the lock&#8217;s app.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many smart locks also have their own automatic locking. The Aqara U200, which we use, has it among its features. Here we do it in Home Assistant, because that way the condition is the state of your own door sensor and you can change it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Before you turn on automatic locking<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An automatic lock can lock you out. Check three things before you start the rule:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You have a mechanical key that really unlocks, and another person or a safe place to get it from. Try it at least once.<\/li>\n\n\n\n<li>The door opens from the inside without a key, a code or a phone. That depends on your lock and cylinder. Read the manual and test it with the door open.<\/li>\n\n\n\n<li>You know how to turn the rule off (see \u201cLimitations\u201d) before guests or tradespeople catch you off guard.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Add the lock and the sensor<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The lock is a Matter device. In Home Assistant it is added through the Matter integration and its Matter Server. The U200 runs on Thread, so you also need a Thread border router in range. Our sensor is a Sonoff SNZB-04P through ZHA. The shop has the <a href=\"https:\/\/realhomeautomations.com\/bg\/produkt\/smart-door-and-window-sensor-sonoff-snzb-04pr1-zigbee-3-0-protocol-cr2477-battery-powered-real-time-opening-alerts-ewelink-home-assistant\/\">Sonoff SNZB-04PR1<\/a> (Zigbee 3.0, CR2477 battery); we haven&#8217;t tested it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fix the sensor so that, with the door closed, the distance between it and the magnet is under 20 mm and the markings face each other. Check the spot first, then stick it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check in <strong>Developer tools \u2192 States<\/strong>: <code>lock.*<\/code> the lock&#8217;s state should switch between <code>locked<\/code> and <code>unlocked<\/code>, and the sensor (<code>binary_sensor.*<\/code> with class <code>opening<\/code>) should be <code>on<\/code> when the door is open and <code>off<\/code> when it is closed. If it doesn&#8217;t match, don&#8217;t go on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Lock after the door has been closed<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Settings \u2192 Automations &amp; scenes \u2192 Create automation \u2192 Create new automation<\/strong>, the three-dot menu \u2192 <strong>Edit in YAML<\/strong> and paste the example. Replace <code>lock.front_door<\/code> and <code>binary_sensor.front_door_opening<\/code> with your own.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias: Front door auto-lock after close\ndescription: Locks when the door has been closed for at least 10 minutes and the lock is unlocked.\nmode: single\ntriggers:\n  - trigger: time_pattern\n    minutes: \"\/1\"\n  - trigger: state\n    entity_id: binary_sensor.front_door_opening\n    to: \"off\"\n    for:\n      minutes: 10\nconditions:\n  - condition: state\n    entity_id: binary_sensor.front_door_opening\n    state: \"off\"\n  - condition: state\n    entity_id: lock.front_door\n    state: \"unlocked\"\n  - condition: template\n    value_template: >-\n      {{ (as_timestamp(now()) - as_timestamp(states.binary_sensor.front_door_opening.last_changed)) >= 600 }}\nactions:\n  - action: lock.lock\n    target:\n      entity_id: lock.front_door<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The example values are 10 minutes (600 seconds) and a check every minute. If you change 10 minutes, change the number 600 in the template too, otherwise the two places will drift apart.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The two triggers do different jobs. The sensor fires the rule exactly 10 minutes after the door closes. The check every minute catches the case where the lock is unlocked and the door has been closed for a long time: then the sensor doesn&#8217;t change state and wouldn&#8217;t fire anything by itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This leads to a quirk: if you unlock the lock without opening the door, the rule locks it again within a minute. It doesn&#8217;t wait another 10 minutes. The condition looks at when the sensor changed its state, not at when you unlocked.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: A notification when the door is unlocked and nobody is home<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You need the Home Assistant Companion app on your phone, signed in to your Home Assistant and with notifications allowed. Find the service name in <strong>Developer tools \u2192 Actions<\/strong>: search for <code>notify.mobile_app<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias: Alert - everyone away and front door unlocked\ndescription: Notifies when all tracked people are away from home and the front door is unlocked.\nmode: single\ntriggers:\n  - trigger: template\n    value_template: >-\n      {{ is_state('person.vkashti_1', 'not_home')\n         and is_state('lock.front_door', 'unlocked') }}\n    for:\n      minutes: 25\nactions:\n  - action: notify.mobile_app_telefon_1\n    data:\n      title: The front door is unlocked!\n      message: Everyone has been away from home for over 25 minutes, and the front door is still unlocked.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you track more than one person, add another <code>is_state('person.\u2026', 'not_home')<\/code> together with <code>and<\/code> and another notification. 25 minutes is our value, not a rule. Choose a time that doesn&#8217;t send you a notification on every short outing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The template trigger fires when the condition becomes true and waits <code>for<\/code>. Restarting Home Assistant or reloading the automations resets this wait. A notification that should have come may not come.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>First test with a short time.<\/strong> For a trial, change 10 to 1 minute and 600 to 60 (in both places). Stay inside and keep the key. Unlock, close the door and wait. The lock should lock, and in <strong>Settings \u2192 Automations &amp; scenes<\/strong> \u2192 the automation \u2192 <strong>Traces<\/strong> you should see a run with <code>lock.lock<\/code>.<\/li>\n\n\n\n<li><strong>Edge case: open door.<\/strong> Unlock, open the door and leave it open longer than the time. The lock must not lock. The sensor condition should stop the trace with <code>failed_conditions<\/code>.<\/li>\n\n\n\n\n<li><strong>After a restart.<\/strong> Restart Home Assistant. Check that the lock and the sensor show correct states again before you restore the normal values.<\/li>\n\n\n\n<li><strong>The notification.<\/strong> Reduce 25 minutes to 1 and leave the home with your phone. Then restore the value.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">If it doesn&#8217;t work<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The trace is always <code>failed_conditions<\/code>.<\/strong> The rule is evaluated every minute, so this is normal when the lock is locked. If the lock is unlocked and the trace still fails, open it and see which condition didn&#8217;t pass.<\/li>\n\n\n\n<li><strong>The lock doesn&#8217;t lock, and the conditions pass.<\/strong> Check its state: <code>jammed<\/code>, <code>unavailable<\/code> or <code>open<\/code> are not <code>unlocked<\/code>. Move the Thread border router closer or check that the Matter Server is running.<\/li>\n\n\n\n<li><strong>It locks onto an open door.<\/strong> The sensor says &#8220;closed&#8221;, and the door isn&#8217;t. Most often it is a shifted magnet or a distance over 20 mm. Stop the automation and fix the installation.<\/li>\n\n\n\n<li><strong>The notification doesn&#8217;t arrive.<\/strong> Check the name of <code>notify.mobile_app_*<\/code> and whether <code>person.*<\/code> has a location. State <code>unknown<\/code> is not <code>not_home<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Limitations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Batteries.<\/strong> The sensor uses a CR2477 (up to 5 years with normal use, according to Sonoff). The lock has a rechargeable battery (up to 6 months per the shop description), and its keypad runs on 4 AAA batteries. Set up a low-battery notification and don&#8217;t wait for the first failure.<\/li>\n\n\n\n<li><strong>Locking yourself out.<\/strong> If you go out and come back after more than 10 minutes, you&#8217;ll find the door locked. Carry a key or a phone, or extend the time.<\/li>\n\n\n\n<li><strong>A sensor that stops responding.<\/strong> State <code>unavailable<\/code> is not <code>off<\/code>, so the rule doesn&#8217;t lock. But battery-powered Zigbee devices are shown as unavailable with a delay. Until then Home Assistant may remember the last state, and it may not be true.<\/li>\n\n\n\n<li><strong>The notification doesn&#8217;t lock.<\/strong> It only says that something isn&#8217;t right. Nothing is closed remotely until you do it.<\/li>\n\n\n\n<li><strong>Connection.<\/strong> Matter and Zigbee work on the local network, so locking doesn&#8217;t depend on the internet. The notification goes through the phone&#8217;s push service and may be late or not arrive without a connection.<\/li>\n\n\n\n<li><strong>How to turn it off.<\/strong> In <strong>Settings \u2192 Automations &amp; scenes<\/strong> turn off the automation&#8217;s switch. The lock keeps working with a key, a fingerprint or a code. Turn it back on when you want.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The two automations and the models are from Marto&#8217;s Home Assistant as of 19.10.2026. The examples are cleaned of names and phones, and the identifiers are examples. The descriptions of the sensor, the lock and the integrations follow the documentation. The edge cases from the \u201cCheck\u201d section (open door, restart) have not been specially tested by us. They are described as checks that you do.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/help.sonoff.tech\/docs\/snzb-04p\">Sonoff SNZB-04P: battery, distance to the magnet, installation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.home-assistant.io\/integrations\/matter\/\">Home Assistant: the Matter integration, Thread and local control<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.home-assistant.io\/integrations\/lock\/\">Home Assistant: the Lock integration and lock states<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.home-assistant.io\/docs\/automation\/trigger\/\">Home Assistant: triggers (time pattern, template, for)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.home-assistant.io\/docs\/automation\/condition\/\">Home Assistant: conditions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.home-assistant.io\/integrations\/person\/\">Home Assistant: the Person integration<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/companion.home-assistant.io\/docs\/notifications\/notifications-basic\/\">Home Assistant Companion: notifications<\/a><\/li>\n<\/ul>",
        "protected": false
    },
    "excerpt": {
        "rendered": "<p>A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.<\/p>",
        "protected": false
    },
    "author": 1,
    "featured_media": 3628,
    "template": "",
    "diy_project_category": [
        57
    ],
    "diy_project_tag": [],
    "class_list": [
        "post-129",
        "diy_project",
        "type-diy_project",
        "status-publish",
        "has-post-thumbnail",
        "hentry",
        "diy_project_category-security"
    ],
    "acf": {
        "_diysmart_difficulty": "intermediate",
        "_diysmart_featured": false,
        "_diysmart_build_duration_min": 45,
        "_diysmart_build_duration_max": 90,
        "_diysmart_build_duration_unit": "minutes",
        "_diysmart_home_assistant": "yes",
        "_diysmart_works_offline": "",
        "_diysmart_electrician": "no",
        "_diysmart_reading_time_override": "",
        "_diysmart_required_tools_rows": [
            {
                "label": "A smart lock that Home Assistant sees as a lock",
                "note": "ours is the Aqara Smart Lock U200 over Matter"
            },
            {
                "label": "Thread border router and Matter Server",
                "note": "the U200 runs on Thread"
            },
            {
                "label": "You need a Zigbee hub or Home Assistant with a Zigbee adapter.",
                "note": "for the door sensor"
            },
            {
                "label": "Home Assistant Companion on the phone",
                "note": "with notifications allowed"
            },
            {
                "label": "A mechanical key that unlocks",
                "note": "tested before you start the rule"
            }
        ],
        "_diysmart_learning_outcomes_rows": [
            {
                "outcome": "Check the state of the lock and the sensor in Developer tools \u2192 States"
            },
            {
                "outcome": "Build an automation that locks when the door has been closed for 10 minutes"
            },
            {
                "outcome": "Build a notification for when the lock is unlocked and the tracked people are away from home"
            },
            {
                "outcome": "Turn off automatic locking and avoid locking yourself out"
            }
        ],
        "_diysmart_skill_requirements_rows": [
            {
                "requirement": "Add Matter and Zigbee devices in Home Assistant",
                "note": ""
            },
            {
                "requirement": "Edit an automation in YAML",
                "note": ""
            },
            {
                "requirement": "Read an automation's trace (Traces)",
                "note": ""
            }
        ],
        "_diysmart_at_home": {
            "who": "Marto",
            "since": "2026-02 (the lock in Home Assistant)",
            "story": "The Aqara Smart Lock U200 is in Home Assistant over Matter, and the door is tracked by a Sonoff SNZB-04P. The locking automation is on and is evaluated every minute: if the door has been closed for at least 10 minutes and the lock is unlocked, it locks it. In the traces you most often see failed_conditions, meaning the lock is already locked. The second automation, with the notification, is also on and has a recorded trigger.",
            "image": null,
            "caption": ""
        },
        "_diysmart_linked_product_id": 3627,
        "_diysmart_youtube_url": "",
        "_diysmart_github_url": ""
    },
    "yoast_head": "<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Forgot to lock up? Automatic locking and a notification - Real Home Automations<\/title>\n<meta name=\"description\" content=\"A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Forgot to lock up? Automatic locking and a notification - Real Home Automations\" \/>\n<meta property=\"og:description\" content=\"A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129\" \/>\n<meta property=\"og:site_name\" content=\"Real Home Automations\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-23T16:24:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/\"},\"author\":{\"name\":\"Real Home Automations\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/person\\\/762335b7812ecb9e45d2ce88eefb48b2\"},\"headline\":\"Forgot to lock up? Automatic locking and a notification\",\"datePublished\":\"2026-09-13T19:46:58+00:00\",\"dateModified\":\"2026-11-23T16:24:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/\"},\"wordCount\":1265,\"publisher\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#organization\"},\"image\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/\",\"url\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/\",\"name\":\"Forgot to lock up? Automatic locking and a notification - Real Home Automations\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp\",\"datePublished\":\"2026-09-13T19:46:58+00:00\",\"dateModified\":\"2026-11-23T16:24:03+00:00\",\"description\":\"A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/realhomeautomations.com\\\/bg\\\/projects\\\/zabravi-li-da-zaklyuchish-avtomatichno-zaklyuchvane-i-izvestie\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#primaryimage\",\"url\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp\",\"contentUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp\",\"width\":1280,\"height\":1280,\"caption\":\"Smart Door and Window Sensor Sonoff SNZB-04PR1 \u2013 Zigbee 3.0 Protocol, CR2477 Battery Powered, Real-Time Opening Alerts, eWeLink & Home Assistant\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/forgot-to-lock-auto-lock-notification\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/realhomeautomations.com\\\/bg\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u041f\u0440\u043e\u0435\u043a\u0442\u0438\",\"item\":\"http:\\\/\\\/realhomeautomations.com\\\/bg\\\/projects\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Forgot to lock up? Automatic locking and a notification\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#website\",\"url\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/\",\"name\":\"Real Home Automations\",\"description\":\"Open smart-home products and complete DIY projects\",\"publisher\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/realhomeautomations.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Organization\",\"OnlineStore\"],\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#organization\",\"name\":\"Real Home Automations\",\"url\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/favicon-512.png\",\"contentUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/favicon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Real Home Automations\"},\"image\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"legalName\":\"\u201e\u0415\u0421 \u041a\u0415\u0419 \u0421\u041e\u0424\u0422\u0423\u0415\u0420\u201c \u0415\u041e\u041e\u0414\",\"vatID\":\"BG206246651\",\"taxID\":\"206246651\",\"email\":\"office@realhomeautomations.com\",\"telephone\":\"+359893232863\",\"address\":{\"@type\":\"PostalAddress\",\"streetAddress\":\"\u0443\u043b. \u201e\u0420\u0430\u0434\u0435\u0446\u043a\u0438\u201c 13, \u0435\u0442. 2, \u0430\u043f. 1\",\"addressLocality\":\"\u0412\u0430\u0440\u043d\u0430\",\"postalCode\":\"9000\",\"addressCountry\":\"BG\"},\"contactPoint\":{\"@type\":\"ContactPoint\",\"contactType\":\"customer support\",\"email\":\"office@realhomeautomations.com\",\"telephone\":\"+359893232863\",\"availableLanguage\":[\"bg\",\"en\"]},\"hasMerchantReturnPolicy\":{\"@type\":\"MerchantReturnPolicy\",\"applicableCountry\":\"BG\",\"returnPolicyCategory\":\"https:\\\/\\\/schema.org\\\/MerchantReturnFiniteReturnWindow\",\"merchantReturnDays\":14,\"returnMethod\":\"https:\\\/\\\/schema.org\\\/ReturnByMail\",\"returnFees\":\"https:\\\/\\\/schema.org\\\/ReturnFeesCustomerResponsibility\",\"merchantReturnLink\":\"https:\\\/\\\/realhomeautomations.com\\\/en\\\/returns\\\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/person\\\/762335b7812ecb9e45d2ce88eefb48b2\",\"name\":\"Real Home Automations\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g\",\"caption\":\"Real Home Automations\"},\"sameAs\":[\"https:\\\/\\\/realhomeautomations.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->",
    "yoast_head_json": {
        "title": "Forgot to lock up? Automatic locking and a notification - Real Home Automations",
        "description": "A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.",
        "robots": {
            "index": "index",
            "follow": "follow",
            "max-snippet": "max-snippet:-1",
            "max-image-preview": "max-image-preview:large",
            "max-video-preview": "max-video-preview:-1"
        },
        "canonical": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129",
        "og_locale": "en_US",
        "og_type": "article",
        "og_title": "Forgot to lock up? Automatic locking and a notification - Real Home Automations",
        "og_description": "A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.",
        "og_url": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129",
        "og_site_name": "Real Home Automations",
        "article_modified_time": "2026-11-23T16:24:03+00:00",
        "og_image": [
            {
                "width": 1280,
                "height": 1280,
                "url": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp",
                "type": "image\/jpeg"
            }
        ],
        "twitter_card": "summary_large_image",
        "twitter_misc": {
            "Est. reading time": "7 minutes"
        },
        "schema": {
            "@context": "https:\/\/schema.org",
            "@graph": [
                {
                    "@type": "TechArticle",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#article",
                    "isPartOf": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/"
                    },
                    "author": {
                        "name": "Real Home Automations",
                        "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/person\/762335b7812ecb9e45d2ce88eefb48b2"
                    },
                    "headline": "Forgot to lock up? Automatic locking and a notification",
                    "datePublished": "2026-09-13T19:46:58+00:00",
                    "dateModified": "2026-11-23T16:24:03+00:00",
                    "mainEntityOfPage": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/"
                    },
                    "wordCount": 1265,
                    "publisher": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/#organization"
                    },
                    "image": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#primaryimage"
                    },
                    "thumbnailUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp",
                    "inLanguage": "en-US"
                },
                {
                    "@type": "WebPage",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/",
                    "url": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/",
                    "name": "Forgot to lock up? Automatic locking and a notification - Real Home Automations",
                    "isPartOf": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/#website"
                    },
                    "primaryImageOfPage": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#primaryimage"
                    },
                    "image": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#primaryimage"
                    },
                    "thumbnailUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp",
                    "datePublished": "2026-09-13T19:46:58+00:00",
                    "dateModified": "2026-11-23T16:24:03+00:00",
                    "description": "A door sensor and a smart lock lock the front door after it has stayed closed for 10 minutes. A second automation sends a notification if it is unlocked while the tracked people are away from home.",
                    "breadcrumb": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#breadcrumb"
                    },
                    "inLanguage": "en-US",
                    "potentialAction": [
                        {
                            "@type": "ReadAction",
                            "target": [
                                "http:\/\/realhomeautomations.com\/bg\/projects\/zabravi-li-da-zaklyuchish-avtomatichno-zaklyuchvane-i-izvestie\/"
                            ]
                        }
                    ]
                },
                {
                    "@type": "ImageObject",
                    "inLanguage": "en-US",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#primaryimage",
                    "url": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp",
                    "contentUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/smart-door-and-window-sensor-sonoff-snzb-04pr1-E28093-zigbee-3-0-protocol.webp",
                    "width": 1280,
                    "height": 1280,
                    "caption": "Smart Door and Window Sensor Sonoff SNZB-04PR1 \u2013 Zigbee 3.0 Protocol, CR2477 Battery Powered, Real-Time Opening Alerts, eWeLink & Home Assistant"
                },
                {
                    "@type": "BreadcrumbList",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/forgot-to-lock-auto-lock-notification\/#breadcrumb",
                    "itemListElement": [
                        {
                            "@type": "ListItem",
                            "position": 1,
                            "name": "Home",
                            "item": "http:\/\/realhomeautomations.com\/bg\/"
                        },
                        {
                            "@type": "ListItem",
                            "position": 2,
                            "name": "\u041f\u0440\u043e\u0435\u043a\u0442\u0438",
                            "item": "http:\/\/realhomeautomations.com\/bg\/projects\/"
                        },
                        {
                            "@type": "ListItem",
                            "position": 3,
                            "name": "Forgot to lock up? Automatic locking and a notification"
                        }
                    ]
                },
                {
                    "@type": "WebSite",
                    "@id": "http:\/\/realhomeautomations.com\/en\/#website",
                    "url": "http:\/\/realhomeautomations.com\/en\/",
                    "name": "Real Home Automations",
                    "description": "Open smart-home products and complete DIY projects",
                    "publisher": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/#organization"
                    },
                    "potentialAction": [
                        {
                            "@type": "SearchAction",
                            "target": {
                                "@type": "EntryPoint",
                                "urlTemplate": "https:\/\/realhomeautomations.com\/en\/?s={search_term_string}"
                            },
                            "query-input": {
                                "@type": "PropertyValueSpecification",
                                "valueRequired": true,
                                "valueName": "search_term_string"
                            }
                        }
                    ],
                    "inLanguage": "en-US"
                },
                {
                    "@type": [
                        "Organization",
                        "OnlineStore"
                    ],
                    "@id": "http:\/\/realhomeautomations.com\/en\/#organization",
                    "name": "Real Home Automations",
                    "url": "http:\/\/realhomeautomations.com\/en\/",
                    "logo": {
                        "@type": "ImageObject",
                        "inLanguage": "en-US",
                        "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/logo\/image\/",
                        "url": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/favicon-512.png",
                        "contentUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/favicon-512.png",
                        "width": 512,
                        "height": 512,
                        "caption": "Real Home Automations"
                    },
                    "image": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/logo\/image\/"
                    },
                    "legalName": "\u201e\u0415\u0421 \u041a\u0415\u0419 \u0421\u041e\u0424\u0422\u0423\u0415\u0420\u201c \u0415\u041e\u041e\u0414",
                    "vatID": "BG206246651",
                    "taxID": "206246651",
                    "email": "office@realhomeautomations.com",
                    "telephone": "+359893232863",
                    "address": {
                        "@type": "PostalAddress",
                        "streetAddress": "\u0443\u043b. \u201e\u0420\u0430\u0434\u0435\u0446\u043a\u0438\u201c 13, \u0435\u0442. 2, \u0430\u043f. 1",
                        "addressLocality": "\u0412\u0430\u0440\u043d\u0430",
                        "postalCode": "9000",
                        "addressCountry": "BG"
                    },
                    "contactPoint": {
                        "@type": "ContactPoint",
                        "contactType": "customer support",
                        "email": "office@realhomeautomations.com",
                        "telephone": "+359893232863",
                        "availableLanguage": [
                            "bg",
                            "en"
                        ]
                    },
                    "hasMerchantReturnPolicy": {
                        "@type": "MerchantReturnPolicy",
                        "applicableCountry": "BG",
                        "returnPolicyCategory": "https:\/\/schema.org\/MerchantReturnFiniteReturnWindow",
                        "merchantReturnDays": 14,
                        "returnMethod": "https:\/\/schema.org\/ReturnByMail",
                        "returnFees": "https:\/\/schema.org\/ReturnFeesCustomerResponsibility",
                        "merchantReturnLink": "https:\/\/realhomeautomations.com\/en\/returns\/"
                    }
                },
                {
                    "@type": "Person",
                    "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/person\/762335b7812ecb9e45d2ce88eefb48b2",
                    "name": "Real Home Automations",
                    "image": {
                        "@type": "ImageObject",
                        "inLanguage": "en-US",
                        "@id": "https:\/\/secure.gravatar.com\/avatar\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g",
                        "url": "https:\/\/secure.gravatar.com\/avatar\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g",
                        "contentUrl": "https:\/\/secure.gravatar.com\/avatar\/4442f1640dcd6bf401460fe3f2393f03c3c10ab1a2bce81a588e1379d7f8795b?s=96&d=mm&r=g",
                        "caption": "Real Home Automations"
                    },
                    "sameAs": [
                        "https:\/\/realhomeautomations.com"
                    ]
                }
            ]
        }
    },
    "_links": {
        "self": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129",
                "targetHints": {
                    "allow": [
                        "GET"
                    ]
                }
            }
        ],
        "collection": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project"
            }
        ],
        "about": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/types\/diy_project"
            }
        ],
        "author": [
            {
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/users\/1"
            }
        ],
        "version-history": [
            {
                "count": 4,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129\/revisions"
            }
        ],
        "predecessor-version": [
            {
                "id": 4170,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/129\/revisions\/4170"
            }
        ],
        "acf:post": [
            {
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/product\/3627"
            }
        ],
        "wp:featuredmedia": [
            {
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/media\/3628"
            }
        ],
        "wp:attachment": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/media?parent=129"
            }
        ],
        "wp:term": [
            {
                "taxonomy": "diy_project_category",
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project_category?post=129"
            },
            {
                "taxonomy": "diy_project_tag",
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project_tag?post=129"
            }
        ],
        "curies": [
            {
                "name": "wp",
                "href": "https:\/\/api.w.org\/{rel}",
                "templated": true
            }
        ]
    }
}