Node application that dynamically creates a PIN code for guest house access for events on a dedicated guest Google Calendar. PIN codes are added to the description of calendar events and enabled only for the duration of the event. To grant a guest access, simply create an event on the dedicated guest Google calendar and invite your guests to the event. PIN codes will be added to the description of the event once the event starts and will email all invitees for the addition of the PIN.
- Home Assistant and MQTT are setup and connected.
- Locks are controllable via Home Assistant.
- Lock PINs can be set, enabled, disabled, via MQTT; see guest_pin_codes in home assistant for an example.
- A dedicated Google calendar; all events on this calendar will be updated with PIN codes.
- Create Vault secrets
yarn initialize-secrets --scope @ha/guest-pin-codes
- Set Vault secrets
- Comma-delimited list of the lock names found from Home Assistant
- Google guest calendar ID
- Enable Google Calendar API
- Google Calendar API private key; stringified JSON
- Comma-delimited list of PINs to be excluded from assignment; this typically includes family member or other dedicated PINs
Calendar events are updated on a 5 minute interval and events are scheduled with PIN codes every minute.
- Create an event on the dedicated Google calendar.
- Typically events will start in the future.
- Events staring in the past that are currently active are also supported.
- Once the event starts, a PIN is dynamically assigned to the event and enabled for the event.
- PINs are added to the description of the calendar event.
- Once the event ends, the PIN is removed from the description and disabled.