Giter Site home page Giter Site logo

pialarm's Introduction

pialarm

Have a Texecom Premier alarm panel, and a Raspberry Pi? This repository contains scripts to speak to the panel over the UART serial ports, ideally by locating the Pi computer within the alarm panel, to provide remote monitoring and alarm escalation over the internet. To reach the wider world, panel log events are pushed to a Telegram chat group, and alarm triggers are pushed over the PSTN using Nexmo to send SMS messages and send text-to-speech messages.

The project emultates some of the functionality of Wintex, the Texecom windows-based configuration system, and also uses parts of the Cestron protocol for real-time event monitoring. It will also speak the monitoring protocol to allow the panel to monitor the uptime of the raspberry pi and communicate alarms.

To 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 directory you will find a small shield fitting the Pi GPIO header to do this, and instructions to connect it to the Texecom main board. It it not necessary to buy any IP-communicator or Com300 board to do this.

Panel configuration

Configure via. the keypad as follows:

COM1                        configure as 'Not connected'
COM2                        configure as 'Crestron System'
COM2 Speed 19200 baud
COM3                        configure as 'Communicator 300'
UDL Password -> 12345678    set this in ~/.pialarm

Preparing the pi

Install 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 -> P2 SSH -> Yes) then change the password for the pi user using passwd.

It 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 -> P6 Serial -> No -> Yes -> OK, giving this summary:

The serial login shell is disabled
The serial interface is enabled

Now install the contents of this repository to ~/pialarm as follows:

$ sudo apt-get install git
$ git clone https://github.com/shuckc/pialarm.git
$ pip3.6 install -r requirements.txt
$ python

You may also update the Pi kernel and firmware with $ sudo rpi-update - didn't cause any problems for me.

Wiring

First 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 -> Panel, I drove the panel's Rx pin directory with no problems.

For more details see hardware.

Legal

This 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 traces 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.

If 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.

See also

  • Mike Stirling's @mikestir implementation of an Alarm Receiving Centre ARC, expecting messages over TCP, so requires e.g. ComIP communicator module
  • @kieranmjones who first freely documented the Cestron protocol
  • @stuartyio who runs the Selfmon site for Honeywell panels
  • Nexmo text-to-speech a very reliable and low cost way to send calls and SMS messages over IP
  • Telegram bot API for sending events to a chat group that can be setup on mobile phones.
  • Gw0udm's blog which details serial port connectivity information as well as COM3 and various communicator systems.

pialarm's People

Contributors

shuckc avatar

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.