Integrating Texecom Premier Alarm Panels via ESPHome using Wintex protocol

Hi,

I have been working on integrating my Texecom Premier 832 (non-Elite) panel with Home Assistant for a while. The problem is that the non-Elite panels don’t support the friendlier automating protocols that the Elite panels do, so most of the integrations do not support the non-Elite panels.

I built a custom ComIP replacement using an ESP32 and ESPHome, which supports two serial ports on the Texecom panel, and spent some time reverse engineering the Wintex protocol as used by the Wintex app to communicate with the panel.

In doing so, I figured out that there are some memory locations which are read to return the state of each zone (active or inactive). I modified my ESPHome build to include a very simple periodic poll (every 1s) of these memory locations, and export those locations as ESPHome BinarySensor entities. Basically, I can see when the motion sensors trigger, or when a door is left open, etc.

The code for that is available here: https://github.com/RoganDawes/ESPHome_Wintex. It is very rough, and only does the zone active poll at the moment, but the basics are there to implement the rest as well. It probably needs to be rewritten from scratch, though, as it was very early days in my ESPHome journey! It is very likely that Premier panels other than the 832 will have different memory address ranges, and some digging will be required to support them.

Ideally, I’d love to include more features of the panel, including controls to bypass or unbypass zones, or activate or deactivate partitions. I’m honestly not sure how best to represent that in either Home Assistant or ESPHome - well, HA has the Template Alarm Panel, which probably gets me most of the way there, I suppose.

An ESPHome-based alarm implementation I saw used a numeric sensor and text sensor per zone to provide a multi-valued state, but I suspect that multiple BinarySensor’s per zone could also work fairly well. One for Bypass state, one for Tampered state, one for Active state, etc. And perhaps a TextSensor for the zone name, since the panel has that configured, one might as well expose it. And the BinarySensor approach should make it a bit easier to do automation things, too.

Feedback and comments are welcome.

1 Like

That’s great! This is what I’m looking for. Could you update the progress? Do you still working on it?

Not actively, but with some motivation I could. Had a few people express interest, but then disappeared, so no real motivation. It’s doing what I originally wanted it to, so have left it alone, but if there are others that are actually interested, I can work on it more.

I’m really interested. But I don’t know how to help. I have only javascript skill and can build simple DIY thing and config simple yaml in ESPHome.

That’s fine. What are the parts that interest you? What would you need from this integration?

I think it would be great if can arm/disarm from HASS. I think this is the main function and can custom automation.

Ok, I’ll poke around a bit and see whether I can figure out how to do that automatically.

Thank you very much. Actually arm/disarm is really main thing. Not sure can it do now or not? Automation can be add after that in HA.

At the moment, there is no support for arm and disarm. I need to check if it can be done in Wintex. Well, it definitely CAN be done, by emulating a keypad, but that feels a bit kludgy. Would prefer a more direct method, although I think Wintex won’t expose that directly.
It MAY be possible to simply write a zero to the armed memory position, but that probably would skip a whole bunch of events, some of which may be necessary!

I found that using hardware from Trikdis can make the panel controllable by Protegus application. Have to set Alarm Receiveing Centres and set Tel No. to 1234. So I think it use telephone communication port. Also connect it to any zone passing a relay and set type to Momentary key switch and set attribute “Keyswitch is Instant Arming” to on. It will check panel status every 10 seconds. Input power from Aux12 also connect to the relay.

I am also very intertested in this project, but I have unfortunately no programming skills. I have a Premier 832 alarm system with zone extenders, using all the 32 zones. I do have a serial cable as well as a cable that has USB A connector. I’d be happy with the zone statuses, PIRs and door sensors in HA. Could you please share a schematic circuit diagram on how to connect the ESP32 to the alarm board so that I can start testing, playing with the system. Many thanks in advance.

Hi Csaba,

I have actually been working on this recently, and have all the zone state flags supported as BinarySensor’s in ESPHome. It will be a fairly simple matter to extend that to reporting the partition flags and panel flags as well.

My current “roadblock” is trying to get Switches working, to allow e.g. zone bypass, or arming and disarming of the panel. Unfortunately, my C++ knowledge is quite limited, and I am running into those limitations at the moment, trying to wrap my head around lambdas.

As far as a schematic, you can look at pialarm/hardware at master · shuckc/pialarm · GitHub, which while aimed at a Raspberry Pi, has the basic ingredients to connect to the ESP32 as well, given that the serial ports are powered at the same voltage levels, and many ESP32 dev boards have a built in 5V to 3V3 converter built in. My ESP32 build simply duplicates the level converters for a second serial port, because the ESP32 can expose one port over TCP for e.g. Wintex or other remote services, while using the other one for HA purposes. If this seems unnecessary to you, you can simply skip that part.

Hi Rogan,

Thank you for your reply and explanation. I will try to follow the github page description to ensure I convert the right voltage levels for the ESP32.
As for you roadblock, in case of arm/disarm functions why don’t you use the Latched Keyswitch feature with a relay connected to the ESP? If I am not mistaken I have this option setup usinga regular light switch and I can arm the system overnight just by tuning the switch on at the bedroom. It arms all the windows/doors sensors. I suppose it could be done with a relay and 0 programming.

From the manual:
Auxiliary Input Areas:This option allows the Auxiliary input to be assigned to one or more
partitions. This will affect how the Auxiliary input now functions, e.g. if the Auxiliary input is programmed as a “Latched Keyswitch” (see page 38) and is assigned to partition 3 and 4, the system will arm partitions 3 and 4 when the Auxiliary input is activated etc.

So, I seem to have solved my roadblock around switches, but somehow lost the ability to report binary_sensor state changes :man_facepalming:

I want to be able to do everything that the underlying protocol can do, via the serial interface, so having to add an external relay to trigger arming, etc is not going to be acceptable for me :slight_smile:

Current state is that I have figured out why my sensors were not reporting updates via the API or Web Server, despite logging them as updating. So “zones” should be working fine now, allowing monitoring of all the zone attributes one can see in Wintex.
Now I just need to add support for partitions and associated sensors, and then panel sensors, and switches to arm/disarm the panel.

2 Likes

evening,

Has anyone been able to compile this on the latest version of ESPHome? hoping to give this a spin on my Premier panel and cant seem to compile it?

src/esphome/components/wintex/wintex.cpp: In member function 'void esphome::wintex::WintexZone::setup(esphome::wintex::Wintex*, uint32_t, uint16_t, std::__cxx11::string)':
src/esphome/components/wintex/wintex.cpp:67:23: error: no matching function for call to 'esphome::wintex::WintexZone::set_name(std::__cxx11::string&)'
     set_name(zone_name);

Latest version of ESPHome

I’m afraid I haven’t been forward-porting/rebasing my changes for a while, didn’t know that anyone else cared :grimacing:

Will give it a go in the next day or so, and post here with any progress.

1 Like

Taken a brief look at it, it seems that the signature for EntityBase::set_name(name) has changed from (std::string name) to (char *name). Just need to see how the rest of the project has dealt with the cascading update required.

1 Like

I really appreciate you taking a look, I was going to give it a go this weekend. But my skill level would have taken me much longer than that to figure out that change :joy::joy:

I’ve had this book marked for over a year, finally have the hardware and time to give it a go :joy::sweat_smile:

Ok, so the actual change is really simple:

Change calls to set_name(name + "whatever") to set_name((name + "whatever").c_str()).

I’ll try and get those pushed in the next day or so.

1 Like