To automate your Airbnb locks with Home Assistant, you install Home Assistant on a small hub at the property, pair a compatible smart lock, then run Staykey on top to turn each booking into a unique guest code that rotates automatically and expires at checkout. The whole setup takes most hosts under an hour, and once it's running you never touch a lock code by hand again.
Home Assistant is the free, open-source automation platform that does the heavy lifting locally on hardware you own. Staykey is the layer on top that connects it to your booking calendar and gives guests a single link to their code — so you get local-first reliability without scripting the per-stay logic yourself.
What hardware do I need?
You need two things: an always-on hub to run Home Assistant, and a smart lock it can talk to. Home Assistant runs comfortably on inexpensive hardware, and Staykey sits on top of whichever hub you choose.
| Component | Options | Notes |
|---|---|---|
| Hub | Raspberry Pi, Home Assistant Green, or a mini PC | One-time hardware cost; runs Home Assistant locally on-property |
| Smart lock | Z-Wave, Zigbee, Matter, or most Wi-Fi locks | If you already own a smart lock, there's a good chance it works |
| Radio (if needed) | Z-Wave/Zigbee USB stick | Only required for Z-Wave/Zigbee locks; Matter and Wi-Fi locks may not need one |
| Network | Existing property Wi-Fi/router | The hub stays on the property's local network |
You don't need a separate hub per lock — one Home Assistant hub manages every lock and device at the property, and Staykey's flat per-property pricing ($15/mo Host, $25/mo ProHost) means adding more devices doesn't change your bill. If you're choosing hardware from scratch, our hardware planner walks you through compatible locks and hubs.
How do I install Home Assistant on a hub?
Pick your hub and flash Home Assistant onto it. Home Assistant Green is the most plug-and-play option — it ships ready to run. A Raspberry Pi or mini PC works just as well; you write the Home Assistant OS image to storage, boot it on your property network, and complete the onboarding wizard in a browser.
Once Home Assistant is online, it lives on your local network at the property. This is the foundation of the local-first model: the brain of your access system is a device you own, sitting in the building, not a cloud account you rent. For the reasoning behind that choice, see why we built Staykey on Home Assistant.
How do I pair my smart lock?
In Home Assistant, add the integration that matches your lock's radio — Z-Wave, Zigbee, or Matter — then put the lock into pairing mode and let Home Assistant discover it. Most of this is point-and-click in the Home Assistant UI; you generally don't need to edit configuration files.
Once paired, confirm two things work:
- Lock and unlock the deadbolt from the Home Assistant dashboard.
- Code management — that Home Assistant can add and remove a guest PIN on the lock.
If both work, your lock is ready for per-stay automation. If you're still picking a lock, check that it appears in our integrations directory and meets the basics in Airbnb smart lock requirements before you buy.
How do codes rotate automatically?
This is where Staykey takes over. You connect Staykey to your Home Assistant hub, then sync your Airbnb or VRBO iCal feed. From there, Staykey is calendar-native: every booking on that calendar becomes an instruction to your lock.
- At check-in time, Staykey programs a unique code onto the lock for that specific guest.
- For the whole stay, the guest reaches their code through a single portal link — no app to download, no account to create.
- At checkout, the code expires and is removed, so no old code keeps working.
You set this up once. After that, new bookings, changed dates, and cancellations flow through automatically because they all originate from the same calendar feed you already keep up to date. You're not entering codes by hand or remembering to revoke them — the booking is the automation.
What happens during an internet outage?
Nothing breaks for the guest. This is the single biggest reason hosts choose a Home Assistant-based setup over a cloud-only lock app.
Because Home Assistant runs locally, the guest's code is already stored on the lock and the automations execute on the hub inside the property. The decision to honor a valid code is made on local hardware, not by a server across the internet. So if the property's Wi-Fi drops, or a vendor's cloud has an incident, with a local-radio lock a guest with a valid code still walks in. The cloud is used to sync bookings and manage the experience — it is not a gatekeeper standing between the guest and the door. That's the local-first advantage, covered in depth in local-first smart home for vacation rentals.
Can I do this without writing YAML?
Yes — and most hosts do. Two things make that possible:
- Home Assistant's UI handles installation and lock pairing through wizards and menus. Editing
configuration.yamlby hand is optional, not required, for a basic lock setup. - Staykey handles the booking logic. The genuinely fiddly part of a DIY setup — parsing iCal feeds, scripting code creation at the right offset, cleaning up stragglers, handling cancellations — is exactly what Staykey maintains for you.
If you enjoy hand-rolling automations, you can; Home Assistant is fully open. But if you'd rather not, you don't have to. We lay out that build-vs-buy decision honestly in Staykey vs DIY Home Assistant.
How do I verify it's working?
Before a real guest arrives, run a test booking. Create a short reservation on your connected calendar (or use a test entry), then confirm the full chain:
- A unique code is generated for that booking.
- The code is delivered through the guest portal link.
- The lock accepts the code at the door.
- The code expires at checkout and no longer opens the lock.
When that round-trip works end to end, you're done — every future booking follows the same path with no further input from you.
Put it on autopilot
Automating Airbnb locks with Home Assistant gives you the best of both worlds: an open, local-first system you own, plus per-stay codes that manage themselves. Staykey is the layer that connects your hub to your calendar and your guests — and you can try it on your existing hardware with a free 30-day trial, cancel anytime, no surprise charges. Point Staykey at your locks and a calendar, watch a real code program onto the door, then start your trial when you're convinced.