[Custom Integration] Rental Control - for AirBnB, VRBO, etc

Ill give that a go this evening and see. No idea why its trying to go to “/renters/renters”, Ill go ahead and remove fully and clear out the folder and try starting from scratch for the integration.

Yup keymaster has worked with no issues for a week or two before trying to add this. Able to add / remove codes, remotely lock / unlock etc. Notifications getting pushed no problem as well .

Thanks!

Ive got some progress … Logbook now shows it changing event 0 more regularly (Every reboot now instead of just once ever) … But it still is not setting the lock code. Is there a way to call for a more indepth log specific to this?

What I did in the last day or so:

  • Fully removed Rental Control Integration
  • Fully removed Rental Control from HACS
  • Rebooted the VM and physical machine hosting HA
  • Reinstalled Rental Control per information on the GITHub.
  • Setup “Spare Room” In config Only change was to default slot of 7, and 1 sensor, and to use phone # last 4 as code (In descrption as indicated i should above).
  • I get a Logbook showing this:

And the integration is definately seeing what the code should be …

So it seems like the issue is with Rental Control talking with Keymaster?

(Note: for my use case one code will ever be needed, with a week minimum between rentals, so I set it to make 1 entity , do I need it to have more?).

If that’s the case then 1 entity is perfectly fine.

What is the name of your lock in Keymaster? Ideally, there should be no spaces in the name. We should be able to properly figure out the keymaster entities even if there are, but it’s definitely a question I’m curious about.

As to a way to get more verbose logging, well, you can turn up the logging level itself. From the Developer Tools services menu

service: logger.set_level
data:
  custom_components.rental_control: info

Or the maximum logging:

service: logger.set_level
data:
  custom_components.rental_control: debug

Finally, you might consider looking at the automation that RC has generated for you. With 2022.10.0 you can no view them in the automations menu without having to touch the files on disk.

Go to automations and then in the filter just put ‘rental control’ you should find 4 automations. You might consider looking in those and seeing if the entities that are being defined for use match what you actually have in your system.

lock name is just: frontdoor . So that shouldnt be the issue I wouldnt think?

Ill adjust the log level up when i play with it tonight… However looking in the automations i think this might be the issue? Doesnt look like RC has create any (Im on 2010.10.2 HA)

For reference this is the current RC config:

For what is worth i think everything on keymaster is good to go for slot 7:

image

Or is there something on this portion of lock master I am missing?

Thanks again for the assistance!

If it’s failing to create and load the automations I would think it’s because of a missing packages directory that is also required for Keymaster see this from the Keymaster wiki. I didn’t bother writing a similar piece of documentation since RC depends on Keymaster for full functionality, so if Keymaster isn’t properly setup then RC won’t be either for lock management

Ah, let me add that, I had skipped over that since my keymaster was after 0.0.22.

Did that and it looks like it did the trick! Thanks for the time helping, this should do the trick perfectly for me!

Glad to hear it!

One question now that ive got it going. Looks like it does the code no problem however it is resetting the slot about once every minute or two … Is this expected behavior?

The pin does work, but keymaster seems to indicate disconnected pin status.:

image

Ok, that’s not a Rental Control issue, but a Keymaster issue. Please note that RC sets the advanced features for start and end day along with start and end time. Expand the advanced options and you should see the time span that the code is expected to be truly enabled.

When you’re outside the window you should see that the slot is enabled, but the status is Disconnected and the desired PIN state is Off, when inside the window it should push the code and the desired state should switch to On.

One final note, make sure that whatever PIN you’re trying to manage is not being pushed in / already in the lock. There are no locks on the market that will allow you to set the same PIN on more than one slot.

Ah that makes sense! So basically whenever its set but not in the correct time. Do you know why RC would be continously having the lock be updated for the Pin? Seems to be triggered by “rental_control_set_code”

or is this anticipated behavior?

SO much to keep learning going from ST to HA and the custom stuff here.

And yup issues if you have duplicate codes in the documentation, ill keep that in mind.

Thanks again!

Look at those timestamps more closely and the entities being modified. The rental_control_set_code event / automation modifies several entities all at the same time. Each one of those modifications triggers an update back to RC itself so that the sensors are all getting the correct data.

The slot shouldn’t keep getting changes sent to it / from it though once it’s been properly coded.

OMG this is super interesting!

I have a plan to automate a golf sim space.
Lock with pin for booked time. Automatic light control that matches booked time.

Is this feasible? Thinking of using a booking system like skedda for payment and booking. I believe these can make calender entries.

Am I in the right place?

This really is targeted at short term rental for homes and apartments. So every rental is expected to be one or more days in length. If you’re looking for something that is tighter than that, this isn’t going to currently work as the code is designed to explicitly inject a “check-in” and “check-out” time since all of the short term rental platforms do their rentals as full day events with no start or end time.

If you want a feature to not overwrite start and end times, please raise a feature request or even better, provide a patch :wink:

Hi
I already use that fabulous for my locks management in my AirBnB flat
I also manage heating when the flat is busy
I seen that there is also a way to grab the number of guests
It would we very useful for me to activate the heating only in the rooms that will be used
Unfortunately, I don’t see anything in the calendar related to that …
Is there any info on how to use that ?
Thanks

The only calendar service I’m aware of that provides the number of guests is Trip Advisor. If you’re using Airbnb, then you won’t get that information from the ical.

If you’re using a custom calendar, then the description needs to contain the following line in the description of the event:

Guests: ?

Where ? is the number of guests and it needs to be on a line all it’s own in the description. This is what Trip Advisor does.

In any case, if the calendar entry contains something that matches the above, then it will show up as an attribute.

Wonderful :+1: thanks

Just a quick question. I noticed that with VRBO for some reason its not pulling in the last 4 digits of the phone number. Its getting some other string of 4 digits from somewhere but its not the phone number. I’m having to go into keymaster and update the VRBO slots so they contain the correct pin in there prior to my guests arrival. I checked the config for it and its set to the last 4 of phone so I don’t know if I missed something in VRBO with the ical link or what. Thanks for your help.

Unfortunately VRBO doesn’t provide the phone number information at all in their calendar entry. As there is no phone number, or even last 4 digits like Airbnb provides, in the calendar event we can’t calculate what the last 4 should be. The integration will only do the “date based” code generator for VRBO calendars because they do not provide enough information for any other type of generator to function correctly.

The date based generator generates the code in the following way:

<start_day><end_day><start_month><end_month<start_year><end_year>

From this long string the left most N digits (where N is 4+ and even) are taken and used as the code.

If you’re doing 4 digit codes, this means the code is the start day and end day, zero padded. Because of how the codes are managed unless the slot gets cleared, the code will stay the same even if the guest changes their reservation dates.

I don’t know if any of the aggregation platforms out there (Guesty or Smoobu or another that works that I don’t know about) get more information out of VRBO than the default calendar integration. If so, you could go that route. Alternatively, raise a feature request with VRBO to start including the last 4 digits of the phone number in the iCal. I’ll say this, I don’t expect them to do that for you though, but you never know!

To be specific, VRBO does not include any DESCRIPTION field in their calendar entries, just a SUMMARY. The phone number would need to be in the description field and start with “Phone: <the_number>” or “Phone Number: <the_number>” or even “Last 4 Digits: <the_last_4>” for the last 4 digit extractor to work.

Thank you for letting me know and I apologize if this was already documented somewhere. I’ll make sure I update my instructions for my VRBO guests to understand that this is what their code will be.

Trying to set this up with VRBO and my Ical link is an http link not an https link. I checked my other properties and they are also http. Is there a way to get this to work?

Thanks

Craig

Edit:
I put the address in as https and disabled the not standard event box and the ssl box. That seems to have worked.

Thanks