{"id":16216878,"url":"https://github.com/shuckc/pialarm","last_synced_at":"2025-03-19T10:30:40.639Z","repository":{"id":35973797,"uuid":"142428150","full_name":"shuckc/pialarm","owner":"shuckc","description":"Interface with (and impersonate) Texecom Alarm panels over UDL protocol in python","archived":false,"fork":false,"pushed_at":"2023-10-04T00:59:10.000Z","size":715,"stargazers_count":18,"open_issues_count":4,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-28T17:56:16.165Z","etag":null,"topics":["alarm-panel","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuckc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-26T10:51:24.000Z","updated_at":"2024-12-23T13:20:12.000Z","dependencies_parsed_at":"2024-10-27T20:30:47.853Z","dependency_job_id":"b1ab5d76-9b79-43f6-963f-2b8544ac333d","html_url":"https://github.com/shuckc/pialarm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuckc%2Fpialarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuckc%2Fpialarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuckc%2Fpialarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuckc%2Fpialarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuckc","download_url":"https://codeload.github.com/shuckc/pialarm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982182,"owners_count":20378605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alarm-panel","python","raspberry-pi"],"created_at":"2024-10-10T11:23:14.639Z","updated_at":"2025-03-19T10:30:40.156Z","avatar_url":"https://github.com/shuckc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pialarm\nThis repository contains scripts to speak to (and impersonate) a Texecom alarm panel UDL protocol over either UART serial or TCP ports. The project implements some of the functionality of Wintex, the Texecom windows-based configuration tool through a web browser.\n\n## Quickstart - Running a virtual panel\n\n1. Install Wintex (on linux works well with playonlinux wrapper)\n2. Setup a new 'Account' with these settings:\n\n        Panel type:        Elite 24\n        Software version:  4.x\n        UDL password:      1234\n        Network details:   127.0.0.1  port 10001\n\n3. start `udl-server.py` running:\n\n        $ git clone https://github.com/shuckc/pialarm.git\n        $ cd pialarm\n        $ python3 -m venv venv\n        $ . venv/bin/activate\n        $ pip install -r requirements.txt\n        $ python udl-server.py\n        Panel type 'Elite 24    V4.02.01' with UDL password 1234 backed by file /home/chris/alarmpanel.cfg\n        Serving UDL on ('::', 10001, 0, 0), ('0.0.0.0', 10001)\n        Serving web interface on 10002\n        (eval) \u003e\n\n4. In wintex hit `Connect` -\u003e `Connect via. Network (127.0.0.1 on Port 10001)`. Wintex will prompt to reset the fake pannel. You will see some output like:\n\n        udl_server 0: connected\n        Sending login prompt\n        Recieved UDL login [49, 50, 51, 52]. Sending panel identification\n        Configuration read addr=00649b sz=10 data=0x2f,0xfc,0x56,0x50,0x85,0x90,0x48,0x44,0x76,0x11,0x43,0x39,0xce,0xc4,0x19,0x76\n        Configuration read addr=005d04 sz=10 data=0x57,0x1,0x7,0x94,0x71,0x49,0x45,0x5,0x9f,0xea,0x6c,0xe7,0xe7,0x1b,0xa8,0x64\n        Configuration read addr=001678 sz=1 data=0x0\n        Configuration read addr=001fca sz=7 data=0x0,0x0,0x0,0x0,0x0,0x0,0x0\n        Configuration read addr=00167e sz=1 data=0x0\n        Configuration read addr=005c55 sz=2 data=0x0,0x0\n        (eval) \u003e\n\n5. Open up a web browser to `http://localhost:10002` to see the decoded panel configuration\n\n![Web screenshot](./site/screenshot.png)\n\n## Serial connection\n\nTo interface a raspberry Pi to the alarm pannel requires only a couple of resistors, plus a 12-15V DC to 5V DC power adapter. In the [hardware](hardware/) directory you can see how to connect it to the Texecom main board. It it not necessary to buy any IP-communicator or Com300 board to do this.\n\n\n### Protocol\n\nSee captured examples and dissections of the [\"simple\" protocol](protocol/readme.md) and the [Wintex protocol](protocol/wintex-protocol.md).\n\n\n\n### Panel configuration\n\nConfigure via. the keypad as follows:\n\n    COM1                        configure as 'Not connected'\n    COM2                        configure as 'Crestron System'\n    COM2 Speed 19200 baud\n    COM3                        configure as 'Communicator 300'\n    UDL Password -\u003e 12345678    set this in ~/.pialarm\n\n\n\n\n\n### Preparing the pi\nInstall a blank `rasbian` install to an SD Card (ideally skipping NOOBS). Boot using a keyboard and screen, then use `sudo raspi-config` to enable ssh (`5 Interfacing Options` -\u003e `P2 SSH` -\u003e `Yes`) then change the password for the `pi` user using `passwd`.\n\nIt is necessary to disable the serial `tty` that raspian attaches to `/dev/ttyACM0` in order to access the hardware UART. With recent rasbian releases it is a simple matter of running `sudo raspi-config` and disabling the serial tty under `5 Interfacing Options` -\u003e `P6 Serial` -\u003e `No` -\u003e `Yes` -\u003e `OK`, giving this summary:\n\n    The serial login shell is disabled\n    The serial interface is enabled\n\nNow install the contents of this repository to `~/pialarm` as follows:\n\n\t$ sudo apt-get install git\n    $ git clone https://github.com/shuckc/pialarm.git\n    $ cd pialarm\n    $ pip3.6 install -r requirements.txt\n    $ python\n\nYou may also update the Pi kernel and firmware with `$ sudo rpi-update` - didn't cause any problems for me.\n\n\n\n### Wiring\nFirst I used a couple of FTDI USB external COM ports (5V tolerant) as a proof of concept. However it is much neater to omit these and use the GPIO pins on the pi directly. The COM ports on the alarm mainboard all drive `Tx` to 5V logic levels, with a series protection resistor of 9.1kOhm, which needs to be accounted for in the voltage divider to reduce to 3.3V logic for the raspberry pi GPIO pins. Since the protection resistor is quite large, I used this as the top resister in the divider chain, with a bottom resistor of 15kOhm. For Rpi -\u003e Panel, I drove the panel's Rx pin directory with no problems.\n\nFor more details see [hardware](hardware/).\n\n### Legal\nThis project is not affiliated with Texecom. The protocols were reversed engineered using a Salae Logic8 logic probe, and later by capturing traffic using the `ser2net` tool, and custom scripts to convert trace files to memory maps. See the [protocol](protocol/) directory for these. For the fine details, a panel was emulated with `udl-server.py` and WinTex used to change settings individually. No author or contributor has signed the Texecom NDA agreement.\n\nIf you use the configuration system to change panel settings, this is done at your own risk. It is not beyond the realm of possibility that a panel might need NVM reset to recover or the use of a firmware flasher.\n\n### See also\n\n* Mike Stirling's @mikestir  implementation of an [Alarm Receiving Centre ARC](https://github.com/mikestir/alarm-server ), expecting messages over TCP, so requires e.g. ComIP communicator module\n* @kieranmjones who first freely documented the [Cestron protocol](https://github.com/kieranmjones/homebridge-texecom/blob/master/index.js )\n* @stuartyio who runs the Selfmon site for Honeywell panels\n* Nexmo [text-to-speech](https://developer.nexmo.com/voice/voice-api/guides/text-to-speech) a very reliable and low cost way to send calls and SMS messages over IP\n* [Telegram bot API](https://core.telegram.org/bots/api) for sending events to a chat group that can be setup on mobile phones.\n* Gw0udm's [blog](https://gw0udm.wordpress.com/category/texecom/) which details serial port connectivity information as well as COM3 and various communicator systems.\n* [Leo Crawford's brute forcing](https://www.leocrawford.org.uk/2019/01/10/brute-forcing-my-own-texecom-premier-elite.html) of the UDL login.\n* RoganDawes' [ESPHome_Wintex](https://github.com/RoganDawes/ESPHome_Wintex) which can bridge Zone status to Home Assistant.\n* RoganDawes' [Java WintexProtocol](https://github.com/RoganDawes/WintexProtocol) decoder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuckc%2Fpialarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuckc%2Fpialarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuckc%2Fpialarm/lists"}