I’m feeling on a bit of a roll now… and I think I might have found another DIY means of adding functionality to the Texecom Premiere Elite panel. I’ve always been interested in the idea of adding a mobile phone dialler to the panel to send a text message when the alarm sounds.
First thought was to buy the genuine Texecom add-on, called (predictably) the ComGSM. However, once again there were a few difficulties with this. The unit itself is readily available from the usual sources (eg www.cts-direct.co.uk):
Firstly, you won’t be surprised to learn that I think that this is quite expensive. Secondly, I didn’t really like the way that it was an external box when there is lots of space inside the existing alarm housing.
I looked at some alternatives. You can get on ebay some boxes which take a SIM card, and when triggered send a standard text message to a list of numbers. These are cheaper, and smaller and so easier to install. However, they looked awkward to configure and did feel like a bit of a clumsy solution. It would have been straightforward to trigger it using one of the panel’s outputs though.
Once I started reading the instruction manual for the panel a bit more I preferred the Texecom solution. This was partly because of being able to configure everything easily through Wintex, and also because when it is triggered it sends a much more detailed text message with details of which zone is triggered etc. It also allows a limited control, so you can disarm the alarm and get some status reports by sending text messages as well.
After having some success at getting the serial interface to the panel working (see earlier posts) I decided to investigate a bit further what the panel was doing when the ComGSM was installed, and how it was communicating. The genuine unit is installed by connecting to one of the two serial ports inside the panel, and as I learned when doing the USB interface these are operating as entirely standard ports.
My first thought was that the panel would send some kind of encoded commands to the ComGSM which were then translated into control of a phone dialler. I thought that it might be possible to use the Raspberry Pi as a ‘man in the middle’ to translate the commands from the panel and then get the Pi to control a dialler. This seemed a tall order, but worth investigating as it would cut the cost down.
As a start, I configured the panel to have a ComGSM installed on the second port, and plugged in the USB-serial adaptor to listen to what it was doing. This is another setting which is buried in Wintex, this time in the ‘Communicator Options’ screen under the ‘Programming’ menu:
You can set a whole range of different options for either of the built in com ports as Texecom make a whole lot of different ones. For the purpose of this experiment I set it to ‘GSM module’ which is the one for the ComGSM.
I then ran a simple serial terminal program to see what was coming back. At first, I got a series of garbled characters but they repeated regularly. I tried a few differnet combinations at random, sticking to 8 bits, no parity and one stop bit (aka 8N1, the most common configuration) and eventually on selecting 9600 baud, and to my great surpise, I saw the following coming from the panel:
These commands were sent in a repeating sequence. These commands form part of the very well known AT command set, which has been used for modems since the 1980s. It used to be known as the ‘Hayes AT’ command set, named after the pioneering modem company which first developed it. I remember using this myself back in late 80s and early 90s, at which time it was not uncommon to control the modem manually using AT commands rather than having it done automatically through comms software. You would send the command ‘AT’ to the modem (short for ATtention) and get back the response ‘OK’. Other commands could be appended to the AT – so ATDT0123123123 would cause the modem to Dial with Tones (rather than pulses) the number. Over the intervening years, the command set has been developed to include a whole range of other commands, and this includes for dealing with mobile phone connections and text messages.
The commands above – +++, ATZ and ATH0 are fairly standard initialisation commands, to reset the modem (ATZ) and hang up any calls (ATH0). I tried sending back the expected repsonse – ‘OK’ – and was pleased see the panel respond with more commands including some newer ones which were for listing out and retrieving stored text messages. This shows some of them:
The formatting is a bit strange, but you can see the first commands towards the bottom, and then some more wrapping round including AT +CSQ which is a request for signal strength, and AT +CMGL=”REC UNREAD” which lists out unread text messages. There is a function
So from all this, my conclusion is that the panel is sending out entirely standard messages, so there is no need for any translation at all. I now think that it should simply be a question of finding a GSM modem module and connecting it directly to the panel.
There are quite a few of these to choose from, but in order to keep costs down I decided to order one directly from China via ebay. Many seem to be based on a Siemens module, and they come in all shapes and sizes with various interfaces. However i settled on this one:
It has a simple serial UART interface so should be able to speak directly to the panel. It also had the advantage of being pretty cheap, although I did have to wait a few weeks to be delivered. It’s only just arrived, and once I’ve had a chance to play with it will post an update. I am hoping that if if works I can mount it inside the casing with the antenna bolted to the top. For me this will be a much neater and more elegant solution than the real one!