Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support

The HA log file is rotated into home-assistant.log.1 in your config folder upon restart.

Got it working! But don’t know why! Had to switch the MQTT port from 1884 (which had been working fine until recently) to 1883 and now I can see all the sensor states. I did also change the static IP assigned to the alarm but after only that change it was still giving me errors stating it couldn’t connect to MQTT so I figured I’d play around with those settings. Any idea what the difference is between using 1884 and 1883 and why one would suddenly stop working? Is 1884 better and is it worth me trying to figure out how to get that working again?

The server listens on the following ports:

  • 1883 : MQTT, unencrypted, unauthenticated
  • 1884 : MQTT, unencrypted, authenticated

Source: https://test.mosquitto.org

So it would suggest that perhaps the MQTT credentials were wrong, as you’re now connecting on the unauthenticated port.

Thanks, I’ll have another check of the credentials but I’m fairly certain I’d not touched those either so perhaps after one of the recent HA updates something has changed that might mean I need to recreate the user. Is there somewhere independent of the Texecom addin where I can check whether the MQTT login is working on port 1884? Thanks for all your help so far, I’m pleased to have finally got things back up and running!

I use MQTT Explorer on a Mac, seems to be versions for other OS

I didn’t see any subsequent posts on this topic, so I’m assuming you gave up?

I had the exact same problem as you described.

I couldn’t see anything wrong with my Mosquitto setup in HA and had no problems connecting to it otherwise (with MQTT explorer, both locally and remotely). But Texecom2mqtt just would not connect.

In the end I replaced Mosquitto with EMQX (which is in the built in Home Assistant Community Add-Ons Repository) and it worked perfectly.

Hope that helps!

Many thanks Sean! I’ll give that a try some time… You’re right. I gave up, but you’ve given me some hope!

I thought I’d have a go at replacing core broker work EMQX, looks like Frenck had only created it quite recently. I use a pair to communicate between to HA instances, can’t get EMQX to connect to core broker, gets a protocol error (and to be honest I found I was always getting protocol errors so have basic unencrypted comms at the moment).

I plan to try the other way round over the next few days.

Firstly, Excellent integration, thank you for all your hard work.

I have a small issue, that somebody may be able to help with.

I have a Door Contact sensor (Ricochet type) that shows up in Texecom2mqtt as a PIR sensor for some reason. It shows in Wintex as a type=cntct so not sure why. Debug log below:

2022-12-01 08:22:06 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
2022-12-01 08:22:08 - INFO: Connected to alarm, sleeping for 2 seconds...
2022-12-01 08:22:10 - DEBUG: Executing serial number command
2022-12-01 08:22:10 - INFO: Connection ready
2022-12-01 08:22:10 - INFO: Logging in to panel
2022-12-01 08:22:11 - INFO: Successfully logged in to panel
2022-12-01 08:22:11 - INFO: Connected to MQTT broker: 192.168.5.173:1883 (retain: true, clean: true, client_id: texecom2mqtt, qos: 0)
2022-12-01 08:22:11 - DEBUG: Publishing to texecom2mqtt/status: online
2022-12-01 08:22:11 - INFO: Serial number: 1060301
2022-12-01 08:22:11 - INFO: Panel: Premier Elite 64 (V5.00.03LS1)
2022-12-01 08:22:11 - INFO: Fetched Area A: Area A
2022-12-01 08:22:11 - INFO: Fetched Area B: Area B
2022-12-01 08:22:11 - INFO: Fetched Area C: Area C
2022-12-01 08:22:11 - INFO: Fetched Area D: Area D
2022-12-01 08:22:14 - INFO: Fetched Zone 9: Living Room PIR (Type: Guard; Areas: A)
2022-12-01 08:22:15 - INFO: Fetched Zone 10: Front Door Contact (Type: Entry/Exit 1; Areas: A)
2022-12-01 08:22:15 - INFO: Fetched Zone 11: Sounder (Type: Custom; Areas: A)
2022-12-01 08:22:15 - INFO: Fetched Zone 12: Sounder (Type: Custom; Areas: A)
2022-12-01 08:22:16 - INFO: Fetched Zone 13: Kitchen door Contact (Type: Guard; Areas: A)
2022-12-01 08:22:16 - INFO: Fetched Zone 14: Garage Frnt DoorContact (Type: Guard; Areas: A)
2022-12-01 08:22:16 - INFO: Fetched Zone 15: Office PIR (Type: Guard; Areas: A)
2022-12-01 08:22:24 - INFO: Fetched Zone 40: Zone 40 (Type: Guard; Areas: A)
2022-12-01 08:22:32 - DEBUG: Publishing to texecom2mqtt/status: online
2022-12-01 08:22:32 - DEBUG: Publishing to texecom2mqtt/power: {"battery_charging_current":9,"battery_voltage":13.63,"panel_current":207,"panel_voltage":13.63}
2022-12-01 08:22:32 - INFO: Updating all zone states...
2022-12-01 08:22:32 - INFO: Updating all area states...
2022-12-01 08:22:33 - DEBUG: Received area flags: 000000000000000000000000000000000f00000000000000000f000000ff00000f000000000000000000000000000000000000000000000000000000000000000000000100000000
2022-12-01 08:22:33 - DEBUG: Received area flags for Area A (1): 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/living_room_pir: {"name":"Living Room PIR","number":9,"areas":["A"],"status":0,"type":"Guard"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/front_door_contact: {"name":"Front Door Contact","number":10,"areas":["A"],"status":0,"type":"Entry/Exit 1"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/sounder: {"name":"Sounder","number":11,"areas":["A"],"status":0,"type":"Custom"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/sounder: {"name":"Sounder","number":12,"areas":["A"],"status":0,"type":"Custom"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/kitchen_door_contact: {"name":"Kitchen door Contact","number":13,"areas":["A"],"status":0,"type":"Guard"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/garage_frnt_doorcontact: {"name":"Garage Frnt DoorContact","number":14,"areas":["A"],"status":0,"type":"Guard"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/office_pir: {"name":"Office PIR","number":15,"areas":["A"],"status":0,"type":"Guard"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/zone/zone_40: {"name":"Zone 40","number":40,"areas":["A"],"status":0,"type":"Guard"}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/area/area_a: {"id":"A","name":"Area A","number":1,"status":"disarmed"}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/alarm_control_panel/texecom2mqtt/area_a/config: {"name":"Area A","state_topic":"texecom2mqtt/area/area_a","command_topic":"texecom2mqtt/area/area_a/command","unique_id":"texecom2mqtt.area.area_a","value_template":"{% set values = {\"in_entry\":\"pending\",\"in_exit\":\"arming\",\"disarmed\":\"disarmed\",\"triggered\":\"triggered\",\"full_armed\":\"armed_away\",\"part_armed_1\":\"armed_home\"} %}{{ values[value_json.status] }}","payload_disarm":"disarm","json_attributes_topic":"texecom2mqtt/power","payload_arm_away":"full_arm","payload_arm_home":"part_arm_1","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/living_room_pir/config: {"name":"Living Room PIR","state_topic":"texecom2mqtt/zone/living_room_pir","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.living_room_pir","json_attributes_topic":"texecom2mqtt/zone/living_room_pir","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/front_door_contact/config: {"name":"Front Door Contact","state_topic":"texecom2mqtt/zone/front_door_contact","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"door","unique_id":"texecom2mqtt.zone.front_door_contact","json_attributes_topic":"texecom2mqtt/zone/front_door_contact","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/sounder/config: {"name":"Sounder","state_topic":"texecom2mqtt/zone/sounder","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.sounder","json_attributes_topic":"texecom2mqtt/zone/sounder","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/sounder/config: {"name":"Sounder","state_topic":"texecom2mqtt/zone/sounder","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.sounder","json_attributes_topic":"texecom2mqtt/zone/sounder","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/kitchen_door_contact/config: {"name":"Kitchen door Contact","state_topic":"texecom2mqtt/zone/kitchen_door_contact","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"door","unique_id":"texecom2mqtt.zone.kitchen_door_contact","json_attributes_topic":"texecom2mqtt/zone/kitchen_door_contact","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/garage_frnt_doorcontact/config: {"name":"Garage Frnt DoorContact","state_topic":"texecom2mqtt/zone/garage_frnt_doorcontact","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.garage_frnt_doorcontact","json_attributes_topic":"texecom2mqtt/zone/garage_frnt_doorcontact","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/office_pir/config: {"name":"Office PIR","state_topic":"texecom2mqtt/zone/office_pir","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.office_pir","json_attributes_topic":"texecom2mqtt/zone/office_pir","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt/zone_40/config: {"name":"Zone 40","state_topic":"texecom2mqtt/zone/zone_40","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"texecom2mqtt.zone.zone_40","json_attributes_topic":"texecom2mqtt/zone/zone_40","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/status","qos":0,"device":{"name":"Texecom Premier Elite 64","identifiers":"1060301","manufacturer":"Texecom","model":"Premier Elite 64","sw_version":"V5.00.03LS1"}}
2022-12-01 08:22:33 - DEBUG: Publishing to texecom2mqtt/config: {"version":"1.2.3","log_level":"debug","model":"Premier Elite 64","firmware_version":"V5.00.03LS1","serial_number":"1060301"}
2022-12-01 08:22:33 - INFO: Application ready

From the documentation for the add-on:

device_class: motion # Optional: set the Home Assistant device class for a zone (default: the app will guess based on zone name and type).

I don’t believe that Texecom allow you to distinguish between a PIR and a door contact (at least, there’s no way to configure it in my Wintex), so this add-on “guesses” based on the name of the sensor. If you rename the zone to something containing “door” it will probably report correctly. Otherwise, just override it in the add-on config:

zones:
  - id: zone_40
    device_class: door

This should sort it out.

1 Like

Much appreciated. I completely missed that in the docs

The Ricochet wireless sensors report their type back to Wintex, and its show on the bottom right of the zone page, but looking through the debug logs, its probably not reported outside of that, so it makes sense. The name does contain Door, but its one word “DoorContact” so it fits.

1 Like

As an alternative I’ve just installed a Konnected.io Interface Kit. This leaves the alarm as is (and you could have the ComIP still installed if you wish, hooked up to texecom2mqtt), and just taps into the zones.

It gives me slightly less flexibility in arming and doesn’t give wide variety of events that t2m will give. But unlike the ComWiFi (which I have to use because of my boards location), it is stable on the network and if it does drop off doesn’t crash anything. Over the recent weeks my ComWiFi has disconnected incessantly and a couple of times need me to open the alarm up and unplug/replug it. Clearly this isn’t good for t2m, and t2m crashes 1/2 dozen times a day (I have an automation that restarts it if crashed).

I’m favouring stability over functionality in this case, which is a shame because t2m provides everything you might want. I can probably do all I want with the straight Konnected Alarm Panel, but I have Ricochet devices, and those won’t work with the Konnected device.

If anyone wants a write up on how to install the Konnected kit, let me know. Don’t want to post it straight here because this is a Texecom thread.

GitHub - mikestir/alarm-server: MQTT bridging server for Texecom Premier alarm systems could also be an option. Have not tried it though

Interesting as a way of getting events.

Tried to set this up, but two problems:

  • I’m not sure the code can interpret the notifications coming from the board, or I don’t know how to configure the board to send the right messages.
  • It blocks notifications to the connect App

The only protocol I could get anything sent to the listener on was Texecom Connect, anything else configured via Windex resulted in no communication. This maybe because communication was via the Smartcom and it won’t talk anything else.

Regular pings were sent when configured to Texecom Connect, but the code base just reported them as invalid. Very occasionally I’d get a partially valid message, but in theory it should have had an account number in it, but that was empty.

So I’ve given up for now. I do know someone who has written a Texecom Connect comms package, and would probably comment as to whether the data looks like it can be interpreted, but his code looks complex and I think is more than I want to bother with. And of course he is under NDA.

This works well for me on the whole, except every few days the add on stops working. I am using the official texecom app on the SmartCom and this add on is running on ComIp. Below is what the log shows when the add on stops running. Any ideas?

2023-01-04 12:59:21 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)…
2023-01-04 12:59:41 - INFO: Connected to alarm, sleeping for 2 seconds…
2023-01-04 12:59:42 - ERROR: read ECONNRESET
2023-01-04 12:59:42 - INFO: Panel disconnected, exiting now

I think it happens sometimes when the comip is handling multiple concurrent connections. You should be able to enable watchdog on the add-on which will automatically restart it in the event of exit.

Settings → add-ons → Texecom2Mqtt:

Except that if it fails to restart a few time Supervisor gives up. I wrote a (node-red) automation that ran every 5 minutes to restart it if it was in an errored state. In my view the add-on should not fail if it loses connectivity, in an IoT world connectivity loss is to be expected, it should reconnect when it can.

I also think it doesn’t wait long enough, presumably for connections to time out, before it tries to restart - I ended up disabling the watchdog, then restarting after 5 minutes of unavailable seemed to do the trick for me.

… although I have to add, since I rebuilt my supervised installation from Ubuntu → Debian 11 supported, I’ve re-enabled watchdog (out of curiosity) and I actually haven’t woken up to any ‘unavailable’ states, so far anyway.

I rebuilt on Debian some time ago. I have monitoring for worrying messages in supervisor and core logs, and regularly saw this add-on failing. I also monitor for unavailable and restored entities, again plenty of times I got them. I blame it on the unreliability of the ComWiFi, and it is much more reliable since I removed it.