Version 2.6 Available
Hello everyone! I'm excited to share a project I've been working on to completely overhaul how smart homes handle text-to-speech, perimeter guarding, and occupancy.
While the actual speech synthesis depends on your specific speaker integration (and may utilize the cloud for audio generation), the orchestration, logic, and state-tracking of this application are built from the ground up for 100% local processing. Advanced Voice Butler acts as a highly intelligent, decoupled director. It processes your complex rules locally without relying on cloud-dependent architectures to decide when or what to speak. It understands context, room states, time of day, and who is actually home.
Here is the complete breakdown of what this application brings to your hub.
Core Architecture & System Control
- Multi-Tier Audio Routing Engine: Can target audio to Global Indoor, Outdoor, specific Follow-Me (active motion only), Dedicated Feature speakers, or any combination of fallbacks.
- Live Hubitat Dashboard UI: Real-time read-only view of system states (Muted/Silent/Active), perimeter status (Hosting/DND/Standby), internet connection, TTS queue, external sync timestamps, incident logs, and a live house roster.
- Priority TTS Queue Engine: Messages are queued and played sequentially so they don't overlap. High-priority alerts bypass the queue. Features a Time-To-Live (TTL) expiration so stale messages drop automatically.
- Internet Connection Safety: Pings Google every 5 minutes. If the internet drops, it suppresses TTS to prevent the system from crashing or hanging.
- Master & Guest Mutes: Hard mute switches for the entire system, plus a "Guest Mode" switch that silences specific sensitive alerts.
- Quiet Hours Engine: User-defined start/end times that automatically throttle the maximum volume of all Butler announcements overnight.
- Media Pause & Resume: Automatically pauses specific TVs (Roku, etc.) or music players, plays the announcement with a configurable hardware warm-up delay and pre-speech chime, and seamlessly resumes media playback afterward.
The Interactive Web Portal (Command Deck)
- Live Presence Management: View who is home and manually override/mark users "Away" with a single click.
- Live Intercom (PA): Type any message and instantly broadcast it to a specific routing zone.
- Task Dashboard Shortcut: A one-click button that bridges the user straight to their Hubitat maintenance dashboard.
- Quick Replies: Up to 6 custom buttons that instantly broadcast pre-written responses to the outdoor speaker (e.g., "Leave the package," "Be right there") and immediately cancel any automated "unanswered door" follow-ups.
- Scheduled Notes: Write a note, assign a sender and a target user, and trigger it to deliver on Arrival, during the Morning Briefing, or at a specific Time.
- Guest Wi-Fi Announce: A 1-click button that dynamically parses the Wi-Fi password to be TTS-safe, announces it over the speakers, and pushes the raw text to smartphones.
- Estate Directory: A digital Rolodex of up to 10 services (e.g., Plumber, Pediatrician). Clicking "Announce" reads their info aloud and pushes it to your phone.
- Agenda Memory Updater: Web form to instantly overwrite the daily agenda memory for any specific room.
Smart Arrival & Roster Logic
- Lock Code & Presence Hybrid: Tracks arrivals automatically via Smart Lock codes or manual user slots. Includes a Fallback Engine: if a presence sensor arrives but the door isn't unlocked within 10 minutes, the Butler automatically marks them home and apologizes for missing them.
- Hourly Presence Sweep: A failsafe that checks all presence sensors every hour to catch anyone who slipped in unannounced.
- Contextual Greetings: Adjusts phrasing based on the time of day (Morning/Afternoon/Evening) and duration away (e.g., "A quick trip" vs. "I hope you had a productive day").
- Extended Absence: Specific "Welcome back from vacation" greetings if the user has been gone for more than a user-defined threshold (e.g., 48 hours).
- House Roster Awareness: Announces if the user is the first one home ("The house is empty") or specifically names who is already inside.
- Arrival Add-ons: * Reads pending notes or stashed "Message Inbox" items.
- Reminds users if the physical mail was delivered and hasn't been picked up.
- Appends Birthday and Anniversary greetings.
- After-School specific greetings based on a time window.
- Global Incident readout (warns if the doorbell rang while the house was empty).
Contextual Departures & Habit Tracking
- Departure Profiles: Up to 5 specific profiles (Work, School, General) that trigger when the door opens during a specific time window, provided their context switch is ON (and Sick Day switch is OFF).
- Coat Check & Weather: Appends dynamic weather warnings to departures (Umbrella needed, Freezing temps, Snow/Ice, High Heat).
- Quick Exit (Farewell & Gas Scout): If the house goes into "Away" mode and a door opens within 5 minutes, it bids farewell, checks Google Maps for the cheapest gas, announces the station, and sends a navigation link to your phone.
- AI Habit Tracking Engine: Learns every user's average departure, arrival, and sleep times.
- Anomaly Detection: If a user is still home 15 minutes past their learned average departure time, the Butler proactively asks if they are running behind schedule.
Perimeter Guarding & Security
- Daytime Doorbell: Acknowledges visitors ("Notifying the homeowner"). If the door isn't opened within a specific delay, it executes a follow-up ("Apologies, no one is available"). Suppressed if the house roster is empty.
- Do Not Disturb (DND) & After Hours: Intercepts visitors, suppresses indoor chimes, and tells the visitor to leave a package/message because the house is resting or DND is active.
- Guest / Party Mode: A virtual switch that safely overrides DND and After Hours to welcome expected guests inside.
- Nighttime Intruder Deterrent: * Generic Motion: Warns trespassers they are on camera. Features a bypass timer for taking the dog out.
- Smart Camera Integration (UniFi Protect): Differentiates between Animals ("Shoo!"), Vehicles ("License plate logged"), and Persons ("Security notified").
- Package Concierge: Detects packages, thanks the driver outside, and announces the delivery inside.
Local Voice Zones (Room Routines)
- Good Night Routine:
- Triggered by switch.
- Kids Weekend check (Announces "No school tomorrow!" on Friday/Saturday).
- Perimeter Security Check (Warns of exactly which doors are open or unlocked).
- Weather forecast.
- Calendar Preview (Heads up on tomorrow's first event).
- Kids Night Watch (Activates "Monster Shields").
- Sleep Habit Inference (Remarks if you are going to bed unusually early or late based on learned habits).
- Good Morning Routine:
- Triggered immediately, via motion verification, or purely motion-driven.
- Time, Date, and Day-specific Agenda.
- Overnight Incident Report (How many times the porch motion tripped or doorbell rang).
- Weather and Wardrobe advice.
- Boredom Buster (Weekend activity suggestions).
- Room-specific RSS News fetcher.
- Kids Jokes/Fun Facts.
- Stashed Inbox and Pending Notes delivery.
The Concierge (External Integrations)
- Google Calendar & Travel Engine: * Syncs via .ics polling or instantaneous Webhooks.
- Proactive Travel Check: 1 hour before an event, it calculates drive time using Google Maps API. If traffic requires you to leave now to make it, it issues a "CRITICAL" override warning, finds the cheapest gas, and pushes it to your phone.
- Context Secrecy: Hides event details if the event implies a surprise/gift/party AND the target user is currently marked as "Home."
- Google Mail / Ooma Webhook:
- Announces and reads snippets of important VIP emails.
- Announces package shipment/out-for-delivery notifications.
- Reads transcripts of incoming Ooma voicemails.
- Organic Breaking News: Polls an RSS feed (like NPR) on a randomized, jittered interval. If a brand-new headline appears, it interrupts to announce it.
- Office Interceptor: A switch-triggered tech news readout (TechCrunch, Wired, etc.) with a configurable multi-hour cooldown to prevent spamming.
Household Management & Routines
- Meal Time (Dinner Bell): * Triggered by switch or physical button (button isolates routing to active rooms only).
- Part 1: Rings dinner bell and checks the Roster, announcing anyone who is missing/absent.
- Part 2: Evening Weather and Top News digest.
- Part 3: Daily Conversation Starter (from custom text file or defaults).
- Headed Home Engine: Virtual switches tied to Google Home/Alexa driving routines. Announces "[User] is on their way home."
- Midday Maintenance: Picks a completely random time between 11 AM and 3 PM to politely read overdue Hubitat tasks. Suppresses itself if the house is empty or guests are present. Esculates its grammar based on how many days overdue tasks are.
- Real-Time Task Alerts: Instantly announces the exact moment a task flips to "due."
- Health & Wellness Concierge: Tracks Dental (6mo), Medical (1yr), and Vision (1yr) thresholds. Groups users dynamically ("Shane and Christy, both of you require..."). Built-in 7-day memory cooldown so it only nags once a week during the morning briefing or the daytime window.
- Screen Time Manager: Reads expiration warnings when a virtual screen-time switch turns off.
The "Silver Platter" (Message Inbox)
The Silver Platter feature solves a classic smart home problem: what happens when an important alert triggers, but nobody is home to hear it?
Instead of the Butler shouting to an empty room, the Silver Platter acts as a temporary holding queue (inbox).
- How it triggers: If the Google Webhook receives a package delivery notification, a new Ooma voicemail, or a VIP email, it first checks the house roster.
- The Stash: If the roster returns
0(the house is completely empty), the Butler suppresses the audio and sends the text tostashMessage(). - The Delivery: The next time a recognized user unlocks the front door and triggers the Arrival routine—or during the next Morning Briefing—the Butler retrieves the stashed messages. It seamlessly appends them to the greeting: "Welcome home, Shane. By the way, while you were out, a package was delivered to the house, and you received a voicemail from John Doe."
Guest Mode & Guest Context
The Butler has two different layers of "Guest" awareness so it knows how to behave properly when you are hosting company.
1. The Guest Mode Mute Switch (Hard Silence) In your Global System Control settings, you can assign a "Guest Mode Mute Switch."
- When this virtual switch is turned ON, the system shifts into
SILENTmode. - This intercepts the core TTS (Text-to-Speech) engine. It actively suppresses automated announcements so the Butler doesn't interrupt your conversations, startle your visitors, or announce something private while you are entertaining.
2. Guest User Context (Smart Filtering) In the Arrival & Smart Locks section, you can specifically designate lock codes or custom names as "Guest Users". The Butler changes its behavioral logic when these specific people are logged as being inside the house:
- Anti-Nagging: If the system is scheduled to run a "Midday Maintenance" reminder (telling you that you have overdue household chores), it checks the active roster. If a recognized Guest is in the house, it permanently aborts the reminder for the day to avoid embarrassing you in front of company.
- Meal Time Roll Call: If you use the Absentee Roll Call feature during Dinner, it usually announces who hasn't made it home yet. It will automatically filter out "Guest" names from this list, so it doesn't complain that your occasional visitor isn't at the table.
Generative AI "Scout" Intelligence
- Cinema & Streaming Scout (Friday Premieres): Every Friday, the Butler uses Gemini to browse live theatrical releases and Netflix arrivals. It generates a summary of the top trending movies, family night options, and kid-friendly picks to kick off the weekend.
- Grocery Day Scout (Weekly Ad Tracker): Automatically scans live weekly circulars for Aldi, Publix, Walmart, and Costco. It filters for user-defined preferences (e.g., BOGOs, Meats, Organic Produce) and announces the deal count while pushing the full itemized list to smartphones.
- Vehicle Care Scout (AI Car Wash Planner): On Mondays, the Butler analyzes the 7-day forecast via Gemini to identify the single best window for washing vehicles (low precipitation risk for consecutive days). It announces this during the morning briefing and follows up at noon on the designated day.
- Ask the Butler (LLM Portal Chat): A generative AI interface built into the Web Portal. Users can chat with the Butler via text; it uses live house context (who is home, next calendar event, mail status) to answer questions with its professional British persona.
The "Manager of Managers" (Cross-App Telemetry)
- Staff Schedule Synchronizer: Automatically receives data from a separate Vacuum/Cleaning app. It calculates "Days since last clean" and displays the staff status on the portal (e.g., "Standby" vs. "Deploying Imminently") to maintain the illusion that the Butler is managing the cleaning crew.
- Cross-App Dispatch Interceptor: A specialized receiver for messages from other applications (like the Vacuum Controller). If the vacuum encounters an error, the Butler intercepts the technical alert, checks the house roster and DND status, and either "stashes" the message for later or announces it in a polite, persona-appropriate way.
Digital Concierge & Temporary Access
- RSVP Invitation System: Allows the user to generate digital event invitations (e.g., for a dinner party) via the portal. The system provides a shareable URL for guests to accept/decline, set party size, and list dietary restrictions.
- Temporary PIN Sync: When a hosted event is created, the Butler automatically pushes a temporary PIN code and a specific door-slot assignment to the Smart Lock Manager.
- Automated Access Revocation: The system monitors the expiration of event-based and guest-based PIN codes, triggering a cleanup routine at midnight to ensure temporary codes are revoked 24 hours after an event concludes.
- Quick Lock Code Manager: A web-based tool to generate one-off PIN codes for service workers (dog walkers, plumbers) with selectable durations (1 hour to 7 days). It includes a "Text Code to Guest" feature that pre-writes the SMS instructions.
Advanced Presence Fallbacks
- Sustained Room Motion (The "School Arrival" Logic): A specialized fallback engine for users (like kids) who might slip in through a different door. If motion is detected in a specific room for a sustained period (e.g., 5 minutes) during a set time window, the Butler marks them as "Arrived" and cues their arrival briefing in that specific room.
- Proactive Guest Eviction Timer: A portal-based timer for visitors. When the timer expires, the Butler delivers a polite, persona-driven "closing procedure" announcement to signal the end of the visit and the transition back to private family time.
Persona & Speech UX (The "Professional Polish")
- Modular Speech Bridges: A transition engine that adds natural phrasing between briefing blocks (e.g., "Turning to the weather," "Moving on to the news," or "One other thing").
- The Grammar Polisher: A regex-based post-processor that cleans up AI-generated or modular text before it hits the speakers, stripping out double-punctuation, fixing spacing, and replacing technical characters (like
&) with spoken equivalents (and) to ensure the Butler never sounds robotic. - Doorbell "Thank You" logic: When a package is detected via UniFi Protect, the Butler doesn't just alert the inside; it can speak directly to the delivery driver via the outdoor speaker, thanking them and instructing them where to leave the parcel.
- Automatic "Momentary" Reset: All virtual switches used to trigger the Butler (Headed Home, Directory, News) are automatically turned back OFF by the Butler after execution, ensuring they are always ready for the next trigger.
Help Files:
Hubitat_Apps/Advanced_Voice_Butler at main · ShaneAllen334/Hubitat_Apps






