Skip to content

uhppoted/uhppoted-app-home-assistant

Repository files navigation

build nightly

uhppoted-app-home-assistant

UHPPOTE controller custom component for Home Assistant.

Development status: ALPHA


uhppoted-app-home-assistant is an experimental Home Assistant custom component for the UHPPOTE access controllers, leveraging the uhppoted-python library. It turns out that an access control system has quite a lot more moving parts than e.g. your average thermostat, and the current implementation, although functional and usable, is intended more for the (brave) early adopter.

The current version is most suited to a small'ish home ACS i.e. a couple of controllers with half a dozen doors and maybe a ten or so access cards - so, not a large mansion or an office building.

Contents

  1. Screenshots
  2. Installation
  3. Configuration
  4. Service API

Screenshots



Release Notes

Current Release

v0.8.9.3 - 2024-12-05

  1. Fixed deprecation warnings in Home Assistant 2024.11.3.
  2. Added hacs.json file for HACS v2.0.
  3. Added sample Docker compose.yml scripts.

Installation

Alpha Release

NOTE: The Alpha release is entirely use at your own risk/discretion. It is functional but not even vaguely pretty and is a long way from finished. It has had very limited testing - nobody has as yet reported being locked out of their own home but that may just be because it wasn't late at night and pouring with rain, but please do have a backup plan (which may or may not include a fire axe). It is also reasonably likely that future releases may require you to reconfigure your system again i.e. it is for the brave and adventurous who enjoy living on the edge.

Installing via HACS is by far the simplest:

  1. Install the HACS integration.
  2. Open the HACS tab in the Home Assistant sidebar. and add the uhppoted-app-home-assistant github repository as a custom repository (under the Home Assistant Community Store menu).
  3. Restart Home Assistant to complete the initial installation.
  4. Open the Settings tab in the Home Assistant sidebar.
  5. Open the Devices and Integrations section.
  6. Select Add integration and choose uhppoted.
  7. Step through the configuration flow to set up the initial system configuration
  8. Add/edit the entities to the desktop.
  9. You may need to restart Home Assistant after completing the initial system configuration.

Alternative installation methods are described in the Installation Guide:

Configuration

  1. Open the Home Assistant/Settings page.
  2. Open the Devices & Services page.
  3. Select the Integrations tab and then select Add integration.
  4. Search for uhppoted and open the uhppoted custom integration item.
  5. Enter the bind, broadcast, listen addresses and (optionally) enable debug.
  6. Select the controllers to manage with Home Assistant from the list of controllers found on the LAN.
  7. For each controller:
    • choose a unique name e.g. Main, Controller #1, etc.
    • (optional) set the controller IP address
    • (optional) set the controller protocol (defaults to UDP).
    • (optional) set the controller timezone (defaults to Local)
  8. For each controller, select the doors to manage with Home Assistant
  9. For each selected door:
    • choose a unique name e.g. Entrance, Garage, Man Cave
  10. Select the cards to be managed by Home Assistant from the list of cards found on the controllers
  11. For each selected card:
    • enter the name of the person (or other entity) using that card
  12. On completion of configuration the uhppoted service will create all the entities for the controllers, doors and cards.
  13. Add selected information to the dashboard from the entities listed below.

Entities

Controllers

  1. uhppoted.controller.{controller}.info
  2. uhppoted.controller.{controller}.datetime
  3. uhppoted.controller.{controller}.event

Doors

  1. uhppoted.door.{door}.info
  2. uhppoted.door.{door}.open
  3. uhppoted.door.{door}.lock
  4. uhppoted.door.{door}.button
  5. uhppoted.door.{door}.mode
  6. uhppoted.door.{door}.delay
  7. uhppoted.door.{door}.unlock
  8. uhppoted.door.{door}.open.event
  9. uhppoted.door.{door}.button.event
  10. uhppoted.door.{door}.unlocked.event

Cards

  1. uhppoted.card.{card}.info
  2. uhppoted.card.{card}.cardholder
  3. uhppoted.card.{card}.start-date
  4. uhppoted.card.{card}.end-date
  5. uhppoted.card.{card}.{door}
  6. uhppoted.card.{card}.pin
  7. uhppoted.card.{card}.swipe.event

Off-LAN controllers

Controllers that are not on the local LAN segment are not discoverable and have to be added manually to the uhppoted section of the Home Assistant configuration.yaml file (in the config folder), e.g.:

...
uhppoted:
    ...
    controllers:
        - 
            controller: 504030201
            address: 192.168.1.100
        - 
            controller: 605040302
            address: 192.168.1.100
            port: 60000
            protocol: UDP
        - 
            controller: 706050403
            address: 192.168.1.100
            port: 54321
            protocol: TCP
            timeout: 0.56
...

The controllers subsection is a YAML array/list of controllers with the following properties;

  • controller: controller serial number
  • address: controller IPv4 address
  • port: (optional) controller UDP port (defaults to 60000)
  • protocol: (optional) controller transport protocol (UDP or TCP - defaults to UDP)
  • timeout: (optional) controller timeout (default to the global uhppoted timeout of 2.5s)

The controllers listed in configuration.yaml are included in the list of discovered controllers and can be configured from the Home Assistant user interface in the same way as local controllers i.e. controllers listed in configuration.yaml are NOT automatically added to the list of managed controllers - they do still need to be configured.

configuration.yaml

The operational configuration can be customised by the (entirely optional) setttings in the uhppoted section of the Home Assistant configuration.yaml file (in the Home Assistant config folder). The full list of configurable settings comprises:

Setting Description Default value
bind_address Default IPv4 UDP bind address 0.0.0.0
broadcast_address Default IPv4 UDP broadcast address 255.255.255.255
listen_address Default IPv4 UDP listen address (for events) 0.0.0.0
timezone Default controller timezone local
timeout Default timeout for controller requests/responses (seconds) 2.5
debug Enables/disables logging of controller packets false
max_cards Max. cards to 'discover' for configuration 10
preferred_cards YAML list of of cards that take priority for 'discovery' - none -
card_PINs Enables/disables retrieving/setting card PINs false
controllers_poll_interval Interval at which to fetch controller information (seconds) 30
doors_poll_interval Interval at which to fetch door information (seconds) 30
cards_poll_interval Interval at which to fetch card information (seconds) 30
events_poll_interval Interval at which to fetch missed/synthetic events (seconds) 30
controllers List of off-LAN controllers (see above) -none-

e.g.

uhppoted:
    bind_address: 192.168.1.100
    broadcast_address: 192.168.1.255:60000
    listen_address: 192.168.1.100:60001
    debug: false
    timezone: CEST
    timeout: 1.23
    max_cards: 7
    preferred_cards: 
        - 10058400
        - 10058401
    card_PINs: true
    controllers_poll_interval: 29
    doors_poll_interval: 31
    cards_poll_interval: 33
    events_poll_interval: 35
    controllers:
        - 
            controller: 504030201
            address: 192.168.1.100
            port: 54321
        - 
            controller: 605040302
            address: 192.168.1.100
            port: 54321
        - 
            controller: 706050403
            address: 192.168.1.100
            port: 54321
            protocol: TCP
            timeout: 0.56

Service API

unlock-door

Unlocks a door by name - the name is case- and space-insensitive.

Example:

service: uhppoted.unlock_door
data:
  door: Gryffindor

add-card

Adds a card to all the controllers configured by the uhppoted service. The card is not added to the list of configured cards - to include the card in the managed cards, open the CONFIGURE section for the uhppoted service (under Settings/Devices & Services/uhppoted).

Example:

service: uhppoted.add_card
data:
  card: 10058400

delete-card

Delets a card from all the controllers configured by the uhppoted service. The card is not removed from the list of configured cards - to remove the card from the managed cards, open the CONFIGURE section for the uhppoted service (under Settings/Devices & Services/uhppoted).

Example:

service: uhppoted.delete_card
data:
  card: 10058400

About

UHPPOTE controller integration with Home Assistant

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published