I’m curious, has anyone used this to set a smart lock to the last 4 digits of the guests phone number? I am currently doing this manually and it would be neat to automate it.
Would be very easy to extract it from the calendar attributes, but airbnb are making a few changes in December which essentially make this thread useless (they’re not including details in synced calendars).
Bummer, it looks like there is an Airbnb API, but right now it’s not publicly available. I’m on a plane flying home from Hawaii right now and the wifi isn’t the best to do detailed searching with
An Airbnb integration would be really great to have.
Can you explain how you made this “card”
I’m planning to rent out my flat via Airbnb, I would love to be able to give access to guests to HA, by automatically generating for them credentials based on their bookings, anyone that has done something similar already? Any idea/suggestion?
@s.rodighiero I currently do this with a property but I do it with SmartThings using the RBoy Rental Control app.
I’m working on building out an integration for HA, as I’m trying to get completely off of SmartThings, that will leverage the KeyMaster integration for the lock control. The real missing piece of this puzzle is the calendar control with default check-in / check-out times that are also overridable.
I haven’t had a lot of time to work on it yet, but have already validated the calendar acquisition and modification (AirBnB doesn’t put in/out times in their entries so they have to be modified upon ingest). That was just some side scripting though. I need to make it a full fledged integration!
Thanks for your reply, sounds interesting. Today I changed my flat lock with a brand new one supporting european cylinder, than internally I plan to attach a “AIRBNK” lock (model 521), that supports wifi/tuya/zigbee. I run hassio on a pi installed inside the electrical cabinet of the apartment, I’m waiting to receive the lock and the usb zigbee gw. I went for a zigbee lock because the zigbee integration supports locks, while tuya does not.
As I said, I would love to give them HA access to let autonomously manage the access, but at the same time let the user (or at least the password) expires within the checkout. Another “issue” is that at the present time, HA has not a users/group permissions feature yet.
Ah, you mention zigbee. At present KeyMaster (which my integration will depend on) doesn’t support zigbee locks. There’s an open feature request from some folks to get ZHA support in, but it’s pending a PR with support.
I see. Well, let’s see If I would be able to do something without, I’ll let you know if I found anything interesting to integrate with/to Airbnb
Quick update: I had to discard the AIRBNK lock as I discovered that the zigbee integration on Tuya devices is in some way “crypted” by Tuya, and works only with Tuya gw: I purchased as well a Tuya usb zigbee gw, but is not recognized as valid zigbee gw by HA.
After few researches I ended up buying a Danalock V3 BT Z-Wave, that apparently looks like the best solution (at least for me), and being a Z-Wave device I will be able to manage it via Keymaster (thank you for the suggestion).
I’ve been able to import Airbnb calendar via Google calendar, and display it nicely on a card, next step is to test a reservation, and see if there is a way to change “guest” user password using some information from the guest.
I keep failing to find the time to write the integration that I think will make this all come together.
My current intent is to fork the iCal Sensor integration and make adjustments to it to do the following:
Only poll AirBnB every 2 hours. I remember seeing somewhere that they’ll ban / block if you’re too aggressive on your polling and currently the iCal Sensor plugins refreshes the calendar on every refresh cycle (roughly every 30 seconds!)
Add options for default check-in and check-out times
Add options for what starting slot and number of slots to be used on the lock. That way you can have some permanent codes not managed by the calendar
Make it aware enough of the managed slots so that if you change the start / stop time of a code slot it properly tracks that instead of resetting to the default ones
As for the door code, the easiest would be to “generate” the code based on the last 4 digits of the phone number which will be in the description of the booking. Alternatively, some sort of hashing function based upon the booking ID would be appropriate as well
Sorry for the off-topic add. Does anyone know how to create a sensor for a buried attribute? Such as:
attribute: description: phone number
@tykeal I saw you were playing with airbnb calendars and wondered if you had got over the issue that is bugging me which is that the calendar start & end date attributes switch to the next booking at midnight of the guests last night.
I want the heating to shut down after they’ve gone not at midnight when they are still there.
@ianadd yes I have been playing with an integration for AirBnB calendars. It’s intended to work hand in hand with Keymaster, but right now it’s not a strict requirement (and it may never actually be a hard requirement).
My current work is available here: GitHub - tykeal/homeassistant-rental-control: Rental Control system for Home Assistant
At present what you can do is the following:
- Add an AirBnB calendar
- Add prefixes to the Reserved events (in case you have more than one calendar you wish to configure)
- Set a Check-in time (defaults to 16:00)
- Set a Check-out time (defaults to 11:00)
- Set how far into the future you wish to fetch in days (defaults to 365 / aka 1 year)
- Select the Keymaster lock configuration you wish to tie against (though it doesn’t do anything right now and None is valid)
- State what lock slot management will start at (defaults to slot 10) this is presently unused
- Define the number of event sensors to create (defaults to 5) this will in the future be how many lock slots are actually managed
What this does it pull in the AirBnB calendar and refreshes it every 2 minutes.
It creates a calendar object and populates all of the events. Additionally, it rewrites the events to have actual start and stop times instead of being all day events. I’m pretty certain that this is what you’re really wanting.
In my personal HA I’ve also installed via HACS the Atomic Calendar Revive frontend which I’ve found makes it really easy to see the upcoming schedule when configured in event mode. Especially with the maxDaysToShow set to 30 or more so you can see the entire month. The Calendar view itself isn’t as useful as it doesn’t differentiate multi-day stays very well in that view.
Using the rudimentary integration as it is now would allow you to have better ability to control climate based on the calendar and sensor entities that get created by it given that you’ve got actual in/out times.
@tykeal I’ve copied the rental-control folder as instructed in your read-me.
I’ve restarted HA and no extra entry appears in integrations list.
I’m running 2021.12.7
Any other steps needed ?
Thanks for sharing
I take it this is your first time installing an integration? You’ll need to do two things for it to be available as a new integration:
- Restart your Home Assistant
- After it’s finished starting, on the integrations page you’ll need to do a force refresh for it to show up
Please note, that there is no icon available for it. I’m not an artist and I wasn’t expecting to release this to anyone just yet!
I would also recommend you get HACS installed if you haven’t done so already. When this integration is finally in a state I can consider it truly release worthy I intend to get it added there. As it is, right now I don’t pass all the needed validation tests for inclusion in HACS.
@ianadd you might want to pull the latest version. I just closed a bug related to editing rental control entities that do not have a lock associated with them. That is, Keymaster configuration to manage is set to (none).
Hi, a full refresh of of the browser solved finding it. Hadn’t thought to do that.
However it then errors:
config flow cannot be loaded
I use hacs a lot, i use atomic cal revive.
I will download the updated code as suggested.
Do you have Keymaster installed? Rental Control does have it listed as a dependency and may not fully load if it isn’t installed. I haven’t tested it in that configuration at all.
Ok, Installed Keymaster - not that I anticipate using such - so would be nice if you didn’t bind your dev to it (for me at least).
Next the add integration brings up a list of unlabelled fields to enter in info.
Your initial message gives me a clue as to what it might expect but…
1st field …
airbnb calendar ? what format and - the exported one from airbnb or the google calendar created one I currently have in google-calendars.yaml
Can it be a Tripadvisor calendar ? I use both services.
2nd field …
‘prefixes to the Reserved events’ tbh I haven’t a clue what this means.
3rd field …
The rest of the fields I understand.
The tick box at the bottom ??
Finally, it looks like aborting the entry of data into this dialog by changing to another HA page seems to leave HA in a corrupt state requiring a power off reboot. tbh I suspect this version of HA 2021.12.7 has some fragility I’ve not seen before.
Sorry if I am being a hassle but if you are aiming to publish it to HACS you can consider me a beta tester !!