Skip to content

klinquist/airbnbScheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airbnb/Houfy Lock Coder for Hubitat

This script programs a lock code & sets a mode on a Hubitat hub based on reservation calendars (Airbnb + Houfy) and manual visits.

This runs on a raspberry pi in my house on the same network as the Hubitat.

Features (high level)

  • Polls Airbnb and/or Houfy iCal feeds and schedules check-in / check-out actions
  • Optional “Arriving soon” action (time + day offset) for pre-arrival automation
  • Web UI for viewing upcoming items, setting configuration, and managing manual visits
  • Manual visits support (useful for direct bookings / friends & family)
  • Late check-out scheduling for an active reservation from the UI

Installation & Usage

  • Install the Hubitat app 'Maker API'. Make sure you give it access to your locks and modes, and make note of the hub's IP address and access token it provides.
  • Git clone this repo to a folder
  • Enter that folder and run npm install
  • Edit the config/default.json to fit your needs. Generate a pushover.net app & user token for push notifications.
    • Set ical_url to your Airbnb iCal URL
    • Optionally set houfy_ical_url to your Houfy iCal URL
  • Run npm start
  • Open the web UI at http://localhost:3000 (or the port in your config file)

Running with a specific config file

This project uses the config/ folder. To use config/motoretreat.json, run:

NODE_ENV=motoretreat npm start

Web UI (local server)

The web UI lets you:

  • View all upcoming items (Airbnb, Houfy, and Manual) in one list
  • Refresh calendars on-demand
  • Edit configuration (iCal URLs, schedule times, modes, Hubitat settings, Pushover)
  • Add manual visits using check-in/check-out dates (auto-populates actions using configured times; you can adjust/remove actions before saving)
  • Schedule a late check-out for an active reservation

Houfy iCal notes

  • The Houfy reservation ID is extracted from the “Reservation URL” in the event description.
  • Lock codes require a “Phone Number (Last 4 Digits)” value in the iCal description; if it’s missing the event will be skipped.

There are three new optional keys that may not be obvious. If you want to set an "arriving soon" mode, you can use these keys. The first is the time the mode will be enabled, the second is the offset from the check-in day.

I use this to turn on my water heater. I want to make sure guests have hot water when they arrive, so I need to turn it on prior to coding the lock and putting the home into "home" mode. So I have an "arriving soon" mode that turns on the water heater at 1:00AM on the day of arrival.

If you want this to run a day before arrival, set arrivingSoonDayOffset to -1

    "arrivingSoonTime": "1:00 AM" //
    "arrivingSoonDayOffset": 0,
    "arriving_soon_mode":"ArrivingSoon", //what mode to enable

I recommend using a node process manager like pm2 to run it on startup.

Differences between durability of this vs RBoy's Rental Lock Automator

Hopefully, most of us chose Hubitat because it doesn't require internet access! RBoy's app could fail to program your lock if the internet is down at check-in time. That said, RBoy's app has excellent retry mechanisms in place that I have not evaluated. Currently, I program the lock, ask to refresh its status, then see if the code is present. If not, I retry a few times.

I always recommend putting a backup code into the lock in one of its permanent slots. That way, if a guest calls you and says their code is not working, you can always provide that backup code for their stay - then just change it afterwards.

Changelog

  • 0.1.10: Fix crash when no schedules are found
  • 0.1.9: Do not bail if lock 1 of x fails programming. Keep programming the rest.
  • 0.1.8: Also send notifications for new schedules found (not part of initial startup)
  • 0.1.6: Bug related to checking if a date is in the past when it occurs today
  • 0.0.5: Another quick bug fix related to the same as below.
  • 0.0.4: Fix to removing deleted schedules over and over again
  • 0.1.3: Added support for "arriving soon" actions.
  • 0.1.2: Option to run check-out actions immediately if a reservation is canceled mid-stay.
  • 0.1.1: Fix for removing lock codes
  • 0.1.0: Initial commits

License

The MIT License (MIT)

Copyright (c) 2023 Kristopher Linquist

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Code locks connected to your Hubitat Hub at airbnb checkin/checkout times.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published