Code Monkey home page Code Monkey logo

uhppoted-python's Introduction

build

uhppoted implements a set of cross-platform building blocks for access control systems based on the UHPPOTE UT0311-L0x TCP/IP Wiegand access control boards. Currently available components include:

The components supplement the manufacturer supplied application which is 'Windows-only' and provides limited support for integration with other systems.

FYA, after much discussion it has been decided that uhppoted is pronounced u-hop-id-ay-d (juː hɒp ɪt eɪd).

Operating systems

Supported operating systems:

  • Linux
  • MacOS
  • Windows
  • ARM and ARM7 (e.g. RaspberryPi)

Language Bindings

The primary development language for this repository is Go, but code generated native bindings for the following languages also exist:

shared-lib/dylib/DLL

uhppoted-dll implements a shared-lib/DLL for interop with languages other than Go. The implementation includes bindings to:

  • C
  • C++
  • C#
  • Python
  • Clozure Common Lisp

3rd party integrations

Compatible Hardware

As per this issue [Question] Compatible Hardware, UHPPOTE appears to be a specific branding (or distributor) for the access control boards manufactured by Shenzhen Wiegand Industrial Co., Ltd.

The software in this repository has been tested and is known to work with these specific boards:

Source Item
Amazon UHPPOTE Professional Wiegand 26-40 Bit TCP IP Network Access Control Board with Software For 4 Door 4 Reader
AliExpress TCP/IP RFID ACCESS CONTROL SYSTEM Wiegand 26

Firmware versions

Version Notes
6.56 Minimum firmware version (cf. carbonsphere/UHPPOTE
6.62 Lowest firmware version in use
8.92 Latest tested firmware version

Notes:

  1. Firmware v6.62 sends anomalous listen events with 0x19 as the start of message identifier. This appears to have been fixed in later firmware versions but patches to support these events are included in:

Readers

Almost any reader with a Wiegand-26 interface should probably work (there have been reports of offbrand readers that don't) but the readers below are in active use:

Reader Notes
HID ProxPoint Plus 6500 Old stock and/or refurbished readers are often available on ebay
IKeys barcode and QR code scanner Ref. Put Card - Date with Time
Newland FM430L barcode and QR code scanner Ref. Put Card - Date with Time

Release Notes

Current Release

v0.8.8 - 2024-03-28

  1. Added uhppoted-app-home-assistant experimental Home Assistant integration.
  2. restore-default-parameters function across all subprojects.
  3. Added public Docker images for uhppote-simulator, uhppoted-rest, uhppoted-mqtt, and uhppoted-httpd to ghcr.io.
  4. Bumped Go version to 1.22.
  5. Reworked uhppoted-app-wild-apricot member/group resolution logic.

Modules

Module Description
uhppote-core core library, implements the UP interface to UT0311-L0x controllers
uhppoted-lib common utility function library
uhppote-simulator UT0311-L04 simulator for development use
uhppote-cli command line interface
uhppoted-rest daemon/service with REST API for remote access to UT0311-L0x controllers
uhppoted-mqtt daemon/service with MQTT endpoint for remote access to UT0311-L0x controllers
uhppoted-app-s3 cron'able utility to download/upload access control lists from/to AWS S3
uhppoted-app-sheets cron'able utility to download/upload access control lists from/to Google Sheets
uhppoted-app-db cron'able utility to download/upload access control lists from/to a SQL DB
uhppoted-app-wild-apricot cron'able utility to manage access control lists from Wild Apricot
uhppoted-app-home-assistant Home Assistant custom component
node-red-contrib-uhppoted NodeJS nodes for Node-RED low code environment
uhppoted-nodejs Standalone NodeJS module
uhppoted-python Standalone Python package for PyPI
uhppoted-dll shared-lib/DLL for cross-language interop
uhppoted-codegen Model based code generator for native language bindings
uhppoted-tunnel UDP tunnel for remote access

Integrations

Module Description
uhppoted-app-db cron'able utility to download/upload access control lists from/to a SQL DB
uhppoted-app-s3 cron'able utility to download/upload access control lists from/to AWS S3
uhppoted-app-sheets cron'able utility to download/upload access control lists from/to Google Sheets
uhppoted-app-wild-apricot cron'able utility to manage access control lists from/t Wild Apricot
uhppoted-app-home-assistant Home Assistant custom component
node-red-contrib-uhppoted NodeJS nodes for Node-RED low code environment
kBrausew/ioBroker.wiegand-tcpip ioBroker

UI

Module Description
uhppote-cli Command line interface
uhppoted-httpd HTML browser interface

Installation

Binaries for Linux, Windows, MacOS and Raspbian/ARM7 are distributed in the tarball for each release. To install the binaries, download and extract the tarball to a directory of your choice.

The NodeRED, NodeJS and Python packages are installable from the public repositories:

Building from source

uhppoted is the parent project for the individual components which are referenced as git submodules - to clone the entire source tree:

git clone --recurse-submodules https://github.com/uhppoted/uhppoted.git

The supplied Makefile has targets to build binaries for all the supported operating systems:

make build

or

make release

To pull upstream changes for all submodules:

git submodule update --remote

Donations

If you like the project and you really want to 🙂:

References and Related Projects

  1. carbonsphere/UHPPOTE PHP
  2. carbonsphere/DoorControl PHP
  3. andrewvaughan/uhppote-rfid Python
  4. tachoknight/uhppote-tools: Go
  5. jjhuff/uhppote-go: Go
  6. pawl/Chinese-RFID-Access-Control-Library
  7. Dallas Makerspace:Reverse Engineering RFID Reader
  8. wemakerspace/wiegand-daemon
  9. wemakerspace/weigeng-js
  10. realashleybailey/DoorControl
  11. kBrausew/ioBroker.wiegand-tcpip
  12. TCP/IP Wiegand Access Controller (Zutrittskontrolle)
  13. YouTube: UHPPOTE 2 door basic set-up
  14. wouterdebie/uhppote-rs

uhppoted-python's People

Contributors

twystd avatar uhppoted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

uhppoted-python's Issues

Configurable call timeouts

The default 5 second timeout is inconveniently long for e.g. uhppoted-app-home-assistant. The timeout needs to be configurable (possibly per call)

how to get data (id card) when swipe card

hello, I'm currently using controller and I want to get card id every time I swipe the card using python, I wandered around, until I came across this project, it's amazing. There is almost no documentation on this issue, can you give me some instructions so that I can get the id every time I swipe the card through this controller. Thank you

unpack_datetime does not handle invalid date/times

Traceback (most recent call last):
  File "sensor.py", line 274, in async_update
    response = self.uhppote.get_time(controller)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uhppote.py", line 111, in get_time
    return decode.get_time_response(reply)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "decode.py", line 107, in get_time_response
    unpack_datetime(packet, 8),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "decode.py", line 1159, in unpack_datetime
    return datetime.datetime.strptime(bcd, '%Y%m%d%H%M%S')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '20000000000000' does not match format '%Y%m%d%H%M%S'
2023-11-29 11:37:29.754 ERROR (MainThread) [custom_components.uhppoted.sensor] error retrieving controller status

Fix event decoding

Events from event listener are incorrectly decoded:

return Event(
        unpack_uint32(packet, 4),
        unpack_uint32(packet, 8),
        unpack_uint8(packet, 12),
        unpack_bool(packet, 13),
        unpack_uint8(packet, 14),
        unpack_uint8(packet, 15),
        unpack_uint32(packet, 16),
        unpack_datetime(packet, 20),
        unpack_uint8(packet, 27),
        unpack_shortdate(packet, 51),
        unpack_time(packet, 37),
        unpack_uint8(packet, 36),     <<<< 28
        unpack_bool(packet, 28),      <<<< 29
        unpack_bool(packet, 29),      <<<< 30
        unpack_bool(packet, 30),      <<<< 31
        unpack_bool(packet, 31),      <<<< 32
        unpack_bool(packet, 32),      <<<< 33
        unpack_bool(packet, 33),      <<<< 34
        unpack_bool(packet, 34),      <<<< 35
        unpack_bool(packet, 35),      <<<<< 49
        unpack_uint8(packet, 49),     <<<<< 50
        unpack_uint8(packet, 50),     <<<<< 36
        unpack_uint8(packet, 48),
        unpack_uint32(packet, 40),
    )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.