{
    "id": 68,
    "date": "2026-10-17T02:27:53",
    "date_gmt": "2026-10-16T23:27:53",
    "guid": {
        "rendered": "https:\/\/realhomeautomations.com\/projects\/motion-activated-hallway-lighting\/"
    },
    "modified": "2026-10-17T02:27:53",
    "modified_gmt": "2026-10-16T23:27:53",
    "slug": "motion-activated-hallway-lighting",
    "status": "publish",
    "type": "diy_project",
    "link": "https:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/",
    "title": {
        "rendered": "Motion-Activated Hallway Lighting"
    },
    "content": {
        "rendered": "<h2 class=\"wp-block-heading\">What you will build<\/h2>\n<p class=\"wp-block-paragraph\">The two-product kit combines a Sonoff SNZB-03P motion sensor with a Sonoff ZBMINIR2 relay. The battery sensor detects movement and ambient light; the powered relay switches the existing hallway circuit and strengthens the Zigbee mesh. A compatible Zigbee coordinator is required and is not included.<\/p>\n<h2 class=\"wp-block-heading\">Before you start<\/h2>\n<ul class=\"wp-block-list\"><li>Confirm that the relay fits the enclosure, the lighting load is supported, and a neutral conductor is available.<\/li><li>Isolate and prove the circuit dead before opening any enclosure. Use a qualified electrician where required.<\/li><li>Choose a sensor position with a clear approach path but away from radiators, direct sunlight and moving curtains.<\/li><li>Back up Home Assistant and note the current wall-switch behavior.<\/li><\/ul>\n<h2 class=\"wp-block-heading\">1. Install and pair the relay<\/h2>\n<p class=\"wp-block-paragraph\">Have the ZBMINIR2 installed according to its wiring diagram. Pair it near the coordinator before closing the enclosure, name it Hallway light relay, and verify that both Home Assistant and the physical wall switch can turn the light on and off.<\/p>\n<h2 class=\"wp-block-heading\">2. Pair and position the motion sensor<\/h2>\n<p class=\"wp-block-paragraph\">Pair the SNZB-03P, name its motion and illuminance entities, and test the planned mounting position for at least ten passes from every direction. PIR detects movement rather than stationary presence, which is appropriate for a transit area such as a hallway.<\/p>\n<h2 class=\"wp-block-heading\">3. Create the light-on automation<\/h2>\n<ul class=\"wp-block-list\"><li>Trigger when the motion entity changes to detected.<\/li><li>Start with a simple time condition such as sunset to sunrise. Add an illuminance threshold only after observing reliable readings.<\/li><li>Turn on the relay only when the light is currently off.<\/li><\/ul>\n<h2 class=\"wp-block-heading\">4. Create the delayed-off automation<\/h2>\n<p class=\"wp-block-paragraph\">Use a separate automation triggered when motion remains clear for 90 seconds, then turn the relay off. A separate off automation restarts its timer naturally when movement returns and is easier to troubleshoot than one long action sequence.<\/p>\n<h2 class=\"wp-block-heading\">5. Commission the finished setup<\/h2>\n<ul class=\"wp-block-list\"><li>Walk the hallway slowly and quickly from every entrance.<\/li><li>Confirm that new motion during the delay keeps the light on.<\/li><li>Restart Home Assistant and verify that the physical wall switch still controls the circuit.<\/li><li>Review false triggers for several evenings before shortening the delay.<\/li><\/ul>",
        "protected": false
    },
    "excerpt": {
        "rendered": "<p>Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.<\/p>",
        "protected": false
    },
    "author": 1,
    "featured_media": 30,
    "template": "",
    "diy_project_category": [
        52
    ],
    "diy_project_tag": [
        54,
        56,
        53
    ],
    "class_list": [
        "post-68",
        "diy_project",
        "type-diy_project",
        "status-publish",
        "has-post-thumbnail",
        "hentry",
        "diy_project_category-lighting",
        "diy_project_tag-home-assistant",
        "diy_project_tag-motion",
        "diy_project_tag-zigbee"
    ],
    "acf": {
        "_diysmart_difficulty": "intermediate",
        "_diysmart_featured": true,
        "_diysmart_build_duration_min": 1,
        "_diysmart_build_duration_max": 2,
        "_diysmart_build_duration_unit": "hours",
        "_diysmart_reading_time_override": 8,
        "_diysmart_required_tools_rows": [
            {
                "label": "Insulated screwdriver and approved voltage tester",
                "note": ""
            },
            {
                "label": "Home Assistant with ZHA or Zigbee2MQTT",
                "note": ""
            },
            {
                "label": "Phone or laptop for live motion testing",
                "note": ""
            }
        ],
        "_diysmart_learning_outcomes_rows": [
            {
                "outcome": "Choose a PIR position that avoids blind spots"
            },
            {
                "outcome": "Create separate on and delayed-off automations"
            },
            {
                "outcome": "Keep physical switching available during controller outages"
            }
        ],
        "_diysmart_skill_requirements_rows": [
            {
                "requirement": "Basic Home Assistant entity management",
                "note": ""
            },
            {
                "requirement": "Understanding of triggers, conditions and delays",
                "note": ""
            },
            {
                "requirement": "Qualified electrical installation for the in-wall relay",
                "note": ""
            }
        ],
        "_diysmart_linked_product_id": 63,
        "_diysmart_youtube_url": "",
        "_diysmart_github_url": ""
    },
    "yoast_head": "<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Motion-Activated Hallway Lighting - Real Home Automations<\/title>\n<meta name=\"description\" content=\"Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Motion-Activated Hallway Lighting - Real Home Automations\" \/>\n<meta property=\"og:description\" content=\"Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/68\" \/>\n<meta property=\"og:site_name\" content=\"Real Home Automations\" \/>\n<meta property=\"og:image\" content=\"https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/\"},\"author\":{\"name\":\"DIYSmart Team\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/person\\\/762335b7812ecb9e45d2ce88eefb48b2\"},\"headline\":\"Motion-Activated Hallway Lighting\",\"datePublished\":\"2026-10-16T23:27:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/\"},\"wordCount\":344,\"image\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wifishop-sonoff-zbminir2.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/\",\"url\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/\",\"name\":\"Motion-Activated Hallway Lighting - Real Home Automations\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wifishop-sonoff-zbminir2.jpg\",\"datePublished\":\"2026-10-16T23:27:53+00:00\",\"description\":\"Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/realhomeautomations.com\\\/bg\\\/projects\\\/motion-activated-hallway-lighting\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#primaryimage\",\"url\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wifishop-sonoff-zbminir2.jpg\",\"contentUrl\":\"https:\\\/\\\/realhomeautomations.com\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/wifishop-sonoff-zbminir2.jpg\",\"width\":900,\"height\":1200,\"caption\":\"Sonoff ZBMINIR2 Zigbee Smart Relay\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/projects\\\/motion-activated-hallway-lighting\\\/#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\":\"Motion-Activated Hallway Lighting\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#website\",\"url\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/\",\"name\":\"DIYSmart\",\"description\":\"Open smart-home products and complete DIY projects\",\"alternateName\":\"DIY Smart Home\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/realhomeautomations.com\\\/bg\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/realhomeautomations.com\\\/en\\\/#\\\/schema\\\/person\\\/762335b7812ecb9e45d2ce88eefb48b2\",\"name\":\"DIYSmart Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g\",\"caption\":\"DIYSmart Team\"},\"sameAs\":[\"https:\\\/\\\/realhomeautomations.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->",
    "yoast_head_json": {
        "title": "Motion-Activated Hallway Lighting - Real Home Automations",
        "description": "Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.",
        "robots": {
            "index": "noindex",
            "follow": "follow",
            "max-snippet": "max-snippet:-1",
            "max-image-preview": "max-image-preview:large",
            "max-video-preview": "max-video-preview:-1"
        },
        "og_locale": "en_US",
        "og_type": "article",
        "og_title": "Motion-Activated Hallway Lighting - Real Home Automations",
        "og_description": "Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.",
        "og_url": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/68",
        "og_site_name": "Real Home Automations",
        "og_image": [
            {
                "width": 900,
                "height": 1200,
                "url": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg",
                "type": "image\/jpeg"
            }
        ],
        "twitter_card": "summary_large_image",
        "twitter_misc": {
            "Est. reading time": "2 minutes"
        },
        "schema": {
            "@context": "https:\/\/schema.org",
            "@graph": [
                {
                    "@type": "TechArticle",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#article",
                    "isPartOf": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/"
                    },
                    "author": {
                        "name": "DIYSmart Team",
                        "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/person\/762335b7812ecb9e45d2ce88eefb48b2"
                    },
                    "headline": "Motion-Activated Hallway Lighting",
                    "datePublished": "2026-10-16T23:27:53+00:00",
                    "mainEntityOfPage": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/"
                    },
                    "wordCount": 344,
                    "image": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#primaryimage"
                    },
                    "thumbnailUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg",
                    "inLanguage": "en-US"
                },
                {
                    "@type": "WebPage",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/",
                    "url": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/",
                    "name": "Motion-Activated Hallway Lighting - Real Home Automations",
                    "isPartOf": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/#website"
                    },
                    "primaryImageOfPage": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#primaryimage"
                    },
                    "image": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#primaryimage"
                    },
                    "thumbnailUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg",
                    "datePublished": "2026-10-16T23:27:53+00:00",
                    "description": "Use a Zigbee PIR sensor and in-wall relay to switch a hallway light quickly, then turn it off after a quiet delay.",
                    "breadcrumb": {
                        "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#breadcrumb"
                    },
                    "inLanguage": "en-US",
                    "potentialAction": [
                        {
                            "@type": "ReadAction",
                            "target": [
                                "http:\/\/realhomeautomations.com\/bg\/projects\/motion-activated-hallway-lighting\/"
                            ]
                        }
                    ]
                },
                {
                    "@type": "ImageObject",
                    "inLanguage": "en-US",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#primaryimage",
                    "url": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg",
                    "contentUrl": "https:\/\/realhomeautomations.com\/wp-content\/uploads\/2026\/10\/wifishop-sonoff-zbminir2.jpg",
                    "width": 900,
                    "height": 1200,
                    "caption": "Sonoff ZBMINIR2 Zigbee Smart Relay"
                },
                {
                    "@type": "BreadcrumbList",
                    "@id": "http:\/\/realhomeautomations.com\/en\/projects\/motion-activated-hallway-lighting\/#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": "Motion-Activated Hallway Lighting"
                        }
                    ]
                },
                {
                    "@type": "WebSite",
                    "@id": "http:\/\/realhomeautomations.com\/en\/#website",
                    "url": "http:\/\/realhomeautomations.com\/en\/",
                    "name": "DIYSmart",
                    "description": "Open smart-home products and complete DIY projects",
                    "alternateName": "DIY Smart Home",
                    "potentialAction": [
                        {
                            "@type": "SearchAction",
                            "target": {
                                "@type": "EntryPoint",
                                "urlTemplate": "http:\/\/realhomeautomations.com\/bg\/?s={search_term_string}"
                            },
                            "query-input": {
                                "@type": "PropertyValueSpecification",
                                "valueRequired": true,
                                "valueName": "search_term_string"
                            }
                        }
                    ],
                    "inLanguage": "en-US"
                },
                {
                    "@type": "Person",
                    "@id": "http:\/\/realhomeautomations.com\/en\/#\/schema\/person\/762335b7812ecb9e45d2ce88eefb48b2",
                    "name": "DIYSmart Team",
                    "image": {
                        "@type": "ImageObject",
                        "inLanguage": "en-US",
                        "@id": "https:\/\/secure.gravatar.com\/avatar\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g",
                        "url": "https:\/\/secure.gravatar.com\/avatar\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g",
                        "contentUrl": "https:\/\/secure.gravatar.com\/avatar\/59917ac3be824a5369e3b98dd833a723ba8d92edaf71bf5d2f0173470d75d786?s=96&d=mm&r=g",
                        "caption": "DIYSmart Team"
                    },
                    "sameAs": [
                        "https:\/\/realhomeautomations.com"
                    ]
                }
            ]
        }
    },
    "_links": {
        "self": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/68",
                "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": 0,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project\/68\/revisions"
            }
        ],
        "acf:post": [
            {
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/product\/63"
            }
        ],
        "wp:featuredmedia": [
            {
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/media\/30"
            }
        ],
        "wp:attachment": [
            {
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/media?parent=68"
            }
        ],
        "wp:term": [
            {
                "taxonomy": "diy_project_category",
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project_category?post=68"
            },
            {
                "taxonomy": "diy_project_tag",
                "embeddable": true,
                "href": "https:\/\/realhomeautomations.com\/en\/wp-json\/wp\/v2\/diy_project_tag?post=68"
            }
        ],
        "curies": [
            {
                "name": "wp",
                "href": "https:\/\/api.w.org\/{rel}",
                "templated": true
            }
        ]
    }
}