15 |
16 | {{ content }}
17 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/suggest-automation.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Suggest automation
3 | about: Suggest a new automation for the cookbook
4 | title: '[AUTOMATION] '
5 | labels: 'automation-suggestion'
6 | assignees: ''
7 | ---
8 |
9 | ## Automation name
10 |
11 |
12 | ## Category
13 |
14 | - [ ] Lighting
15 | - [ ] Daily routines
16 | - [ ] Climate and comfort
17 | - [ ] Entertainment
18 | - [ ] Appliances
19 | - [ ] Safety and security
20 | - [ ] Notifications and alerts
21 | - [ ] Other (please specify)
22 |
23 | ## Description
24 |
25 |
26 | ## Use cases
27 |
28 |
29 | ## Devices/sensors needed
30 |
31 |
32 | ## Additional context
33 |
34 |
--------------------------------------------------------------------------------
/docs/_includes/recipe-schema.html:
--------------------------------------------------------------------------------
1 | {% if page.layout == 'automation' or page.schema_type == 'recipe' %}
2 |
29 | {% endif %}
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Home Automation Cookbook
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/docs/assets/js/navigation.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Navigation flyout positioning
3 | * Prevents flyout menus from extending beyond viewport on smaller screens
4 | */
5 |
6 | document.addEventListener('DOMContentLoaded', function() {
7 | const flyoutItems = document.querySelectorAll('.dropdown-item.has-flyout');
8 |
9 | function positionFlyout(item) {
10 | const flyout = item.querySelector('.flyout-menu');
11 | if (!flyout) return;
12 |
13 | // Remove existing class
14 | flyout.classList.remove('flyout-left');
15 |
16 | // Get parent dropdown item position
17 | const itemRect = item.getBoundingClientRect();
18 | const viewportWidth = window.innerWidth;
19 |
20 | // Calculate expected flyout width (min-width from CSS is 240px)
21 | const flyoutWidth = 240;
22 |
23 | // Check if flyout would overflow viewport when opened to the right
24 | // itemRect.right is where flyout would start, add flyout width + buffer
25 | if (itemRect.right + flyoutWidth + 20 > viewportWidth) {
26 | flyout.classList.add('flyout-left');
27 | }
28 | }
29 |
30 | // Position flyout on hover
31 | flyoutItems.forEach(item => {
32 | item.addEventListener('mouseenter', function() {
33 | positionFlyout(this);
34 | });
35 |
36 | // Also handle focus for keyboard navigation
37 | item.addEventListener('focusin', function() {
38 | positionFlyout(this);
39 | });
40 | });
41 |
42 | // Reposition on window resize (debounced)
43 | let resizeTimer;
44 | window.addEventListener('resize', function() {
45 | clearTimeout(resizeTimer);
46 | resizeTimer = setTimeout(function() {
47 | flyoutItems.forEach(item => {
48 | if (item.matches(':hover') || item.querySelector(':focus')) {
49 | positionFlyout(item);
50 | }
51 | });
52 | }, 250);
53 | });
54 | });
55 |
--------------------------------------------------------------------------------
/.github/workflows/jekyll.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Jekyll site to Pages
2 |
3 | on:
4 | # Runs on pushes targeting the default branch
5 | push:
6 | branches: ["main"]
7 |
8 | # Allows you to run this workflow manually from the Actions tab
9 | workflow_dispatch:
10 |
11 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12 | permissions:
13 | contents: read
14 | pages: write
15 | id-token: write
16 |
17 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19 | concurrency:
20 | group: "pages"
21 | cancel-in-progress: false
22 |
23 | jobs:
24 | # Build job
25 | build:
26 | runs-on: ubuntu-latest
27 | defaults:
28 | run:
29 | working-directory: ./docs
30 | steps:
31 | - name: Checkout
32 | uses: actions/checkout@v4
33 | - name: Setup Ruby
34 | uses: ruby/setup-ruby@v1
35 | with:
36 | ruby-version: '3.1'
37 | bundler-cache: true
38 | cache-version: 0
39 | working-directory: '${{ github.workspace }}/docs'
40 | - name: Setup Pages
41 | id: pages
42 | uses: actions/configure-pages@v4
43 | - name: Build with Jekyll
44 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
45 | - name: Upload artifact
46 | uses: actions/upload-pages-artifact@v3
47 | with:
48 | path: "docs/_site/"
49 |
50 | # Deployment job
51 | deploy:
52 | environment:
53 | name: github-pages
54 | url: ${{ steps.deployment.outputs.page_url }}
55 | runs-on: ubuntu-latest
56 | needs: build
57 | steps:
58 | - name: Deploy to GitHub Pages
59 | id: deployment
60 | uses: actions/deploy-pages@v4
61 |
--------------------------------------------------------------------------------
/docs/privacy-policy.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Privacy Policy
4 | description: Privacy policy for Home Automation Cookbook. Learn how we handle your data and protect your privacy.
5 | ---
6 |
7 | # Privacy policy
8 |
9 | **Last updated:** {{ site.time | date: '%B %d, %Y' }}
10 |
11 | Home Automation Cookbook is committed to protecting your privacy. This policy explains what information we collect and how we use it.
12 |
13 | ## Information we collect
14 |
15 | ### Website usage data
16 |
17 | We may collect basic analytics data to understand how visitors use our site:
18 |
19 | - Pages visited
20 | - Time spent on pages
21 | - Referral sources
22 | - Device type and browser
23 |
24 | This data is collected anonymously and cannot be used to identify you personally.
25 |
26 | ### No personal data collection
27 |
28 | Home Automation Cookbook does not:
29 |
30 | - Require account registration
31 | - Collect email addresses (unless you contact us directly)
32 | - Store personal information in databases
33 | - Use cookies for tracking across websites
34 | - Sell or share data with third parties
35 |
36 | ## GitHub contributions
37 |
38 | If you contribute to this project on GitHub:
39 |
40 | - Your GitHub username and contributions are publicly visible
41 | - GitHub's privacy policy applies to your use of their platform
42 | - You can review GitHub's privacy policy at [github.com/privacy](https://github.com/site/privacy)
43 |
44 | ## Third-party links
45 |
46 | Our site contains links to external resources and products. We are not responsible for the privacy practices of these external sites. We encourage you to read their privacy policies.
47 |
48 | ## External platforms mentioned
49 |
50 | The automation recipes reference various smart home platforms (Home Assistant, SmartThings, Google Home, Apple HomeKit, Amazon Alexa, Hubitat). Each platform has its own privacy policy that applies when you use their services.
51 |
52 | ## Contact
53 |
54 | If you have questions about this privacy policy, please open an issue on our [GitHub repository](https://github.com/madskristensen/HomeAutomationCookbook/issues).
55 |
56 | ## Changes to this policy
57 |
58 | We may update this privacy policy from time to time. Any changes will be reflected on this page with an updated date.
59 |
60 |
131 |
132 | ---
133 |
134 | [← Back to Home](/) | [Start with Lighting →](/automation/lighting/)
135 |
136 |
--------------------------------------------------------------------------------
/page-template.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: [REPLACE: Specific Action] - [REPLACE: Category] Automation Guide
4 | description: [REPLACE: 140-160 character description of automation and benefits]
5 | keywords: [REPLACE: keyword1, keyword2, keyword3, keyword4, keyword5, keyword6, keyword7, keyword8]
6 | ---
7 |
8 | # [REPLACE: Main Action Title]
9 |
10 | [REPLACE: 2-3 sentence introduction explaining the problem this solves and why it's valuable]
11 |
12 | ## Use Cases
13 |
14 | * **[REPLACE: Scenario 1]** - [Brief description]
15 | * **[REPLACE: Scenario 2]** - [Brief description]
16 | * **[REPLACE: Scenario 3]** - [Brief description]
17 | * **[REPLACE: Scenario 4]** - [Brief description]
18 | * **[REPLACE: Scenario 5]** - [Brief description]
19 |
20 | ## Products Needed
21 |
22 | ### Essential
23 |
24 | * **[REPLACE: Device Type 1]** - [Description]
25 | - Popular brands: [Brand 1, Brand 2, Brand 3]
26 | - Key features: [What to look for]
27 |
28 | * **[REPLACE: Device Type 2]** - [Description]
29 | - Options: [List examples]
30 |
31 | ### Optional Enhancements
32 |
33 | * **[REPLACE: Optional Device]** - [What it adds to automation]
34 |
35 | ## Basic Automation Setup
36 |
37 | ### Triggers
38 | * [REPLACE: Primary trigger]
39 | * OR [REPLACE: Alternative trigger]
40 |
41 | ### Conditions (Optional)
42 | * **[REPLACE: Condition type]:** [When this should apply]
43 | * **[REPLACE: Condition type]:** [Additional constraint]
44 |
45 | ### Actions
46 | * [REPLACE: First action]
47 | * [REPLACE: Second action]
48 | * Optional: [REPLACE: Optional action]
49 |
50 | ## Platform-Specific Examples
51 |
52 | ### Home Assistant
53 |
54 | ```yaml
55 | automation:
56 | - alias: "[REPLACE: Automation Name]"
57 | description: "[REPLACE: Brief description]"
58 | trigger:
59 | - platform: [REPLACE: trigger_type]
60 | entity_id: [REPLACE: entity.name]
61 | to: '[REPLACE: state]'
62 | condition:
63 | - condition: [REPLACE: condition_type]
64 | entity_id: [REPLACE: entity.name]
65 | state: '[REPLACE: state]'
66 | action:
67 | - service: [REPLACE: service.name]
68 | target:
69 | entity_id: [REPLACE: entity.name]
70 | data:
71 | [REPLACE: parameter]: [REPLACE: value]
72 | ```
73 |
74 | ### SmartThings
75 |
76 | Create routine:
77 | 1. **IF** [REPLACE: Trigger description]
78 | 2. **AND** [REPLACE: Condition if needed]
79 | 3. **THEN** [REPLACE: Action description]
80 |
81 | ### Apple HomeKit
82 |
83 | 1. Create automation in Home app
84 | 2. **When:** [REPLACE: Trigger]
85 | 3. **Conditions:** [REPLACE: Optional conditions]
86 | 4. **Do:** [REPLACE: Actions]
87 |
88 | ### Alexa
89 |
90 | Create routine:
91 | 1. **When:** [REPLACE: Trigger]
92 | 2. **Add condition:** [REPLACE: Optional condition]
93 | 3. **Action:** [REPLACE: What happens]
94 |
95 | ### Google Home
96 |
97 | Create automation:
98 | 1. **Starter:** [REPLACE: Trigger]
99 | 2. **Condition:** [REPLACE: Optional]
100 | 3. **Action:** [REPLACE: What happens]
101 |
102 | ## Advanced Features
103 |
104 | ### [REPLACE: Feature Name]
105 |
106 | [REPLACE: Description of advanced feature and how to implement it]
107 |
108 | ```yaml
109 | # Example code if applicable
110 | [REPLACE: code example]
111 | ```
112 |
113 | ### [REPLACE: Another Feature]
114 |
115 | [REPLACE: Description and implementation]
116 |
117 | ## Troubleshooting
118 |
119 | ### Issue: [REPLACE: Common Problem]
120 |
121 | **Causes:**
122 | - [REPLACE: Cause 1]
123 | - [REPLACE: Cause 2]
124 | - [REPLACE: Cause 3]
125 |
126 | **Solutions:**
127 | ✅ [REPLACE: Solution 1]
128 | ✅ [REPLACE: Solution 2]
129 | ✅ [REPLACE: Solution 3]
130 |
131 | ### Issue: [REPLACE: Another Problem]
132 |
133 | **Check:**
134 | - ✅ [REPLACE: Verification item]
135 | - ✅ [REPLACE: Verification item]
136 | - ✅ [REPLACE: Verification item]
137 |
138 | **Fix:**
139 | - [REPLACE: Step-by-step solution]
140 |
141 | ## SEO Keywords
142 |
143 | [REPLACE: Natural sentence containing main keywords for better SEO]
144 |
145 | ---
146 |
147 | **Related Automations:**
148 | - [REPLACE: Related Title 1](/automation/category/page-name/)
149 | - [REPLACE: Related Title 2](/automation/category/page-name/)
150 |
151 | [← Back to [REPLACE: Category] Automations](/automation/category/) | [View All Automations →](/automation/)
152 |
--------------------------------------------------------------------------------
/docs/assets/js/favorites.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Favorites functionality for Home Automation Cookbook
3 | * Uses localStorage to store user's favorite recipes
4 | */
5 | (function() {
6 | 'use strict';
7 |
8 | var STORAGE_KEY = 'home-automation-favorites';
9 |
10 | /**
11 | * Get the current page path normalized for storage
12 | */
13 | function getCurrentPath() {
14 | var path = window.location.pathname;
15 | path = path.replace(/\/+$/, '');
16 | if (!path.endsWith('.html') && path !== '/' && path.length > 0) {
17 | path = path + '.html';
18 | }
19 | return path;
20 | }
21 |
22 | /**
23 | * Get all favorites from localStorage
24 | */
25 | function getFavorites() {
26 | try {
27 | var stored = localStorage.getItem(STORAGE_KEY);
28 | return stored ? JSON.parse(stored) : [];
29 | } catch (e) {
30 | console.warn('Could not read favorites from localStorage:', e.message);
31 | return [];
32 | }
33 | }
34 |
35 | /**
36 | * Save favorites to localStorage
37 | */
38 | function saveFavorites(favorites) {
39 | try {
40 | localStorage.setItem(STORAGE_KEY, JSON.stringify(favorites));
41 | } catch (e) {
42 | console.warn('Could not save favorites to localStorage:', e.message);
43 | }
44 | }
45 |
46 | /**
47 | * Check if a path is favorited
48 | */
49 | function isFavorited(path) {
50 | var favorites = getFavorites();
51 | return favorites.indexOf(path) !== -1;
52 | }
53 |
54 | /**
55 | * Toggle favorite status for a path
56 | */
57 | function toggleFavorite(path) {
58 | var favorites = getFavorites();
59 | var index = favorites.indexOf(path);
60 |
61 | if (index === -1) {
62 | favorites.push(path);
63 | } else {
64 | favorites.splice(index, 1);
65 | }
66 |
67 | saveFavorites(favorites);
68 | return index === -1;
69 | }
70 |
71 | /**
72 | * Normalize a URL path for comparison
73 | */
74 | function normalizePath(href) {
75 | if (!href) return '';
76 | href = href.replace(/\/+$/, '');
77 | if (!href.endsWith('.html') && href !== '/' && href.length > 0 && href.indexOf('.') === -1) {
78 | href = href + '.html';
79 | }
80 | return href;
81 | }
82 |
83 | /**
84 | * Initialize the favorite button on recipe pages
85 | */
86 | function initFavoriteButton() {
87 | var container = document.querySelector('.container');
88 | var h1 = container ? container.querySelector('h1') : null;
89 |
90 | var path = getCurrentPath();
91 | // Only add favorite button on automation detail pages (not index pages)
92 | if (path.indexOf('/automation/') === -1 || path.endsWith('index.html') || path === '/automation.html') {
93 | return;
94 | }
95 |
96 | if (!h1) return;
97 |
98 | var isFav = isFavorited(path);
99 |
100 | // Create wrapper div
101 | var wrapper = document.createElement('div');
102 | wrapper.className = 'title-with-favorite';
103 |
104 | // Create favorite button
105 | var button = document.createElement('button');
106 | button.type = 'button';
107 | button.className = 'favorite-btn' + (isFav ? ' is-favorited' : '');
108 | button.setAttribute('aria-label', isFav ? 'Remove from favorites' : 'Add to favorites');
109 | button.setAttribute('aria-pressed', isFav ? 'true' : 'false');
110 |
111 | // Create heart span
112 | var heart = document.createElement('span');
113 | heart.className = 'favorite-heart';
114 | heart.setAttribute('aria-hidden', 'true');
115 | button.appendChild(heart);
116 |
117 | // Handle click
118 | button.addEventListener('click', function() {
119 | var newStatus = toggleFavorite(path);
120 | button.className = 'favorite-btn' + (newStatus ? ' is-favorited' : '');
121 | button.setAttribute('aria-label', newStatus ? 'Remove from favorites' : 'Add to favorites');
122 | button.setAttribute('aria-pressed', newStatus ? 'true' : 'false');
123 | updateNavigationHearts();
124 | });
125 |
126 | // Insert wrapper before h1, move h1 into wrapper, add button
127 | h1.parentNode.insertBefore(wrapper, h1);
128 | wrapper.appendChild(h1);
129 | wrapper.appendChild(button);
130 | }
131 |
132 | /**
133 | * Update navigation menu to show hearts for favorited items
134 | */
135 | function updateNavigationHearts() {
136 | var favorites = getFavorites();
137 | var navLinks = document.querySelectorAll('.nav-menu a, .dropdown-menu a, .flyout-menu a');
138 |
139 | for (var i = 0; i < navLinks.length; i++) {
140 | var link = navLinks[i];
141 | var href = normalizePath(link.getAttribute('href'));
142 |
143 | if (favorites.indexOf(href) !== -1) {
144 | link.classList.add('is-favorited');
145 | } else {
146 | link.classList.remove('is-favorited');
147 | }
148 | }
149 | }
150 |
151 | /**
152 | * Initialize favorites functionality
153 | */
154 | function init() {
155 | initFavoriteButton();
156 | updateNavigationHearts();
157 | }
158 |
159 | // Run on DOMContentLoaded
160 | if (document.readyState === 'loading') {
161 | document.addEventListener('DOMContentLoaded', init);
162 | } else {
163 | init();
164 | }
165 | })();
166 |
--------------------------------------------------------------------------------
/docs/assets/js/share.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Share functionality for Home Automation Cookbook
3 | * Uses the Web Share API when available, falls back to copying URL to clipboard
4 | */
5 | (function() {
6 | 'use strict';
7 |
8 | /**
9 | * Check if the Web Share API is supported
10 | */
11 | function isShareSupported() {
12 | return navigator.share !== undefined;
13 | }
14 |
15 | /**
16 | * Copy text to clipboard with fallback for older browsers
17 | */
18 | function copyToClipboard(text) {
19 | if (navigator.clipboard && navigator.clipboard.writeText) {
20 | return navigator.clipboard.writeText(text);
21 | }
22 |
23 | // Fallback for older browsers
24 | var textArea = document.createElement('textarea');
25 | textArea.value = text;
26 | textArea.style.position = 'fixed';
27 | textArea.style.left = '-999999px';
28 | textArea.style.top = '-999999px';
29 | document.body.appendChild(textArea);
30 | textArea.focus();
31 | textArea.select();
32 |
33 | return new Promise(function(resolve, reject) {
34 | try {
35 | var successful = document.execCommand('copy');
36 | if (successful) {
37 | resolve();
38 | } else {
39 | reject(new Error('Copy command failed'));
40 | }
41 | } catch (err) {
42 | reject(err);
43 | } finally {
44 | textArea.remove();
45 | }
46 | });
47 | }
48 |
49 | /**
50 | * Show a brief tooltip/feedback message
51 | */
52 | function showFeedback(button, message) {
53 | var originalText = button.querySelector('.share-text');
54 | if (originalText) {
55 | var originalContent = originalText.textContent;
56 | originalText.textContent = message;
57 | setTimeout(function() {
58 | originalText.textContent = originalContent;
59 | }, 2000);
60 | }
61 | }
62 |
63 | /**
64 | * Handle share button click
65 | */
66 | function handleShareClick(event) {
67 | var button = event.currentTarget;
68 | var title = document.title;
69 | var url = window.location.href;
70 |
71 | // Try to get a description from the page
72 | var metaDescription = document.querySelector('meta[name="description"]');
73 | var text = metaDescription ? metaDescription.getAttribute('content') : '';
74 |
75 | if (isShareSupported()) {
76 | navigator.share({
77 | title: title,
78 | text: text,
79 | url: url
80 | }).catch(function(err) {
81 | // User cancelled or error occurred
82 | if (err.name !== 'AbortError') {
83 | // Fall back to copying URL
84 | copyToClipboard(url).then(function() {
85 | showFeedback(button, 'Link copied!');
86 | });
87 | }
88 | });
89 | } else {
90 | // Fall back to copying URL to clipboard
91 | copyToClipboard(url).then(function() {
92 | showFeedback(button, 'Link copied!');
93 | }).catch(function() {
94 | showFeedback(button, 'Copy failed');
95 | });
96 | }
97 | }
98 |
99 | /**
100 | * Move article meta section to after the title wrapper or h1
101 | */
102 | function moveArticleMetaAfterH1() {
103 | var articleMeta = document.querySelector('.article-meta');
104 | if (!articleMeta) return;
105 |
106 | var mainContent = document.querySelector('.main-content');
107 | if (!mainContent) return;
108 |
109 | // First, check if there's a title-with-favorite wrapper (created by favorites.js)
110 | var titleWrapper = mainContent.querySelector('.title-with-favorite');
111 | if (titleWrapper) {
112 | // Move article meta after the entire title wrapper
113 | titleWrapper.parentNode.insertBefore(articleMeta, titleWrapper.nextSibling);
114 | return;
115 | }
116 |
117 | // Fallback: move after h1 if no title wrapper exists
118 | var h1 = mainContent.querySelector('h1');
119 | if (h1) {
120 | h1.parentNode.insertBefore(articleMeta, h1.nextSibling);
121 | }
122 | }
123 |
124 | /**
125 | * Initialize share buttons in the article meta section
126 | */
127 | function initArticleShareButtons() {
128 | // Find all article share buttons and add click handlers
129 | var articleShareBtns = document.querySelectorAll('.article-share-btn');
130 | for (var i = 0; i < articleShareBtns.length; i++) {
131 | articleShareBtns[i].addEventListener('click', handleShareClick);
132 | }
133 | }
134 |
135 | /**
136 | * Initialize share functionality
137 | */
138 | function init() {
139 | // Initialize share buttons first (always works immediately)
140 | initArticleShareButtons();
141 |
142 | // Try to move article meta now
143 | moveArticleMetaAfterH1();
144 |
145 | // If favorites.js hasn't run yet, the title-with-favorite wrapper won't exist.
146 | // Use MutationObserver to watch for it being added and reposition if needed.
147 | var articleMeta = document.querySelector('.article-meta');
148 | if (articleMeta) {
149 | var mainContent = document.querySelector('.main-content');
150 | if (mainContent) {
151 | var observer = new MutationObserver(function(mutations) {
152 | var titleWrapper = mainContent.querySelector('.title-with-favorite');
153 | if (titleWrapper) {
154 | // Wrapper was added, reposition article meta
155 | moveArticleMetaAfterH1();
156 | observer.disconnect();
157 | }
158 | });
159 | observer.observe(mainContent, { childList: true, subtree: true });
160 |
161 | // Disconnect after a short time to avoid memory leaks if wrapper never appears
162 | setTimeout(function() {
163 | observer.disconnect();
164 | }, 1000);
165 | }
166 | }
167 | }
168 |
169 | // Run on DOMContentLoaded
170 | if (document.readyState === 'loading') {
171 | document.addEventListener('DOMContentLoaded', init);
172 | } else {
173 | init();
174 | }
175 | })();
176 |
--------------------------------------------------------------------------------
/.github/copilot-instructions.md:
--------------------------------------------------------------------------------
1 | # Writing style
2 | - Use sentence case for titles and headings instead of Title Case.
3 | - Don't use em-dashes when writing sentences; use hyphens surrounded by spaces instead.
4 | - Don't use emojis in the text.
5 |
6 | # Site structure
7 | - This is a Jekyll static site for homeautomationcookbook.com
8 | - Main CSS: `docs/assets/css/style.css` (consolidated stylesheet, ~1200 lines)
9 | - Config: `docs/_config.yml` contains navigation structure
10 | - Layout: `docs/_layouts/default.html` is the main template
11 | - Homepage: `docs/index.md`
12 | - Documentation pages: `docs/getting-started/philosophy.md`, `docs/getting-started/tips.md`, `docs/getting-started/resources.md`
13 | - Automation categories: 6 directories under `docs/automation/` (motion, contact, presence, climate, media, appliances)
14 | - Each category has: `index.md` (overview) and individual automation pages
15 |
16 | # Design system
17 | - Color scheme: Slate gray (#2c3e50 primary, #1a252f hover)
18 | - All blue colors (#0066cc) were replaced with slate gray for subtlety
19 | - Cards use: border `#e0e0e0`, hover border `#2c3e50`, shadow `rgba(44,62,80,0.08-0.12)`
20 | - Backgrounds: `#fafafa` for light sections, `#f8f9fa` for cards
21 | - Typography: System fonts, 17px base, line-height 1.8
22 | - Never use bright or saturated colors
23 |
24 | # File editing approach
25 | - Always read files before editing them to understand context
26 | - Use `multi_replace_string_in_file` for multiple changes (never call `replace_string_in_file` multiple times)
27 | - Include 3-5 lines of context before and after target text for uniqueness
28 | - Avoid PowerShell scripts - they cause timeout/cancellation issues; use direct tool calls instead
29 | - For site-wide changes: start with homepage, then category indexes, then detail pages
30 |
31 | # Automation page patterns
32 | All automation detail pages follow this structure:
33 | - Use cases
34 | - Products needed
35 | - Basic automation setup
36 | - Platform-specific examples
37 | - Advanced features
38 | - Troubleshooting
39 | - Best practices
40 |
41 | When creating or updating automation pages, maintain this consistent structure.
42 |
43 | # Navigation
44 | - Main nav in `docs/_includes/navigation.html`
45 | - Config in `docs/_config.yml` under `navigation:` key
46 | - All links use `.html` extension (converted from `/` endings)
47 | - Three-level navigation: main menu → dropdown → flyout
48 | - Mobile uses hamburger menu with nested accordion
49 |
50 | # Common tasks
51 | - **Adding new automation**: Create markdown in appropriate category folder, add to `_config.yml` navigation
52 | - **Sentence case conversion**: Use `multi_replace_string_in_file` with heading patterns like "## Title Case" → "## Sentence case"
53 | - **CSS changes**: Edit consolidated `docs/assets/css/style.css` (do not split files)
54 | - **Color updates**: Search for hex values and replace consistently across entire stylesheet
55 |
56 | # What works well
57 | - Direct tool usage over scripts
58 | - Batch operations with multi_replace_string_in_file
59 | - Reading file structure with `get_projects_in_solution` and `get_files_in_project` first
60 | - Systematic approach: homepage → categories → details
61 | - Most automation pages already follow style guide - verify before assuming work needed
62 |
63 | # Local development - running Jekyll locally
64 | To run the Jekyll site locally for preview and testing:
65 |
66 | ```bash
67 | # From the repository root directory:
68 | cd /home/runner/work/HomeAutomationCookbook/HomeAutomationCookbook
69 |
70 | # Install gems to local vendor directory (avoids permission issues)
71 | bundle config set --local path 'vendor/bundle'
72 | bundle install
73 |
74 | # Run Jekyll server (source is in docs/ subdirectory)
75 | bundle exec jekyll serve --source docs --port 4000 --host 0.0.0.0
76 |
77 | # Site will be available at http://localhost:4000/
78 | ```
79 |
80 | - Use Playwright browser to navigate to `http://localhost:4000/` and take screenshots
81 | - The `vendor/` directory will be created - it's already in `.gitignore`
82 | - If you see "Could not find gem" errors, make sure to run from repo root, not from `docs/`
83 |
84 | # Platform logos
85 | - Located in: `docs/assets/img/logos/`
86 | - Available logos: `alexa.png`, `google.png`, `homeassistant.png`, `homekit.png`, `hubitat.png`, `smartthings.png`
87 | - Use in platform cards with: ``
88 |
89 | # Platform card structure with logos
90 | Use this HTML structure for platform-specific examples:
91 | ```html
92 |
93 |
94 |
95 |
Home Assistant
96 |
97 |
98 |
Step 1
99 |
Step 2
100 |
101 |
102 | ```
103 |
104 | # Automation categories
105 | There are 8 automation categories (not 6):
106 | - `docs/automation/lighting/` - Light automations
107 | - `docs/automation/climate/` - HVAC, fans, blinds
108 | - `docs/automation/security/` - Safety and security
109 | - `docs/automation/appliances/` - Washer, vacuum, coffee maker
110 | - `docs/automation/notifications/` - Alerts and reminders
111 | - `docs/automation/entertainment/` - TV, music, media
112 | - `docs/automation/daily-routines/` - Morning, bedtime, away mode
113 | - `docs/automation/index.md` - Main automation hub page
114 |
115 | # All automation detail pages with platform examples
116 | These files need platform logo updates when modifying platform-specific examples:
117 | - lighting: bathroom-night-light.md, disable-on-door-close.md, lights-off-after-motion.md, lights-on-motion.md, outdoor-night-lights.md, toggle-lights-door.md
118 | - security: away-lights.md, fake-dog-deterrent.md, fire-safety.md, garage-door-notification.md, water-leak-response.md
119 | - climate: air-quality-purifier.md, blinds-sunset-sunrise.md, fan-shower.md, room-heater-maintain-temp.md, thermostat-windows-close.md, thermostat-windows-open.md, window-notifications.md
120 | - appliances: coffee-maker-morning.md, dishwasher-done-notification.md, dryer-done-notification.md, robot-vacuum-auto-start.md, washer-done-notification.md
121 | - notifications: baby-sleep-mode.md, doorbell-notification.md, garbage-day-reminder.md, low-battery-alerts.md, music-controls.md, status-tiles.md, teeth-brushing-reminder.md
122 | - entertainment: music-switch-control.md, shower-music.md, speaker-volume-presets.md, tv-dim-lights.md, welcome-home-music.md
123 | - daily-routines: away-mode.md, bedtime-routine.md, morning-routine.md, unlock-door-arrival.md
--------------------------------------------------------------------------------
/docs/automation/daily-routines/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Daily Routines - Morning, Bedtime, and Away Mode Automations
4 | description: Automate your daily routines with smart home technology. Morning wake-up, bedtime wind-down, away mode, and arrival automations.
5 | keywords: daily routine automation, morning routine, bedtime automation, away mode, home arrival, presence automation, smart home routines
6 | ---
7 |
8 | # Daily routines
9 |
10 | Daily routine automations make your smart home adapt to the rhythm of your life. From gentle morning wake-ups to secure away modes, these automations handle the repetitive tasks so you don't have to think about them.
11 |
12 |
13 |
14 | ## Why automate daily routines?
15 |
16 | **Consistent Experience** - Same great start to every morning
17 |
18 | **Energy Savings** - Automatic away mode reduces heating/cooling costs by 10-15%
19 |
20 | **Enhanced Security** - Home arms itself when everyone leaves
21 |
22 | **Seamless Transitions** - Arrive home to perfect lighting and temperature
23 |
24 | **Reduced Mental Load** - No more "did I remember to..." anxiety
25 |
26 | **Family Coordination** - Routines work for everyone, not just the tech-savvy
27 |
28 |
29 |
30 | ## Essential automations
31 |
32 |
33 |
34 |
35 |
36 | ### Away mode when everyone leaves
37 |
38 | Automatically activate Away Mode when the last person leaves. Includes energy savings, security activation, and verification strategies.
39 |
40 | **Best for:** Energy savings, security, peace of mind
41 |
42 |
71 |
72 | ### Unlock door on arrival
73 |
74 | Automatically unlock your door as you arrive home for truly hands-free entry.
75 |
76 | **Best for:** Hands-full arrivals, convenience
77 |
78 |
236 |
--------------------------------------------------------------------------------
/docs/automation/climate/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Climate automations
4 | description: Control temperature, humidity, and air quality automatically. Smart thermostat, window sensors, fans, and blinds automation.
5 | ---
6 |
7 | # Climate automations
8 |
9 | Controlling your indoor climate for optimal comfort and energy savings is at the core of a smart home. These automations will elevate both your wellbeing and wallet.
10 |
11 |
12 |
13 | ## Why climate automation?
14 |
15 | **Energy Savings** — Save 10-30% on heating and cooling costs
16 |
17 | **Perfect Comfort** — Maintain ideal temperature in every room
18 |
19 | **Smart HVAC Control** — Don't heat/cool the outdoors when windows open
20 |
21 | **Air Quality** — Automatically improve indoor air quality
22 |
23 | **Set and Forget** — Climate adjusts without your input
24 |
25 | **Eco-Friendly** — Reduce energy waste and carbon footprint
26 |
27 |
28 |
29 | ## 🌟 Essential Automations
30 |
31 |
32 |
33 |
34 |
35 | ### Stop thermostat when windows open
36 |
37 | Pause heating or cooling when windows open to save energy and avoid conditioning the outdoors.
38 |
39 | **Best for:** Energy savings, fresh air, nice weather
40 |
41 |
46 |
47 | ### Turn on fan when shower starts
48 |
49 | Automatically turn on the bathroom fan when you start a shower to prevent humidity buildup and mirror fog.
50 |
51 | **Best for:** Bathrooms, preventing mold, air quality
52 |
53 |
58 |
59 | ### Automatic blinds at sunset and sunrise
60 |
61 | Open blinds at sunrise for natural light and close at sunset for privacy and energy efficiency.
62 |
63 | **Best for:** Energy savings, privacy, natural daily rhythm
64 |
65 |
70 |
71 | ### Pause HVAC when window opens
72 |
73 | Automatically pause heating or cooling when a window or patio door opens with a visual blinking light reminder.
74 |
75 | **Best for:** Energy savings, fresh air breaks, visual reminders
76 |
77 |
247 |
--------------------------------------------------------------------------------
/docs/automation/security/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Security and Safety Automations - Smart Home Protection Guide
4 | description: Protect your home and family with smart security automations. Away lighting, fire emergency response, intruder deterrents, and more.
5 | keywords: security automation, smart home security, away lights, fire safety, intruder deterrent, home protection, smart safety
6 | ---
7 |
8 | # Security and safety automations
9 |
10 | A lot of people start their smart home because they want added security. That's typically done by adding camera systems both indoors and outdoors around the house. However, there are plenty of other automations we can add to help secure the house or make us feel safer.
11 |
12 |
13 |
14 | ## Why security automation?
15 |
16 | **Deterrence** — Make your home look occupied when you're away
17 |
18 | **Emergency Response** — Automated actions during fire or break-in
19 |
20 | **Peace of Mind** — Know your home is secure without constant checking
21 |
22 | **Family Safety** — Protect loved ones with automated safety measures
23 |
24 | **Cost Effective** — Many security automations use existing smart devices
25 |
26 | **Always Active** — Security automations work 24/7 without human intervention
27 |
28 |
29 |
30 | ## 🌟 Essential Automations
31 |
32 |
33 |
34 |
35 |
36 | ### Away lights to deter intruders
37 |
38 | Make your home look occupied when you're away with strategic lighting that simulates normal activity.
39 |
40 | **Best for:** Deterring break-ins, package theft prevention
41 |
42 |
59 |
60 | ### Water leak detection and response
61 |
62 | Detect leaks early and respond automatically with alerts, water shutoff, and damage prevention.
63 |
64 | **Best for:** Preventing water damage, protecting your home
65 |
66 |
71 |
72 | ### Garage door left open notification
73 |
74 | Get alerted when your garage door is left open too long with optional auto-close.
75 |
76 | **Best for:** Security, weather protection, peace of mind
77 |
78 |
83 |
84 | ### Stove or oven left on alert
85 |
86 | Get notified when your stove or oven is left on too long to prevent fire hazards.
87 |
88 | **Best for:** Kitchen safety, peace of mind, elderly care
89 |
90 |
95 |
96 | ### Auto-close garage when forgotten
97 |
98 | Automatically close the garage if left open when nobody's home and get a photo confirmation.
99 |
100 | **Best for:** Security, peace of mind, forgetfulness
101 |
102 |
237 |
--------------------------------------------------------------------------------
/docs/automation/appliances/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Appliance automations
4 | description: Get notified when appliances finish their cycles. Washer, dryer, dishwasher, coffee maker, and robot vacuum automations.
5 | ---
6 |
7 | # Appliance automations
8 |
9 | The latest generation of appliances have WiFi connectivity and phone apps. But you may want deeper integration with your smart home, or you may have "dumb" appliances that need creative solutions. Here are ways to automate any appliance.
10 |
11 |
12 |
13 | ## Why appliance automation?
14 |
15 | **Never Forget** — Get notified when washer, dryer, or dishwasher finishes
16 |
17 | **Hands-Free Operation** — Robot vacuum runs automatically when you leave
18 |
19 | **Perfect Timing** — Coffee ready exactly when you wake up
20 |
21 | **Energy Monitoring** — Track power usage of any appliance
22 |
23 | **Smart Scheduling** — Run appliances during off-peak electricity hours
24 |
25 | **Any Appliance** — Even "dumb" appliances become smart with power monitoring
26 |
27 |
28 |
29 | ## 🌟 Essential Automations
30 |
31 |
32 |
33 |
34 |
35 | ### Washer done notification
36 |
37 | Get notified when the washing machine cycle completes so you can transfer clothes to dryer promptly.
38 |
39 | **Best for:** Preventing mildew, laundry efficiency
40 |
41 |
58 |
59 | ### Fridge or freezer door left open alert
60 |
61 | Get notified when your refrigerator or freezer door is left open too long to prevent food spoilage.
62 |
63 | **Best for:** Food safety, energy savings, kids
64 |
65 |
70 |
71 | ### Robot vacuum only when empty
72 |
73 | Start your vacuum only when the house is truly empty and finish before anyone returns.
74 |
75 | **Best for:** Smart scheduling, no disruption
76 |
77 |
247 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Home Automation Cookbook - Practical Smart Home Recipes
4 | description: Transform your house into a truly smart home with tested automation recipes that work for everyone. No technical jargon, just practical solutions.
5 | ---
6 |
7 |
8 |
Make your smart home work for you
9 |
Practical smart home automations that save time, energy, and make everyday life effortless.
10 |
11 |
12 | 💡
13 |
14 | Lights that just work
15 | — Walk into any room and lights turn on automatically
16 |
17 |
18 |
19 | 🌡️
20 |
21 | Perfect temperature
22 | — Never waste energy heating the outdoors
23 |
24 |
25 |
26 | 🏠
27 |
28 | True automation
29 | — Your home adapts to you, not the other way around
30 |
38 |
39 | ## Why this site exists
40 |
41 | **Most smart homes aren't actually smart.** They're full of gadgets that need constant attention, confuse guests, and frustrate family members.
42 |
43 | This cookbook is different. Every automation here follows proven principles:
44 |
45 |
46 |
47 |
Works for everyone
48 |
Your kids, guests, and spouse shouldn't need training. Physical switches still work. Automations feel natural.
49 |
50 |
51 |
Actually saves time
52 |
Each automation eliminates a real daily task. No more checking if doors are locked or wondering if the dryer finished.
53 |
54 |
55 |
Platform agnostic
56 |
Works with all major platforms:
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
Battle-tested
68 |
These aren't theoretical ideas. Every recipe has been refined through real-world use and family feedback.
170 |
--------------------------------------------------------------------------------
/docs/automation/entertainment/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Entertainment Automations - Music and Media Control
4 | description: Control your home entertainment with smart automations. Music playback, TV integration, volume control, and movie mode lighting.
5 | keywords: entertainment automation, smart music, TV automation, media control, smart speakers, movie mode, home theater automation
6 | ---
7 |
8 | # Entertainment automations
9 |
10 | Music and entertainment control automations make your smart home feel more alive and responsive. From automatic shower music to movie mode lighting, these automations enhance your daily routines.
11 |
12 |
13 |
14 | ## Why entertainment automation?
15 |
16 | **Soundtrack Your Life** — Music starts automatically for different activities
17 |
18 | **Perfect Ambiance** — Lights dim automatically when watching movies
19 |
20 | **Morning Motivation** — Shower music plays without touching your phone
21 |
22 | **Welcome Home** — Arrive to music and perfect lighting
23 |
24 | **Physical Control** — Buttons and switches are faster than voice commands
25 |
26 | **Consistent Volume** — No more blasting speakers or quiet audio
27 |
28 |
29 |
30 | ## Essential automations
31 |
32 |
33 |
34 |
35 |
36 | ### Dim lights when TV turns on
37 |
38 | Automatically dim lights for optimal movie watching experience.
39 |
40 | **Best for:** Movie nights, TV viewing, ambiance
41 |
42 |
83 |
84 | ### One-tap pool party mode
85 |
86 | Instantly activate pool party mode with colorful lights, music, and pool cover with a single tap or voice command.
87 |
88 | **Best for:** Backyard entertaining, instant ambiance
89 |
90 |
260 |
--------------------------------------------------------------------------------
/docs/getting-started/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Getting started with home automation
4 | description: Learn how to plan and set up your smart home. Choose the right platform, understand budgets, and discover essential first devices.
5 | ---
6 |
7 | # Getting started with home automation
8 |
9 | This guide will help you plan and set up your first smart home devices. Let's start by thinking through what you want to achieve and how to get there.
10 |
11 | ## Planning your smart home
12 |
13 | Before diving into products and platforms, take time to consider these three key factors:
14 |
15 |
16 |
17 |
🎯
18 |
Your goals
19 |
What do you want to automate?
20 |
21 |
Lighting control
22 |
Climate management
23 |
Security monitoring
24 |
Entertainment systems
25 |
Energy efficiency
26 |
27 |
28 |
29 |
30 |
💰
31 |
Your budget
32 |
Start small and expand over time
33 |
34 |
Entry level: $200-500
35 |
Mid-range: $500-2000
36 |
Advanced: $2000+
37 |
38 |
39 |
40 |
41 |
⚙️
42 |
Technical comfort
43 |
Choose your approach
44 |
45 |
Beginner: Pre-configured solutions
46 |
Intermediate: Platform-based systems
47 |
Advanced: Custom integrations
48 |
49 |
50 |
51 |
52 | ## Choosing your ecosystem
53 |
54 | Once you know what you want to automate and your budget, the next major decision is choosing your smart home platform. Each platform has its strengths - some prioritize privacy and local control, while others focus on ease of use and voice integration. Here are the most popular options:
55 |
56 |
57 |
58 |
59 |
Home Assistant
60 |
Best for: Advanced users, customization
61 |
Pros: Open source, highly flexible, extensive device support
62 |
Cons: Steeper learning curve
63 |
64 |
65 |
66 |
67 |
Hubitat
68 |
Best for: Users wanting local control without complex setup
69 |
Pros: 100% local processing, built-in Z-Wave and Zigbee radios
70 |
Cons: Requires intermediate technical knowledge
71 |
72 |
73 |
74 |
75 |
Apple HomeKit
76 |
Best for: Apple ecosystem users
77 |
Pros: Privacy-focused, seamless iOS integration
78 |
Cons: Limited device compatibility
79 |
80 |
81 |
82 |
83 |
SmartThings
84 |
Best for: Beginners, Samsung users
85 |
Pros: Easy setup, wide device support, supports local execution
86 |
Cons: Some cloud dependency for advanced features
87 |
88 |
89 |
90 |
91 |
Google Home
92 |
Best for: Google ecosystem users
93 |
Pros: Strong voice control, affordable devices
94 |
Cons: Privacy concerns
95 |
96 |
97 |
98 |
99 |
Amazon Alexa
100 |
Best for: Voice control enthusiasts, Amazon ecosystem users
105 |
106 | ## Essential first devices
107 |
108 | Now that you've chosen your platform, it's time to start building your smart home. These four device types form the foundation of most home automation setups and work together to create powerful automations:
109 |
110 |
111 |
112 |
🎙️
113 |
Smart speaker/hub
114 |
Central control point
115 |
116 |
117 |
118 |
💡
119 |
Smart bulbs
120 |
Easy win for beginners
121 |
122 |
123 |
124 |
🔌
125 |
Smart plug
126 |
Make any device smart
127 |
128 |
129 |
130 |
👁️
131 |
Motion sensor
132 |
Enable automation
133 |
134 |
135 |
136 | ## Network requirements
137 |
138 | A reliable network is the backbone of any smart home. Most smart devices connect via WiFi, so ensuring your network can handle the load is critical. Here's what you need to consider:
139 |
140 |
141 |
142 | 📶
143 |
144 | Reliable WiFi
145 |
2.4GHz for most devices
146 |
147 |
148 |
149 |
150 | 📍
151 |
152 | Router placement
153 |
Central location
154 |
155 |
156 |
157 |
158 | 🌐
159 |
160 | Consider mesh WiFi
161 |
For larger homes
162 |
163 |
164 |
165 |
166 | 🔒
167 |
168 | Separate IoT network
169 |
For security (advanced)
170 |
171 |
172 |
173 |
174 | ## Next steps
175 |
176 | You now have a solid foundation for planning your smart home. The journey from here depends on how deep you want to dive:
177 |
178 | - [Explore platforms](/getting-started/choose-the-right-platform.html) in detail
179 | - [Browse device recommendations](/getting-started/device-guide.html)
180 | - [Create your first automation](/automation/)
181 |
182 | ---
183 |
184 | [Continue to choose the right platform →](/getting-started/choose-the-right-platform.html)
185 |
--------------------------------------------------------------------------------
/docs/automation/lighting/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lighting Automations - Smart Home Lighting Guide
4 | description: Master automatic lighting for your smart home. Motion-triggered lights, door-activated lighting, night lights, and outdoor illumination.
5 | keywords: smart lighting automation, motion sensor lights, automatic lighting, door sensor lights, outdoor lights, night light automation
6 | ---
7 |
8 | # Lighting automations
9 |
10 | Lighting is often the first area people automate in their smart home - and for good reason. Automatic lighting creates a magical experience where lights respond to your presence and needs without you ever touching a switch.
11 |
12 |
13 |
14 | ## Why automate lighting?
15 |
16 | **Hands-Free Convenience** - Lights turn on automatically as you enter any room
17 |
18 | **Energy Savings** - Lights turn off when rooms are unoccupied
19 |
20 | **Safety at Night** - Never stumble in the dark with gentle nighttime lighting
21 |
22 | **True Automation** - Works without any input from you
23 |
24 | **Versatile Triggers** - Motion sensors, door sensors, time of day, and more
25 |
26 | **Instant Response** - Modern sensors detect presence in milliseconds
27 |
28 |
29 |
30 | ## Essential automations
31 |
32 |
33 |
34 |
35 |
36 | ### Turn on lights when motion is detected
37 |
38 | The most common and useful automation. Automatically turn on lights when entering a room.
39 |
40 | **Best for:** Bathrooms, hallways, closets, entryways
41 |
42 |
47 |
48 | ### Turn off lights after motion stops
49 |
50 | Complete the cycle by turning lights off when a room is no longer occupied.
51 |
52 | **Best for:** All rooms with motion sensors, energy savings
53 |
54 |
255 |
--------------------------------------------------------------------------------
/docs/automation/daily-routines/morning-routine.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Morning Routine Automation - Wake Up Smart Home
4 | description: Automate your morning routine with lights, coffee, music, and thermostat. Complete guide for morning automation with all major smart home platforms.
5 | keywords: morning routine automation, wake up automation, smart home morning, automatic morning routine, morning lights automation
6 | ---
7 |
8 | # Turn on all lights when you get up in the morning
9 |
10 | Start your day right with an automated morning routine that prepares your home for the day ahead. From gradual lighting to starting the coffee maker, this automation creates a consistent, pleasant wake-up experience.
11 |
12 | ## Use cases
13 |
14 |
15 |
16 |
Trigger Methods
17 |
18 |
Weekday Mornings - Consistent wake-up routine
19 |
Motion-Triggered - Lights when you get out of bed
20 |
Time-Based - Scheduled wake-up time
21 |
22 |
23 |
24 |
Activation Options
25 |
26 |
Voice-Activated - "Good morning" routine
27 |
Button-Triggered - Bedside button press
28 |
29 |
30 |
31 |
32 | ## Products needed
33 |
34 |
35 |
Essential Equipment
36 |
37 |
38 |
39 | Smart Lights
40 |
41 | Throughout house for automated morning routine
42 |
43 |
44 |
45 |
46 |
47 |
48 |
Optional Enhancements
49 |
50 |
51 |
52 | Motion Sensor
53 |
54 | In bedroom or bathroom to detect wake-up
55 |
56 |
57 |
58 |
59 | Smart Button
60 |
61 | Bedside trigger for one-press routine
62 |
63 |
64 |
65 |
66 | Smart Thermostat
67 |
68 | Climate control for comfort
69 |
70 |
71 |
72 |
73 | Smart Plugs
74 |
75 | For coffee maker and other appliances
76 |
77 |
78 |
79 |
80 |
81 | ## Basic automation setup
82 |
83 |
IF time is 6:30 AM on weekdays
84 | THEN turn on bedroom lights to 30%
85 | AND start coffee maker
86 | AND read morning briefing
267 |
--------------------------------------------------------------------------------
/docs/automation/notifications/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Notifications and Alerts - Smart Home Reminders and Dashboards
4 | description: Stay informed with smart notifications, dashboard tiles, and automated reminders. Low battery alerts, doorbell notifications, and family reminders.
5 | keywords: smart home notifications, dashboard alerts, status tiles, low battery alerts, doorbell notification, smart home reminders, family automation
6 | ---
7 |
8 | # Notifications and alerts
9 |
10 | Smart notifications keep you informed without overwhelming you. From dashboard tiles that persist until addressed to proactive battery alerts that prevent automation failures, these automations ensure you never miss important information.
11 |
12 |
13 |
14 | ## Why smart notifications?
15 |
16 | **Persistent Visibility** - Dashboard tiles remind you until tasks are done
17 |
18 | **Proactive Alerts** - Know about issues before they cause problems
19 |
20 | **Whole Household** - Everyone sees the same information on dashboards
21 |
22 | **Reduced Notification Fatigue** - Smart filtering shows only what matters
23 |
24 | **Actionable Information** - Notifications that help you take action
25 |
26 | **Family Coordination** - Reminders that work for everyone
27 |
28 |
29 |
30 | ## Essential automations
31 |
32 |
33 |
34 |
35 |
36 | ### Low battery alerts
37 |
38 | Get notified before device batteries die to maintain reliable automation.
39 |
40 | **Best for:** Preventive maintenance, avoiding automation failures
41 |
42 |
59 |
60 | ### Garbage day reminder
61 |
62 | A weekly reminder tile that lights up when it's time to take out the trash.
63 |
64 | **Best for:** Weekly tasks, recycling day
65 |
66 |
107 |
108 | ### Package delivery detection
109 |
110 | Get notified when packages are delivered to your door without needing a smart doorbell.
111 |
112 | **Best for:** Prevent package theft, working from home
113 |
114 |
119 |
120 | ### Pet feeding reminder
121 |
122 | Never forget to feed your pets with automated feeding reminders and tracking.
123 |
124 | **Best for:** Pet care, household coordination
125 |
126 |
307 |
--------------------------------------------------------------------------------
/docs/automation/notifications/garbage-day-reminder.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Garbage Day Reminder - Dashboard Automation
4 | description: Create a dashboard tile that reminds you to take out the trash. The tile turns red until the task is complete.
5 | keywords: garbage reminder, trash day, dashboard automation, virtual switch, weekly reminder, smart home dashboard
6 | ---
7 |
8 | # Garbage day reminder
9 |
10 | This is a great way to remember to take out the trash before garbage day. The tile on the dashboard lights up red, so you know you have a task to complete. Once you are done, simply click the tile to turn it back green. This indicates you have completed the task.
11 |
12 | ## Use cases
13 |
14 |
15 |
16 |
Weekly reminders
17 |
18 |
Garbage Day - Take out the trash before collection
19 |
Recycling Day - Sort and put out recycling
20 |
Yard Waste - Seasonal collection reminders
21 |
22 |
23 |
24 |
Other scheduled tasks
25 |
26 |
Water Plants - Weekly or bi-weekly reminders
27 |
Pet Care - Medication or grooming reminders
28 |
Filter Changes - HVAC or water filter reminders
29 |
30 |
31 |
32 |
33 | ## Products needed
34 |
35 |
36 |
Essential Equipment
37 |
38 |
39 |
40 | Dashboard
41 |
42 | Wall-mounted tablet or phone dashboard
43 | SharpTools, Home Assistant, Hubitat Dashboard, or ActionTiles
44 |
45 |
46 |
47 |
48 | Virtual Switch or Variable
49 |
50 | Created in your smart home platform to track task status
51 |
52 |
53 |
54 |
55 |
56 | ## Basic automation setup
57 |
58 |
IF it is Wednesday at 6:00 PM
59 | THEN turn on "Garbage Out" virtual switch
60 | (tile turns red on dashboard)
61 |
62 |
63 |
64 |
Triggers
65 |
66 |
Every Wednesday at 6:00 PM (adjust for your garbage day)
67 |
68 |
69 |
70 |
71 |
Conditions
72 |
73 |
None
74 |
75 |
76 |
77 |
78 |
Actions
79 |
80 |
Turn on the virtual switch or variable
81 |
82 |
83 |
84 |
85 | ## Dashboard tile setup
86 |
87 | 1. Create a virtual switch named "Garbage Out"
88 | 2. Add tile to dashboard linked to the virtual switch
89 | 3. Configure tile colors:
90 | - **OFF state (green):** Task completed or not due
91 | - **ON state (red):** Garbage needs to go out
92 | 4. When you complete the task, tap the tile to turn it green
93 |
94 | ## Platform-specific examples
95 |
96 |
182 | Colors
183 | Active = red, Inactive = green
184 |
185 |
186 |
187 |
188 |
189 | ## Advanced features
190 |
191 | ### Calendar integration
192 |
193 | You can take this to a new level if you integrate with the garbage company's service calendar. That way you don't falsely get a reminder on holidays when no garbage is being picked up. Also, if there's a change in schedule due to weather your smart home adapts accordingly.
194 |
195 | **Implementation options:**
196 | - **ICS calendar import:** Many garbage companies provide ICS calendar feeds you can subscribe to
197 | - **Custom integration:** Some regions have community-built integrations (check Home Assistant Community Store)
198 | - **Manual calendar:** Create a Google/Apple calendar with your garbage schedule and check it as a condition
199 | - **API integration:** Some waste management companies offer APIs for service schedules
200 |
201 | ### Multiple bins
202 |
203 | Create separate virtual switches for different collection types:
204 |
205 | - **Trash:** Every week (e.g., Wednesday)
206 | - **Recycling:** Every two weeks or different day
207 | - **Yard Waste:** Seasonal schedule
208 | - **Bulk Pickup:** Monthly or on-demand
209 |
210 | ### Auto-reset
211 |
212 | Reset the reminder automatically after garbage is collected:
213 |
214 | **Triggers:**
215 | - Time is Thursday at 10:00 AM (after collection)
216 |
217 | **Actions:**
218 | - Turn off "Garbage Out" virtual switch
219 |
220 | ## Troubleshooting
221 |
222 | ### Issue: Reminder at wrong time
223 |
224 | **Solutions:**
225 | ✅ Verify your hub's time zone settings
226 | ✅ Check daylight saving time adjustments
227 | ✅ Use local time, not UTC
228 |
229 | ### Issue: Tile doesn't change color
230 |
231 | **Solutions:**
232 | ✅ Verify virtual switch is properly linked to tile
233 | ✅ Check dashboard tile color settings
234 | ✅ Refresh dashboard if using cached view
235 |
236 | ### Issue: Forgot to tap tile after completing task
237 |
238 | **Solutions:**
239 | ✅ Add auto-reset automation as described above
240 | ✅ Use NFC tag at trash cans to automatically complete
241 | ✅ Create voice command: "Alexa, garbage is out"
242 |
243 | ---
244 |
245 | **Related automations:**
246 | - [Status tiles instead of notifications](/automation/notifications/status-tiles.html)
247 | - [Music controls](/automation/notifications/music-controls.html)
248 |
249 |
253 |
--------------------------------------------------------------------------------
/docs/automation/lighting/toggle-lights-door.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Toggle Lights When Door Opens - Contact Sensor Automation
4 | description: Automatically turn on lights when doors open. Complete guide for door sensor lighting automation with examples for closets, rooms, and outdoor areas.
5 | keywords: door sensor automation, contact sensor lights, automatic closet lights, door activated lighting, smart door sensor
6 | ---
7 |
8 | # Toggle lights on/off when door opens
9 |
10 | Automatically turning on lights when doors open is a versatile automation that solves lighting problems in many areas of your home. From closets that never have enough light to garage entries that leave you fumbling in the dark, this automation makes life easier.
11 |
12 | ## Use cases
13 |
14 |
15 |
16 |
Indoor Applications
17 |
18 |
Closets - Illuminate contents automatically
19 |
Pantry - See all shelves clearly
20 |
Linen closet - Find items easily
21 |
Room entry - Automatic lighting
22 |
23 |
24 |
25 |
Outdoor Applications
26 |
27 |
Garage entry - Light up when arriving
28 |
Exterior doors - Porch/patio lights
29 |
Shed/storage - Building illumination
30 |
Gate entry - Pathway lighting
31 |
32 |
33 |
34 |
35 | ## Products needed
36 |
37 |
38 |
Essential Equipment
39 |
40 |
41 |
42 | Contact Sensor
43 |
44 | Popular brands: Aqara, SmartThings, Ring, Wyze
45 | Battery-powered for easy installation • Zigbee/Z-Wave for reliability
46 |
47 |
48 |
49 |
50 | Smart Light Switch or Bulb
51 |
52 | In-wall switch for permanent fixtures • Smart bulbs for flexibility • Dimming capability recommended
53 |
54 |
55 |
56 |
57 |
58 |
59 | 💡 Outdoor Installation Tips
60 |
61 |
Use weather-rated sensors (IP65+)
62 |
Protect with weatherproof enclosures
63 |
Consider temperature range (-20°F to 120°F)
64 |
Use UV-resistant materials
65 |
66 |
67 |
68 | ## Basic automation setup
69 |
70 |
IF closet door opens
71 | THEN turn on closet light to 100%
72 |
73 |
74 |
75 |
Triggers
76 |
77 |
Contact sensor changes to "open"
78 |
Door opens (specific door)
79 |
80 |
81 |
82 |
83 |
Conditions (optional)
84 | Time-based: Only during certain hours
85 | Lux sensor: Only if room is dark
86 | Day vs. Night: Different brightness levels
87 |
258 |
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | # Home Automation Cookbook
2 | # Documentation Jekyll configuration
3 |
4 | # Site settings
5 | title: Home Automation Cookbook
6 | description: >-
7 | A comprehensive guide for home automation enthusiasts.
8 | Learn about smart home devices, automation platforms, and best practices.
9 | baseurl: "" # the subpath of your site, e.g. /blog
10 | url: "https://www.homeautomationcookbook.com" # the base hostname & protocol for your site
11 | repository: madskristensen/HomeAutomationCookbook
12 |
13 | # Analytics - uncomment and add your Google Analytics 4 ID to enable tracking
14 | # google_analytics: G-XXXXXXXXXX
15 |
16 | # Open Graph / Social Sharing (used by jekyll-seo-tag)
17 | # Default image for social sharing when pages don't specify their own
18 | defaults:
19 | - scope:
20 | path: ""
21 | values:
22 | image: https://www.homeautomationcookbook.com/assets/img/hero.jpg
23 |
24 | twitter:
25 | card: summary_large_image
26 | social:
27 | name: Home Automation Cookbook
28 | links:
29 | - https://github.com/madskristensen/HomeAutomationCookbook
30 |
31 | # Author information (for schema.org)
32 | author:
33 | name: Mads Kristensen
34 | twitter: mkristensen
35 |
36 | # Build settings
37 | markdown: kramdown
38 | theme: jekyll-theme-cayman
39 |
40 | kramdown:
41 | input: GFM
42 | syntax_highlighter: rouge
43 |
44 | # Navigation
45 | navigation:
46 | - title: Home
47 | url: /
48 | - title: Getting started
49 | url: /getting-started/
50 | subitems:
51 | - title: Philosophy
52 | url: /getting-started/philosophy.html
53 | - title: Choose the right platform
54 | url: /getting-started/choose-the-right-platform.html
55 | - title: Device guide
56 | url: /getting-started/device-guide.html
57 | - title: Tips and tricks
58 | url: /getting-started/tips.html
59 | - title: Resources
60 | url: /getting-started/resources.html
61 | - title: Automations
62 | url: /automation/index.html
63 | subitems:
64 | - title: Lighting
65 | url: /automation/lighting/index.html
66 | subitems:
67 | - title: Lights on motion
68 | url: /automation/lighting/lights-on-motion.html
69 | - title: Lights off after motion
70 | url: /automation/lighting/lights-off-after-motion.html
71 | - title: Bathroom night light
72 | url: /automation/lighting/bathroom-night-light.html
73 | - title: Toggle lights on door
74 | url: /automation/lighting/toggle-lights-door.html
75 | - title: Disable on door close
76 | url: /automation/lighting/disable-on-door-close.html
77 | - title: Outdoor night lights
78 | url: /automation/lighting/outdoor-night-lights.html
79 | - title: Wake-up lights
80 | url: /automation/lighting/wake-up-lights.html
81 | - title: Driveway welcome wave
82 | url: /automation/lighting/driveway-welcome-wave.html
83 | - title: Daily routines
84 | url: /automation/daily-routines/index.html
85 | subitems:
86 | - title: Away mode
87 | url: /automation/daily-routines/away-mode.html
88 | - title: Unlock door on arrival
89 | url: /automation/daily-routines/unlock-door-arrival.html
90 | - title: Morning routine
91 | url: /automation/daily-routines/morning-routine.html
92 | - title: Bedtime routine
93 | url: /automation/daily-routines/bedtime-routine.html
94 | - title: Bedtime wind-down
95 | url: /automation/daily-routines/bedtime-wind-down.html
96 | - title: Climate and comfort
97 | url: /automation/climate/index.html
98 | subitems:
99 | - title: Thermostat - windows open
100 | url: /automation/climate/thermostat-windows-open.html
101 | - title: Thermostat - windows close
102 | url: /automation/climate/thermostat-windows-close.html
103 | - title: Window notifications
104 | url: /automation/climate/window-notifications.html
105 | - title: Air quality purifier
106 | url: /automation/climate/air-quality-purifier.html
107 | - title: Fan after shower
108 | url: /automation/climate/fan-shower.html
109 | - title: Room heater temp control
110 | url: /automation/climate/room-heater-maintain-temp.html
111 | - title: Blinds at sunset/sunrise
112 | url: /automation/climate/blinds-sunset-sunrise.html
113 | - title: Window HVAC pause
114 | url: /automation/climate/window-hvac-pause.html
115 | - title: Entertainment
116 | url: /automation/entertainment/index.html
117 | subitems:
118 | - title: TV dims lights
119 | url: /automation/entertainment/tv-dim-lights.html
120 | - title: Welcome home music
121 | url: /automation/entertainment/welcome-home-music.html
122 | - title: Shower music
123 | url: /automation/entertainment/shower-music.html
124 | - title: Music switch control
125 | url: /automation/entertainment/music-switch-control.html
126 | - title: Speaker volume presets
127 | url: /automation/entertainment/speaker-volume-presets.html
128 | - title: Pool party mode
129 | url: /automation/entertainment/pool-party-mode.html
130 | - title: Appliances
131 | url: /automation/appliances/index.html
132 | subitems:
133 | - title: Washer done notification
134 | url: /automation/appliances/washer-done-notification.html
135 | - title: Dryer done notification
136 | url: /automation/appliances/dryer-done-notification.html
137 | - title: Dishwasher done alert
138 | url: /automation/appliances/dishwasher-done-notification.html
139 | - title: Coffee maker morning
140 | url: /automation/appliances/coffee-maker-morning.html
141 | - title: Robot vacuum auto start
142 | url: /automation/appliances/robot-vacuum-auto-start.html
143 | - title: Fridge door alert
144 | url: /automation/appliances/fridge-door-alert.html
145 | - title: Vacuum when empty
146 | url: /automation/appliances/vacuum-when-empty.html
147 | - title: Safety and security
148 | url: /automation/security/index.html
149 | subitems:
150 | - title: Away lights
151 | url: /automation/security/away-lights.html
152 | - title: Fire safety response
153 | url: /automation/security/fire-safety.html
154 | - title: Fake dog deterrent
155 | url: /automation/security/fake-dog-deterrent.html
156 | - title: Water leak response
157 | url: /automation/security/water-leak-response.html
158 | - title: Garage door notification
159 | url: /automation/security/garage-door-notification.html
160 | - title: Stove left on alert
161 | url: /automation/security/stove-left-on-alert.html
162 | - title: Garage auto-close
163 | url: /automation/security/garage-auto-close.html
164 | - title: Notifications and alerts
165 | url: /automation/notifications/index.html
166 | subitems:
167 | - title: Low battery alerts
168 | url: /automation/notifications/low-battery-alerts.html
169 | - title: Status tiles
170 | url: /automation/notifications/status-tiles.html
171 | - title: Garbage day reminder
172 | url: /automation/notifications/garbage-day-reminder.html
173 | - title: Doorbell notification
174 | url: /automation/notifications/doorbell-notification.html
175 | - title: Baby sleep mode
176 | url: /automation/notifications/baby-sleep-mode.html
177 | - title: Teeth brushing reminder
178 | url: /automation/notifications/teeth-brushing-reminder.html
179 | - title: Music controls
180 | url: /automation/notifications/music-controls.html
181 | - title: Package delivery alert
182 | url: /automation/notifications/package-delivery-alert.html
183 | - title: Pet feeding reminder
184 | url: /automation/notifications/pet-feeding-reminder.html
185 | - title: Maintenance reminder dashboard
186 | url: /automation/notifications/maintenance-reminder-dashboard.html
187 | - title: FAQ
188 | url: /faq/index.html
189 |
190 | # Plugins
191 | plugins:
192 | - jekyll-feed
193 | - jekyll-seo-tag
194 | - jekyll-sitemap
195 | - jekyll-minifier
196 |
197 | # Minification settings
198 | # Automatically minifies HTML, CSS, and JavaScript during build
199 | jekyll-minifier:
200 | compress_css: true
201 | compress_javascript: true
202 | compress_json: true
203 | compress_html: true
204 | remove_comments: true
205 | remove_intertag_spaces: true
206 | remove_quotes: false
207 | simple_doctype: false
208 | preserve_line_breaks: false
209 |
210 | # Exclude from processing
211 | exclude:
212 | - .sass-cache/
213 | - .jekyll-cache/
214 | - gemfiles/
215 | - Gemfile
216 | - Gemfile.lock
217 | - node_modules/
218 | - vendor/bundle/
219 | - vendor/cache/
220 | - vendor/gems/
221 | - vendor/ruby/
222 |
--------------------------------------------------------------------------------
/docs/automation/notifications/status-tiles.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Status Tiles Instead of Notifications - Dashboard Automation
4 | description: Use dashboard status tiles for persistent reminders instead of phone notifications. See appliance status, door states, and delivery alerts at a glance.
5 | keywords: dashboard tiles, status tiles, smart home dashboard, appliance status, persistent notifications, visual alerts
6 | ---
7 |
8 | # Status tiles instead of notifications
9 |
10 | It's easy to ignore or forget notifications sent to your phone. Also, they don't keep reminding you once you've seen or dismissed them. Status tiles on a dashboard located in a place you often see solves that problem.
11 |
12 | ## Use cases
13 |
14 |
15 |
16 |
Appliance Status
17 |
18 |
Washer Done - Time to put clothes in the dryer
19 |
Dishwasher Clean - Ready to be emptied
20 |
Dryer Done - Clothes ready to fold
21 |
22 |
23 |
24 |
Home Awareness
25 |
26 |
Doors/Windows Open - Know before leaving the house
27 |
Delivery Waiting - Package on porch to bring in
28 |
Robot Vacuum - Scheduled to run, time to tidy up
29 |
30 |
31 |
32 |
33 | ## Products needed
34 |
35 |
36 |
Essential Equipment
37 |
38 |
39 |
40 | Tablet
41 |
42 | Any tablet you prefer (Amazon Fire tablets are an affordable option)
43 | Wall-mounted in high-traffic area
44 |
45 |
46 |
47 |
48 | Dashboard Software
49 |
50 | SharpTools, Home Assistant Lovelace, Hubitat Dashboard, or ActionTiles
51 |
52 |
53 |
54 |
55 | Virtual Switches
56 |
57 | One for each status you want to track
58 |
59 |
60 |
61 |
62 |
63 | ## Basic automation setup
64 |
65 | Any automation where you send a notification, consider using a dashboard tile instead. You can do that by using either a virtual switch or variable.
66 |
67 |
IF washer is done
68 | THEN set "Washer Done" switch ON
69 | (tile shows red until clothes moved)
70 |
71 | IF dryer door opens
72 | THEN set "Washer Done" switch OFF
73 | (tile returns to normal)
74 |
75 |
76 |
77 |
Step 1: Create virtual switch
78 |
79 |
Name it descriptively (e.g., "Washer Needs Attention")
80 |
Add to dashboard with appropriate colors
81 |
82 |
83 |
84 |
85 |
Step 2: Set switch ON when attention needed
86 |
87 |
Trigger from the event that needs attention
88 |
Turn on the virtual switch
89 |
90 |
91 |
92 |
93 |
Step 3: Set switch OFF when resolved
94 |
95 |
Trigger from the resolution action
96 |
Turn off the virtual switch
97 |
98 |
99 |
100 |
101 | ## Status tile examples
102 |
103 | ### Washer/Dryer status
104 |
105 | - Create virtual switch for each appliance
106 | - Turn on when cycle completes (power monitoring)
107 | - Turn off when door opens or manually tapped
108 |
109 | ### Door/Window status
110 |
111 | - Show all open doors/windows
112 | - Glanceable before leaving house
113 | - No action needed - just informational
114 |
115 | ### Delivery status
116 |
117 | - Turn on when package detected on porch (camera or motion sensor)
118 | - Turn off when front door opens (brought in)
119 | - Persistent until addressed
120 |
121 | ### Robot vacuum schedule
122 |
123 | - Show when vacuum will run today
124 | - Reminder to tidy up before it starts
125 | - Countdown to scheduled run
126 |
127 | ## Platform-specific examples
128 |
129 |
130 |
131 |
132 |
133 |
Home Assistant
134 |
135 |
136 |
137 | Setup
138 | Create input_boolean for each status
139 |
140 |
141 | Automation
142 | Toggle based on events
143 |
144 |
145 | Dashboard
146 | Conditional cards in Lovelace with card-mod colors
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
SmartThings
155 |
156 |
157 |
158 | Setup
159 | Create virtual switches for each status
160 |
161 |
162 | Routines
163 | Toggle on events
164 |
165 |
166 | Display
167 | SharpTools with color rules
168 |
286 |
--------------------------------------------------------------------------------
/docs/getting-started/philosophy.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Home automation philosophy
4 | description: Learn the core principles of home automation that work for everyone - reliability, natural behavior adaptation, and graceful failure modes.
5 | ---
6 |
7 | # Home automation philosophy
8 |
9 | The best smart home is one that works seamlessly for everyone, requires no explanation, and continues functioning even when things go wrong. These core principles should guide every automation you create.
10 |
11 |
12 |
13 |
14 |
15 | 👥
16 |
Works for everybody
17 |
18 |
19 |
Home automation must work for all members of the household - kids, adults, elderly parents, and even guests. It should never require people to change their behavior to accommodate the technology. Instead, the automation should intelligently adapt to serve everyone's needs.
20 |
21 |
22 |
Example: automatic lights done wrong
23 |
When I first installed automatic lights in my bathrooms, they worked perfectly for me. However, my wife complained that they didn't work for her at all. The problem? The motion sensor delay. By the time she opened the door and walked in, the lights would just be turning on, which prevented her muscle memory from reaching for the light switch. But once she clicked the switch out of habit, the lights would turn off instead of on.
24 |
25 |
26 |
27 |
The fix
28 |
I relocated the motion sensor to a better position and optimized the automation for faster execution. Now the lights turn on instantly, and nobody's muscle memory causes the lights to turn off inadvertently.
29 |
30 |
31 |
32 | Key takeaway:
33 |
Sometimes only real-world usage will reveal flaws in your automation logic. Be prepared to iterate and improve based on feedback from everyone in your household.
34 |
35 |
36 |
37 |
38 |
39 | 🎯
40 |
Adapts to natural behavior
41 |
42 |
43 |
Home automation systems should improve people's lives by working in ways that follow natural human behavior. It's easy to build automations that work perfectly when people use them the "correct" way, but if that's not how people naturally behave, the automation needs adjustment.
44 |
45 |
46 |
Example: linen closet lights
47 |
I created an automation that turned on the lights when the linen closet door opened and turned them off when it closed. Simple enough, right? It worked great... except for one problem.
48 |
In real life, we often push the door ajar rather than fully closing it. When the door wasn't completely closed, the lights stayed on, making the automation seem broken.
49 |
50 |
51 |
52 |
The fix
53 |
I moved the door sensor from the corner of the door to a location where "almost closed" was recognized by the automation as "closed."
54 |
55 |
56 |
57 | Key takeaway:
58 |
Observe how people actually use your space, not how you think they should use it. Adjust your automations accordingly.
59 |
60 |
61 |
62 |
63 |
64 | 💭
65 |
No further explanation needed
66 |
67 |
68 |
When the smart home works for everybody and adapts to natural behavior, it shouldn't require explanation. However, some advanced automations go beyond discoverable natural behavior and need to be taught.
69 |
70 |
71 |
Hidden features as patterns
72 |
Some smart switches support double-tapping as a trigger. You can't tell a switch has this feature by looking at it, so unless you're taught, you won't know it exists.
73 |
74 |
75 |
76 |
Solution
77 |
Create patterns throughout your house. For example:
78 |
79 |
Double-tap any light switch to turn on/off all lights in that room
80 |
Optionally mark switches with this capability for visual identification
81 |
82 |
Once taught, people can apply the same pattern to any room without further explanation needed.
83 |
84 |
85 |
86 |
87 |
88 | 🛡️
89 |
Resiliency built in
90 |
91 |
92 |
When your internet goes down or the smart home hub fails, the smart home must still be functional. All lights must work from physical switches, door locks must still let you in, and basic functions should continue operating.
93 |
94 |
95 | The smart home must fail gracefully.
96 |
97 |
98 |
99 |
Example: the snowstorm incident
100 |
After a major snowstorm knocked out our internet for several days, I learned this lesson the hard way. The smart home hub still worked, but it could only execute automations that didn't require an internet connection. I couldn't use the app to control anything either.
101 |
Some automations kept running that shouldn't have - like lights turning on in bedrooms in the middle of the night, because the house couldn't put itself into night mode without internet. I had to unplug the hub entirely.
102 |
103 |
104 |
105 |
The fix
106 |
After regaining internet, I made several changes:
107 |
108 |
Ensured all essential automations run locally (no internet required)
109 |
Made non-essential automations fail gracefully
110 |
Added physical switches and buttons to control states and variables
111 |
Created manual overrides for critical automations
112 |
113 |
114 |
115 |
116 |
117 |
118 | 📐
119 |
The automation pyramid
120 |
121 |
122 |
Think of home automation as a pyramid with three levels. Each level requires the one below it and should be completely independent of any levels above it.
123 |
124 |
125 |
126 |
Level 3: extras (top)
127 |
Non-essential automations and features that may require an internet connection. Keep this level as small as possible since these are most likely to break down first.
128 |
Examples:
129 |
130 |
Voice assistant controls (Alexa, Google, Siri)
131 |
Cloud-dependent switches and bulbs
132 |
Remote access and notifications
133 |
Weather-based automations
134 |
Integration with online services
135 |
136 |
137 |
138 |
139 |
Level 2: basic automations (middle)
140 |
Essential automations that should work even when internet is down. These should execute fully locally without dependencies on Level 3.
141 |
Examples:
142 |
143 |
Motion sensor-based lighting
144 |
Door sensor-triggered lights
145 |
Contact sensor automations
146 |
Bathroom fan automations
147 |
Basic thermostat operations
148 |
149 |
Requirement: No internet dependency, all processing done locally by the hub.
150 |
151 |
152 |
153 |
Level 1: core functionality (base)
154 |
The foundation that must always be operational. Only a power outage should disable this level.
155 |
Examples:
156 |
157 |
Physical light switches
158 |
Manual door locks
159 |
Physical thermostat controls
160 |
Manual fan switches
161 |
162 |
Requirement: When the smart home hub and/or internet is down, the home gracefully degrades to a fully functioning "dumb" home.
163 |
164 |
165 |
166 |
167 |
168 |
169 | ✅
170 |
Putting philosophy into practice
171 |
172 |
173 |
174 |
As you build your automations, ask yourself:
175 |
176 |
177 | ✅
178 | Does it work for everyone in my household?
179 |
180 |
181 | ✅
182 | Does it adapt to how people naturally behave?
183 |
184 |
185 | ✅
186 | Can people figure it out without my explanation?
187 |
188 |
189 | ✅
190 | Will it still work if the internet goes down?
191 |
192 |
193 | ✅
194 | Do physical controls still function as expected?
195 |
196 |
197 |
198 |
199 |
200 |
If you can answer "yes" to all five questions, you've created a solid automation that follows these core principles.
201 |
202 |
203 |
204 |
205 |
206 | ---
207 |
208 | [Ready to build automations? →](/automation/)
209 |
210 |
--------------------------------------------------------------------------------
/docs/automation/notifications/music-controls.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Music Controls on Dashboard - Smart Home Automation
4 | description: Control music from your dashboard with favorite stations, volume presets, and now playing display. No more yelling at voice assistants.
5 | keywords: music dashboard, smart home music, dashboard controls, volume presets, music tiles, SharpTools music
6 | ---
7 |
8 | # Music controls
9 |
10 | Controlling the music from a dashboard solves several problems. One is to see the album art, artist, and song name to know more information about the current song playing. This is a topic that comes up all the time, and being able to glance at the dashboard to see the information is super convenient.
11 |
12 | If you're like me, you have a few favorite stations or playlists that you play most of the time. Giving each of them a tile on the dashboard makes it easy to play any of them. The same goes with presets for volume like low, normal, and loud.
13 |
14 | All these controls eliminate the need to yell at Alexa/Google/Siri repeatedly, which is often a cause of frustration.
15 |
16 | ## Use cases
17 |
18 |
19 |
20 |
For the Household
21 |
22 |
One-Tap Music - Start favorite playlists instantly
23 |
Volume Control - Preset levels for different activities
24 |
Now Playing - See what song is playing at a glance
25 |
No Voice Needed - Control without speaking
26 |
27 |
28 |
29 |
For Parties
30 |
31 |
Guest Friendly - Anyone can control music
32 |
Party Playlists - Pre-configured party music
33 |
Volume Presets - Easy adjustment for different phases
34 |
Room Control - Group or ungroup speakers
35 |
36 |
37 |
38 |
39 | ## Products needed
40 |
41 |
42 |
Essential Equipment
43 |
44 |
45 |
46 | Smart Speakers
47 |
48 | Sonos, Amazon Echo, Google Home, HomePod, or any smart speaker system
49 |
50 |
51 |
52 |
53 | Dashboard
54 |
55 | Wall-mounted tablet with SharpTools, Home Assistant, or native dashboard
56 |
57 |
58 |
59 |
60 | Music Service
61 |
62 | Spotify, Apple Music, Amazon Music, or other streaming service
63 |
64 |
65 |
66 |
67 |
68 | ## Dashboard elements for music
69 |
70 | ### Now playing tile
71 |
72 | - Album art display
73 | - Artist and song name
74 | - Play/pause button
75 | - Skip forward/back
76 |
77 | ### Favorite stations/playlists
78 |
79 | - One tile per favorite
80 | - Tap to instantly play
81 | - Examples:
82 | - "Dinner Music" playlist
83 | - "Morning Energy" station
84 | - "Kids Favorites"
85 | - "Party Mix"
86 |
87 | ### Volume presets
88 |
89 | - "Low" (30%) - background music
90 | - "Normal" (50%) - everyday listening
91 | - "Loud" (70%) - party mode
92 | - Eliminates "Alexa, set volume to..." commands
93 |
94 | ### Room/Zone selection
95 |
96 | - Quick switch between rooms
97 | - Group rooms together
98 | - Ungroup for individual control
99 |
100 | ## Basic automation setup
101 |
102 |
IF "Dinner Music" tile tapped
103 | THEN play "Dinner Jazz" playlist on Kitchen speaker
104 | AND set volume to 40%
324 |
--------------------------------------------------------------------------------
/docs/automation/daily-routines/bedtime-routine.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Bedtime Routine Automation - Smart Home Night Mode
4 | description: Automate your bedtime routine with lights off, doors locked, and thermostat adjusted. Complete guide for nighttime smart home automation.
5 | keywords: bedtime routine automation, night mode automation, smart home bedtime, automatic bedtime routine, good night automation
6 | ---
7 |
8 | # Turn on all lights when going to bed
9 |
10 | This automation is a real time-saver that can be customized for more than just bedtime. One command prepares your entire home for sleep.
11 |
12 | ## Use cases
13 |
14 |
15 |
16 |
Trigger Methods
17 |
18 |
Bedtime - Turn off lights throughout house
19 |
Voice Command - "Good night" to Alexa/Google/Siri
20 |
Button Press - Physical bedside button
21 |
22 |
23 |
24 |
Automation Styles
25 |
26 |
One-Button Routine - Single trigger for multiple actions
27 |
Scheduled - Automatic at set time
28 |
29 |
30 |
31 |
32 | ## Products needed
33 |
34 |
35 |
Essential Equipment
36 |
37 |
38 |
39 | Smart Lights
40 |
41 | Throughout house for automation control
42 |
43 |
44 |
45 |
46 |
47 |
48 |
Optional Enhancements
49 |
50 |
51 |
52 | Smart Button
53 |
54 | Bedside trigger for one-press routine
55 |
56 |
57 |
58 |
59 | Smart Locks
60 |
61 | Auto-lock doors at bedtime
62 |
63 |
64 |
65 |
66 | Smart Thermostat
67 |
68 | Temperature adjustment for sleep
69 |
70 |
71 |
72 |
73 |
74 | ## Basic automation setup
75 |
76 |
IF bedtime button pressed (or time is 10:30 PM)
77 | THEN turn off all downstairs lights
78 | AND lock doors
79 | AND set thermostat to sleep mode
352 |
--------------------------------------------------------------------------------
/docs/automation/lighting/disable-on-door-close.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: automation
3 | title: Disable Automations When Door is Closed - Smart Override System
4 | description: Learn how to prevent motion sensor lights from turning off when bathroom or bedroom doors are closed. Complete guide with door sensor override logic.
5 | keywords: disable automation door closed, bathroom door sensor, automation override, door sensor logic, prevent lights turning off
6 | ---
7 |
8 | # Disable automations when door is closed
9 |
10 | Prevent frustration when motion-based lighting turns off while you're sitting still in the bathroom or bedroom. This automation uses a door sensor to intelligently override motion timeout behavior.
11 |
12 |
13 | ⚠️ The Problem: Motion Sensors Can't Detect Stationary People
14 |
15 |
Sitting on toilet
16 |
Taking a shower
17 |
Lying in bed reading
18 |
Working at desk
19 |
Result: Lights turn off unexpectedly, leaving you in the dark
20 |
21 |
22 |
23 |
24 | ✅ The Solution: Door Sensor Override
25 |
26 |
Door closed = Someone is inside, keep lights on
27 |
Door open = Room is empty (after motion timeout), safe to turn off lights
28 |
29 |
30 |
31 | ## Use cases
32 |
33 |
34 |
35 |
Private Spaces
36 |
37 |
Bathroom - People sitting still on toilet or in shower
38 |
Bedroom - Guest room during naps or sleep
39 |
Reading Nook - Sitting still while reading
40 |
41 |
42 |
43 |
Work & Entertainment
44 |
45 |
Home Office - Working at computer without much movement
46 |
Media Room - Watching movies in reclined position
47 |
48 |
49 |
50 |
51 | ## Products needed
52 |
53 |
54 |
Essential Equipment
55 |
56 |
57 |
58 | Contact Sensor
59 |
60 | Mounted on door and frame
61 |
62 |
63 |
64 |
65 | Existing Motion Sensor
66 |
67 | Already installed for lights
68 |
69 |
70 |
71 |
72 | Smart Light
73 |
74 | Switch or bulb
75 |
76 |
77 |
78 |
79 |
80 |
81 | 💻 Platform Requirements
82 |
83 |
Full Support: Home Assistant, SmartThings (with SharpTools), Hubitat, HomeSeer - These platforms support variables or virtual switches needed for this automation
84 |
Limited Support: Alexa, Google Home (use workarounds), Apple HomeKit (requires Homebridge for full functionality)
85 |
86 |
87 |
88 | ## Automation setup
89 |
90 |
91 |
92 |
Scenario 1: Bathroom (Keep Lights On When Door Closed)
93 |
Original automation (problem): Trigger: No motion for 5 minutes → Action: Turn off bathroom light → Issue: Turns off while someone is sitting still inside
94 |
Improved automation (solution):
95 |
96 |
97 |
98 |
Triggers
99 |
100 |
No motion detected for 5 minutes
101 |
102 |
103 |
104 |
105 |
Conditions
106 |
107 |
Door is OPEN (not closed)
108 |
109 |
110 |
111 |
112 |
Actions
113 |
114 |
Turn off bathroom light
115 |
116 |
Logic: Only turn off lights if: (1) No motion detected for 5 minutes AND (2) Door is open (meaning no one is inside)
117 |
118 |
119 |
120 |
Scenario 2: Guest Room (Delay After Entry)
121 |
Prevent lights from turning on automatically when guests are resting:
122 |
123 |
124 |
125 |
Triggers
126 |
127 |
Guest room motion detected
128 |
129 |
130 |
131 |
132 |
Conditions
133 |
134 |
Door has been open for 5+ minutes
135 |
136 |
137 |
138 |
139 |
Actions
140 |
141 |
Turn on guest room light
142 |
143 |
Logic: If guest leaves room and returns within 5 minutes, lights don't turn on automatically. Helpful for naps, early bedtimes, and privacy.
313 |
--------------------------------------------------------------------------------
/docs/getting-started/device-guide.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Device guide
4 | description: Comprehensive guide to choosing smart home devices. Compare motion sensors, smart bulbs, switches, thermostats, and more.
5 | ---
6 |
7 | # Smart devices guide
8 |
9 | Choosing the right smart home devices can feel overwhelming with hundreds of options available. This guide breaks down each device category, explains what to look for, and helps you make informed decisions based on your specific needs and budget.
10 |
11 |
12 |
Before you start
13 |
Start with sensors: Sensors are the foundation of any smart home. They detect what's happening and trigger automations. Without sensors, you're just controlling devices manually through an app.
14 |
Buy compatible devices: Check that devices work with your chosen platform before purchasing. Most manufacturers list compatibility on their packaging.
15 |
Prefer local control: Devices that work locally continue functioning when your internet goes down. Cloud-only devices become useless without connectivity.
16 |
17 |
18 | ## Device categories
19 |
20 |
21 |
22 |
💡
23 |
Lighting
24 |
The most popular entry point for smart homes. Smart lighting provides instant gratification and enables powerful automations.
25 |
26 |
Smart Bulbs - Easy install, no wiring. Best for renters or single fixtures.
27 |
Smart Switches - Controls existing bulbs. Works with any bulb type.
28 |
Smart Dimmers - Adjustable brightness. Perfect for mood lighting.
29 |
Light Strips - Accent and under-cabinet lighting. Great for ambiance.
30 |
31 |
32 |
33 |
34 |
📡
35 |
Sensors
36 |
The eyes and ears of your smart home. Sensors detect changes and trigger automations automatically.
37 |
38 |
Motion Sensors - Detect movement for lighting and security.
39 |
Door/Window Sensors - Know when doors open or close.
40 |
Water Leak Sensors - Protect against flooding damage.
41 |
Temperature/Humidity - Monitor climate in each room.
42 |
43 |
44 |
45 |
46 |
🌡️
47 |
Climate control
48 |
Save energy and improve comfort by automating heating, cooling, and air quality management.
49 |
50 |
Smart Thermostats - Learn your schedule and save energy.
51 |
Smart Fans - Ceiling fan control with scheduling.
52 |
Air Purifiers - Automatic air quality management.
53 |
Smart Vents - Room-by-room temperature control.
54 |
55 |
56 |
57 |
58 |
🔒
59 |
Security
60 |
Protect your home with smart locks, cameras, and monitoring. Get alerts when something unusual happens.
61 |
62 |
Smart Locks - Keyless entry with auto-lock features.
63 |
Video Doorbells - See who's at the door from anywhere.
64 |
Security Cameras - Indoor and outdoor monitoring.
65 |
Alarm Systems - Complete home security solutions.
66 |
67 |
68 |
69 |
70 |
🔌
71 |
Smart plugs
72 |
The easiest way to make any device smart. Plug in lamps, fans, or appliances and control them remotely.
73 |
74 |
WiFi Plugs - Simple setup, no hub required.
75 |
Zigbee Plugs - More reliable, needs hub.
76 |
Power Monitoring - Track energy usage per device.
77 |
Outdoor Plugs - Weather-resistant for exterior use.
78 |
79 |
80 |
81 |
82 |
📺
83 |
Entertainment
84 |
Control your media with voice commands and automation. Integrate TV, music, and streaming into your smart home.
85 |
86 |
Smart Speakers - Voice control and music playback.
87 |
Smart Displays - Visual dashboards and video calls.
133 |
134 | ## Connectivity standards
135 |
136 | Understanding how devices communicate is crucial for building a reliable smart home. Each protocol has trade-offs between ease of setup, reliability, and power consumption.
137 |
138 |
139 |
140 |
WiFi (2.4GHz)
141 |
Best for: Simple setups, renters, small homes
142 |
Connects directly to your router with no hub needed. Easy to set up but can overwhelm networks with many devices. Higher power consumption means smart bulbs need constant power.
143 |
Examples: TP-Link Kasa, Wyze, LIFX
144 |
145 |
146 |
147 |
Zigbee
148 |
Best for: Larger homes, battery devices, reliability
149 |
Low-power mesh network where devices relay signals to each other. Excellent for sensors and switches. Requires a Zigbee hub or coordinator. Very reliable once set up.
150 |
Examples: Philips Hue, Aqara, Ikea Tradfri
151 |
152 |
153 |
154 |
Z-Wave
155 |
Best for: Maximum reliability, no interference
156 |
Operates on a dedicated frequency with no WiFi interference. Mesh network with excellent range. More expensive devices but very reliable. Popular for security and locks.
157 |
Examples: Schlage, Inovelli, Zooz
158 |
159 |
160 |
161 |
Thread / Matter
162 |
Best for: Future-proofing, cross-platform homes
163 |
Thread is a low-power mesh protocol. Matter is an application layer for device interoperability. Both are promising but still maturing. Wait for broader adoption before investing heavily.
Thread is a networking protocol (like WiFi or Zigbee)
172 |
Matter is an application layer that runs over Thread, WiFi, or Ethernet
173 |
Both show promise but ecosystems are still evolving
174 |
We recommend waiting before fully committing to Matter-only devices
175 |
176 |
177 |
178 | ## What to check before buying
179 |
180 | Before purchasing any smart device, run through this checklist to avoid compatibility issues and buyer's remorse.
181 |
182 |
183 |
184 |
1. Platform compatibility
185 |
Does it work with your hub or ecosystem? Check the manufacturer's compatibility list. Look for native integration rather than workarounds.
186 |
187 |
188 |
189 |
2. Local vs. cloud control
190 |
Can the device work without internet? Local control means reliability during outages. Cloud-only devices are vulnerable to service shutdowns.
191 |
192 |
193 |
194 |
3. Power requirements
195 |
Does it need a neutral wire? Battery or hardwired? Check your home's wiring before buying smart switches. Older homes often lack neutral wires.
196 |
197 |
198 |
199 |
4. Physical fit
200 |
Will it fit your existing fixtures? Measure junction box depth for switches. Check bulb size and base type for smart bulbs.
201 |
202 |
203 |
204 |
5. Reviews and reliability
205 |
What do real users say? Look for reviews mentioning long-term reliability, not just initial setup. Check for firmware update history.
206 |
207 |
208 |
209 | ## Budget recommendations
210 |
211 | How much you spend depends on your goals. Start small and expand as you learn what works for your household.
212 |
213 |
214 |
215 |
🌱
216 |
Starter ($200-300)
217 |
Perfect for testing the waters and learning the basics.
218 |
219 |
Smart speaker or hub - Central control point
220 |
2-3 smart bulbs - Start with one room
221 |
1-2 smart plugs - Make lamps smart
222 |
Motion sensor - Enable basic automation
223 |
224 |
225 |
226 |
227 |
🏠
228 |
Mid-range ($500-1000)
229 |
A solid foundation covering most rooms and use cases.
230 |
231 |
Smart thermostat - Biggest energy saver
232 |
Smart lock - Keyless convenience
233 |
Door/window sensors - Security basics
234 |
Smart switches - Replace key light switches
235 |
Video doorbell - See who's visiting
236 |
237 |
238 |
239 |
240 |
🚀
241 |
Advanced ($2000+)
242 |
Whole-home automation with comprehensive coverage.
243 |
244 |
Security cameras - Full property monitoring
245 |
All-room coverage - Sensors and lights everywhere
246 |
In-wall switches - Replace all switches
247 |
Dedicated hub - Home Assistant or Hubitat
248 |
249 |
250 |
251 |
252 | ## Next steps
253 |
254 | Now that you understand smart home devices, you're ready to choose your platform and start building automations.
255 |
256 |