{"id":4095,"date":"2026-04-23T09:00:00","date_gmt":"2026-04-23T09:00:00","guid":{"rendered":"https:\/\/pirhome.com\/?p=4024"},"modified":"2026-04-23T09:00:00","modified_gmt":"2026-04-23T09:00:00","slug":"pir-smart-bathrooms-automation","status":"publish","type":"post","link":"https:\/\/www.pirhome.com\/?p=4095","title":{"rendered":"PIR Sensor for Smart Bathrooms: Occupancy and Automation"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Smart bathrooms use sensors to automate lighting, ventilation, and even hygiene features. PIR sensors play a key role in detecting occupancy and triggering these functions.<\/p>\n<h2>Applications in Bathrooms<\/h2>\n<h3>Occupancy Detection<\/h3>\n<p>Detect when someone enters the bathroom. Used for turning on lights, activating ventilation fans, and displaying &#8220;occupied&#8221; sign outside.<\/p>\n<h3>Lighting Control<\/h3>\n<p>Lights turn on when motion detected, turn off after period of inactivity (with sufficient delay to avoid turning off while using toilet).<\/p>\n<h3>Ventilation Control<\/h3>\n<p>Fan turns on when occupancy detected and runs for set time after exit to remove odors and moisture.<\/p>\n<h3>Hygiene Monitoring<\/h3>\n<p>Detect if soap dispenser or towel dispenser is accessed; trigger alerts when supplies low.<\/p>\n<h2>Sensor Placement in Bathrooms<\/h2>\n<ul>\n<li><strong>Ceiling-mounted:<\/strong> Best coverage for entire room<\/li>\n<li><strong>Wall-mounted near door:<\/strong> Detect entry\/exit<\/li>\n<li><strong>Inside shower stall:<\/strong> Waterproof sensor required<\/li>\n<\/ul>\n<h2>Special Considerations for Bathrooms<\/h2>\n<h3>Humidity and Steam<\/h3>\n<p>Bathrooms have high humidity and steam, which can condense on lens and block IR. Use sensors with conformal coating or IP-rated enclosures. Consider heated lenses to prevent condensation.<\/p>\n<h3>False Triggers from Water Flow<\/h3>\n<p>Running water can cause temperature changes that may trigger sensor. Proper placement away from direct water spray helps.<\/p>\n<h3>Privacy<\/h3>\n<p>PIR sensors are privacy-preserving \u2013 they don&#8217;t capture images, making them ideal for bathrooms.<\/p>\n<h2>Integration with Building Automation<\/h2>\n<p>PIR sensors can connect to building management systems via:<\/p>\n<ul>\n<li>Wired digital inputs<\/li>\n<li>Wireless protocols (Zigbee, Z-Wave, Bluetooth)<\/li>\n<li>KNX or BACnet systems<\/li>\n<\/ul>\n<h2>Case Study: Hotel Smart Bathroom<\/h2>\n<p>A hotel chain installed PIR sensors in bathroom ceilings. When a guest entered, lights turned on and fan started. After 5 minutes of no motion, lights dimmed to night-light level. Energy savings: 40% compared to always-on lighting.<\/p>\n<h2>Code Example: Bathroom Automation<\/h2>\n<pre><code>int pirPin = 2;\nint lightRelay = 3;\nint fanRelay = 4;\nunsigned long lastMotion = 0;\nconst unsigned long lightTimeout = 300000; \/\/ 5 minutes\nconst unsigned long fanTimeout = 600000;   \/\/ 10 minutes\nbool occupied = false;\n\nvoid loop() {\n    if (digitalRead(pirPin) == HIGH) {\n        lastMotion = millis();\n        if (!occupied) {\n            occupied = true;\n            digitalWrite(lightRelay, HIGH);\n            digitalWrite(fanRelay, HIGH);\n        }\n    }\n    \n    if (occupied && (millis() - lastMotion > lightTimeout)) {\n        digitalWrite(lightRelay, LOW);\n    }\n    \n    if (occupied && (millis() - lastMotion > fanTimeout)) {\n        digitalWrite(fanRelay, LOW);\n        occupied = false;\n    }\n}\n<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>PIR sensors make bathrooms smarter, more energy-efficient, and more hygienic. With proper environmental protection, they work reliably in this challenging environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Smart bathrooms use sensors to automate lighting, ventilation, and even hygiene features. PIR sensors play a key role in detecting occupancy and triggering these functions. Applications in Bathrooms Occupancy Detection Detect when someone enters the bathroom. Used for turning on lights, activating ventilation fans, and displaying &#8220;occupied&#8221; sign outside. Lighting Control Lights turn on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-4095","post","type-post","status-publish","format-standard","hentry","category-reference"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.pirhome.com\/?p=4095\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME\" \/>\r\n<meta property=\"og:description\" content=\"Introduction Smart bathrooms use sensors to automate lighting, ventilation, and even hygiene features. PIR sensors play a key role in detecting occupancy and triggering these functions. Applications in Bathrooms Occupancy Detection Detect when someone enters the bathroom. Used for turning on lights, activating ventilation fans, and displaying &#8220;occupied&#8221; sign outside. Lighting Control Lights turn on [&hellip;]\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.pirhome.com\/?p=4095\" \/>\r\n<meta property=\"og:site_name\" content=\"PIRHOME\" \/>\r\n<meta property=\"article:published_time\" content=\"2026-04-23T09:00:00+00:00\" \/>\r\n<meta name=\"author\" content=\"nic@nicsky.com\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nic@nicsky.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095\"},\"author\":{\"name\":\"nic@nicsky.com\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/person\\\/41049b5236f9c77c9314997d070db3e3\"},\"headline\":\"PIR Sensor for Smart Bathrooms: Occupancy and Automation\",\"datePublished\":\"2026-04-23T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095\"},\"wordCount\":303,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#organization\"},\"articleSection\":[\"Reference\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pirhome.com\\\/?p=4095#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095\",\"name\":\"PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#website\"},\"datePublished\":\"2026-04-23T09:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pirhome.com\\\/?p=4095\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4095#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pirhome.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PIR Sensor for Smart Bathrooms: Occupancy and Automation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#website\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/\",\"name\":\"PIRHOME\",\"description\":\"PIR &amp; Motion Sensor\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pirhome.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#organization\",\"name\":\"PIRHOME\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg\",\"contentUrl\":\"https:\\\/\\\/www.pirhome.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg\",\"width\":512,\"height\":512,\"caption\":\"PIRHOME\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/person\\\/41049b5236f9c77c9314997d070db3e3\",\"name\":\"nic@nicsky.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"caption\":\"nic@nicsky.com\"},\"sameAs\":[\"http:\\\/\\\/www.pirhome.com\"],\"url\":\"https:\\\/\\\/www.pirhome.com\\\/?author=1\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME","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:\/\/www.pirhome.com\/?p=4095","og_locale":"en_US","og_type":"article","og_title":"PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME","og_description":"Introduction Smart bathrooms use sensors to automate lighting, ventilation, and even hygiene features. PIR sensors play a key role in detecting occupancy and triggering these functions. Applications in Bathrooms Occupancy Detection Detect when someone enters the bathroom. Used for turning on lights, activating ventilation fans, and displaying &#8220;occupied&#8221; sign outside. Lighting Control Lights turn on [&hellip;]","og_url":"https:\/\/www.pirhome.com\/?p=4095","og_site_name":"PIRHOME","article_published_time":"2026-04-23T09:00:00+00:00","author":"nic@nicsky.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"nic@nicsky.com","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pirhome.com\/?p=4095#article","isPartOf":{"@id":"https:\/\/www.pirhome.com\/?p=4095"},"author":{"name":"nic@nicsky.com","@id":"https:\/\/www.pirhome.com\/#\/schema\/person\/41049b5236f9c77c9314997d070db3e3"},"headline":"PIR Sensor for Smart Bathrooms: Occupancy and Automation","datePublished":"2026-04-23T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pirhome.com\/?p=4095"},"wordCount":303,"commentCount":0,"publisher":{"@id":"https:\/\/www.pirhome.com\/#organization"},"articleSection":["Reference"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pirhome.com\/?p=4095#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pirhome.com\/?p=4095","url":"https:\/\/www.pirhome.com\/?p=4095","name":"PIR Sensor for Smart Bathrooms: Occupancy and Automation - PIRHOME","isPartOf":{"@id":"https:\/\/www.pirhome.com\/#website"},"datePublished":"2026-04-23T09:00:00+00:00","breadcrumb":{"@id":"https:\/\/www.pirhome.com\/?p=4095#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pirhome.com\/?p=4095"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pirhome.com\/?p=4095#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pirhome.com\/"},{"@type":"ListItem","position":2,"name":"PIR Sensor for Smart Bathrooms: Occupancy and Automation"}]},{"@type":"WebSite","@id":"https:\/\/www.pirhome.com\/#website","url":"https:\/\/www.pirhome.com\/","name":"PIRHOME","description":"PIR &amp; Motion Sensor","publisher":{"@id":"https:\/\/www.pirhome.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pirhome.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pirhome.com\/#organization","name":"PIRHOME","url":"https:\/\/www.pirhome.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pirhome.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.pirhome.com\/wp-content\/uploads\/2026\/02\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg","contentUrl":"https:\/\/www.pirhome.com\/wp-content\/uploads\/2026\/02\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg","width":512,"height":512,"caption":"PIRHOME"},"image":{"@id":"https:\/\/www.pirhome.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.pirhome.com\/#\/schema\/person\/41049b5236f9c77c9314997d070db3e3","name":"nic@nicsky.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","caption":"nic@nicsky.com"},"sameAs":["http:\/\/www.pirhome.com"],"url":"https:\/\/www.pirhome.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4095"}],"version-history":[{"count":1,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4095\/revisions"}],"predecessor-version":[{"id":4628,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4095\/revisions\/4628"}],"wp:attachment":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}