Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support

Hi All - is there a service that allows me to cause the alarm siren to sound? I was hoping to make a panic button or use a sensor to do this but it seems that alarm_control_panel.trigger doesn’t quite do what I expected it to do. e.g.

alias: Motion detected
description: 'Detected motion from a non-texecom sensor'
trigger:
  - platform: state
    entity_id: binary_sensor.motion_room_a
    to: 'on'
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: alarm_control_panel.house_alarm
        state: armed_away
      - condition: state
        entity_id: alarm_control_panel.house_alarm
        state: armed_night
action:
  - service: alarm_control_panel.alarm_trigger
    target:
      entity_id: alarm_control_panel.house_alarm
mode: single

Hi - I have some sensors wired directly off keypads; they are mapped to zones via the Texecom software and came in fine to HA. I also have sensors on an expander unit.

From a Texecom perspective I have always viewed these as part of the network as the operate in the same way as devices wired directly back to the main panel. They do need to be assigned a zone.

Kind regards,

Tom

Hi @dchesterton I’m still getting the following message and the system power and voltage reporting the same values again and again with no mqtt sensor updates on any of the detectors…This happens quite regularly and is only fixed by stopping the texecom2mqtt and restarting…Is there any way to detect this and restart the addon automatically. I’m not sure if there is any fundamental difference but I am using ComWifi on ComPort 3 of the alarm panel. Can you also tell me what error
Command 25 timed out (attempt 1, id: 86) is from the following log output
Many thanks

2021-06-16 10:31:09 - DEBUG: Updating system power...
2021-06-16 10:31:13 - DEBUG: Command 25 timed out (attempt 1, id: 86).
2021-06-16 10:31:16 - INFO: Kitchen PIR status changed to Active
2021-06-16 10:31:16 - DEBUG: Publishing to texecom2mqtt/zone/kitchen_pir: {"name":"Kitchen PIR","number":4,"areas":["A"],"status":1,"type":"Guard"}
2021-06-16 10:31:16 - DEBUG: Command 25 timed out (attempt 2, id: 86).
2021-06-16 10:31:20 - DEBUG: Command 25 timed out (attempt 3, id: 86).
2021-06-16 10:31:23 - DEBUG: Publishing to texecom2mqtt/power: {"battery_charging_current":18,"battery_voltage":14.05,"panel_current":549,"panel_voltage":14.19}
2021-06-16 10:31:59 - DEBUG: Updating system power...
2021-06-16 10:32:00 - DEBUG: Publishing to texecom2mqtt/power: {"battery_charging_current":18,"battery_voltage":14.05,"panel_current":549,"panel_voltage":14.19}
2021-06-16 10:32:49 - DEBUG: Updating system power...
2021-06-16 10:32:50 - DEBUG: Publishing to texecom2mqtt/power: {"battery_charging_current":18,"battery_voltage":14.05,"panel_current":549,"panel_voltage":14.19}
2021-06-16 10:33:39 - DEBUG: Updating system power...
2021-06-16 10:33:40 - DEBUG: Publishing to texecom2mqtt/power: {"battery_charging_current":18,"battery_voltage":14.05,"panel_current":549,"panel_voltage":14.19}
1 Like

I’m looking for something similar, so would be interested to see if there’s an answer.

alarm_control_panel.alarm_trigger doesn’t seem to work, with or without the panel code.

Anyone updated their SmartCOM to v3.01… and does it randomly drop off the network a few times a day?

Other devices on the same switch (albeit a Unifi Flex… my standard rule is ‘if in doubt, blame unifi’ due to their various bugs ) don’t see an issue.

Texecom are being their usual ‘helpful’ selves.

In case anyone is interested in an alternative implementation, built entirely on OpenSource code, I have a very simple ESPHome component that currently reports zone statuses from a Premier 832 panel into HA.

Currently the UDL Pin is hard coded, but that is just a matter of adding a parameter to the config file.

The zones are configured in the ESPHome YAML, and appear in HA as binary_sensor.alarm_zone_01, etc, but can also have friendly names associated with them, which propagate through to HA too.

Let me know if anyone is interested in playing with this.

1 Like

Has anyone found a way to trigger the alarm from HA yet?

Thanks for the input Tom. I had the keypad circuits mapped to zones, but using the last assignable zones avalible on Wintex. I’ve since changed them for a lower circuit number (58-61, just after the last expander) and they’re now showing up!

I’ve still got the outstanding issue where my part arming from a keyswitch is reported as part_armed_undefined, has anyone else seen this, or can anyone suggest a possible fix?

Hello. Would someone be able to point me towards where i’ve gone wrong with this… this is my first venture into MQTT.

I have HA-OS on RPI with Mosquitto MQTT installed OK with default settings. The MQTT ‘switch’ test in the MQTT frontend appears to work and i see the topic in MQTT Explorer on my PC.

The texecom2mqtt appeared to install OK (Premier Elite 48 v4.00.24) with SmartCom - set up following guide and using defaults. Log shows successful connection to alarm, successful connection to MQTT and fetches Area and Zone data. The log updates on zone changes and alarm state changes.

I’m a bit lost of what i should do next to see these in HA. I have MQTT Discovery turned on but nothing has been discovered. I also don’t see these status changes in MQTT explorer or in HA when i listen to topic ‘#’

Here are my config & logs from Mosquitto and texecom2mqtt… any help appreciated!

logins: []
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

texecom:
  host: 192.168.x.x
  udl_password: 'xxxx'
mqtt:
  host: core-mosquitto
homeassistant:
  discovery: true
areas: []
zones: []

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] mosquitto.sh: executing... 
[13:53:36] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[13:53:37] INFO: Starting NGINX for authentication handling...
[13:53:38] INFO: Starting mosquitto MQTT broker...
1624802018: mosquitto version 1.6.12 starting
1624802018: |-- *** auth-plug: startup
[13:53:39] INFO: Successfully send discovery information to Home Assistant.
[13:53:40] INFO: Successfully send service information to the Supervisor.
1624802018: Config loaded from /etc/mosquitto/mosquitto.conf.
1624802018: Loading plugin: /usr/share/mosquitto/auth-plug.so
1624802018:  ├── Username/password checking enabled.
1624802018:  ├── TLS-PSK checking enabled.
1624802018:  └── Extended authentication not enabled.
1624802018: Opening ipv4 listen socket on port 1883.
1624802018: Opening ipv6 listen socket on port 1883.
1624802018: Opening websockets listen socket on port 1884.
1624802018: Warning: Mosquitto should not be run as root/administrator.
1624802018: mosquitto version 1.6.12 running
1624802018: New connection from 127.0.0.1 on port 1883.
1624802018: Socket error on client <unknown>, disconnecting.
1624802023: New connection from 172.30.32.1 on port 1883.
{"result": "ok", "data": {}}1624802023: New client connected from 172.30.32.1 as 4kqC3onaU66l6YajfUp0Ts (p2, c1, k60, u'mqtt').
1624802033: New connection from 172.30.33.4 on port 1883.
1624802033: New client connected from 172.30.33.4 as mqttjs_70cc8049 (p2, c1, k10).
1624802101: New connection from 172.30.32.2 on port 1883.
1624802101: Socket error on client <unknown>, disconnecting.
1624802221: New connection from 172.30.32.2 on port 1883.
1624802221: Socket error on client <unknown>, disconnecting.
1624802341: New connection from 172.30.32.2 on port 1883.
1624802341: Socket error on client <unknown>, disconnecting.
1624802380: Socket error on client 4kqC3onaU66l6YajfUp0Ts, disconnecting.
1624802448: New connection from 172.30.32.1 on port 1883.
{"result": "ok", "data": {}}1624802450: New client connected from 172.30.32.1 as 7ntGpIQcHv6LMZBCLzxedJ (p2, c1, k60, u'mqtt').
1624802461: New connection from 172.30.32.2 on port 1883.
1624802461: Socket error on client <unknown>, disconnecting.
1624802581: New connection from 172.30.32.2 on port 1883.
1624802581: Socket error on client <unknown>, disconnecting.
1624802701: New connection from 172.30.32.2 on port 1883.
1624802701: Socket error on client <unknown>, disconnecting.
1624802821: New connection from 172.30.32.2 on port 1883.

and

2021-06-27 13:53:51 - INFO: Starting texecom2mqtt v1.0.42...
2021-06-27 13:53:51 - INFO: Connected to alarm, sleeping for 1 second...
2021-06-27 13:53:52 - INFO: Connection ready
2021-06-27 13:53:53 - INFO: Fetched serial number: <redacted>
2021-06-27 13:53:53 - INFO: Logging in
2021-06-27 13:53:53 - INFO: Successfully logged in
2021-06-27 13:53:53 - INFO: Connected to MQTT
2021-06-27 13:53:53 - INFO: Fetched panel info: Premier Elite 48 (V4.00.24LS1)
2021-06-27 13:53:55 - INFO: Fetched Area A: House
2021-06-27 13:53:55 - INFO: Fetched Area B: Area B
2021-06-27 13:53:55 - INFO: Fetched Area C: Area C
2021-06-27 13:53:55 - INFO: Fetched Area D: Area D
2021-06-27 13:53:57 - INFO: Fetched Zone 9: XXXXXX (Type: Entry/Exit 1; Areas: A)
2021-06-27 13:53:57 - INFO: Fetched Zone 10: etc etc etc
2021-06-27 13:54:10 - INFO: Updating all zone states...
2021-06-27 13:54:10 - INFO: Updating all area states...
2021-06-27 13:54:10 - INFO: Application ready
2021-06-27 14:00:17 - INFO: XXX status changed to Active
2021-06-27 14:00:25 - INFO: XXX status changed to Secure
2021-06-27 14:10:36 - INFO: House status changed to In Exit
2021-06-27 14:10:46 - INFO: House status changed to Part Armed 1
2021-06-27 14:11:02 - INFO: House status changed to Disarmed

You need to configure your areas and zones as described in the configuration guide. Here is my working config:

texecom:
  host: 192.168.x.xxx
  udl_password: 'xxxxxxxx'
mqtt:
  host: mqtt://192.168.x.xxx
  username: texecom
  password: xxxxxxx
  client_id: xxxxxxx
  keepalive: 30
homeassistant:
  discovery: true
areas:
  - id: house
    full_arm: armed_away
    part_arm_1: armed_home
zones:
  - id: inner_doors
    device_class: door
  - id: external_bell
    device_class: sound
log: info
1 Like

Thanks RogTP, will give it a go!

Edit: Problem appeared to be the host - I changed it to the IP address mqtt://192.168.xxx.xxx and restarted and it all works fine.

I have the same problem mattlang, how do you find the IP address of the host?

I am running mosquitto broker as an add-on in home assistant so it’s the same IP as home assistant with default port 1883

Yes that’s what I thought and I have the same setup but I get this: ERROR: Unhandled rejection - Error: connect ECONNREFUSED 192.168.2.X

When I have core-mosquitto as host it seems all fine and is identical to yours above including the socket error for 172.30.32.2 which I was wondering what it was

This “error” is normal and relates to the supervisor checking if the add-on is still responding as part of a health check. This is expected. The 172 address is an internal IP: Unknown client connecting to MQTT broker · Issue #51603 · home-assistant/core · GitHub

As for your other issues I would suggest doing what I did and post formatted config and log files for the community to scrutinise

OK so here goes, I’ve changed homeassistant to a new static IP on router and added in with this config for texecom2mqtt:

texecom:
host: 192.168.2.XX
udl_password: ‘1234’
port: 10001
mqtt:
host: mqtt://192.168.2.X
username: mqttuser
password: mqttuser
port: 1883
client_id: texecom2mqtt
homeassistant:
discovery: true
prefix: home-assistant
areas:
zones:

This is all I get from log when done this way

2021-06-28 20:40:36 - INFO: Starting texecom2mqtt v1.0.42…
2021-06-28 20:40:36 - INFO: Connected to alarm, sleeping for 1 second…
2021-06-28 20:40:37 - INFO: Connection ready
2021-06-28 20:40:37 - INFO: Fetched serial number: 1028327
2021-06-28 20:40:37 - INFO: Logging in
2021-06-28 20:40:38 - INFO: Successfully logged in

And doesn’t appear to show up in mqtt log

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] mosquitto.sh: executing…
[21:20:42] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:20:43] INFO: Starting NGINX for authentication handling…
[21:20:43] INFO: Starting mosquitto MQTT broker…
1624911643: mosquitto version 1.6.12 starting
1624911643: |-- *** auth-plug: startup
[21:20:44] INFO: Successfully send discovery information to Home Assistant.
[21:20:44] INFO: Successfully send service information to the Supervisor.
1624911643: Config loaded from /etc/mosquitto/mosquitto.conf.
1624911643: Loading plugin: /usr/share/mosquitto/auth-plug.so
1624911643: ├── Username/password checking enabled.
1624911643: ├── TLS-PSK checking enabled.
1624911643: └── Extended authentication not enabled.
1624911643: Opening ipv4 listen socket on port 1883.
1624911643: Opening ipv6 listen socket on port 1883.
1624911643: Opening websockets listen socket on port 1884.
1624911643: Warning: Mosquitto should not be run as root/administrator.
1624911643: mosquitto version 1.6.12 running
1624911643: New connection from 127.0.0.1 on port 1883.
1624911643: Socket error on client , disconnecting.
1624911643: New connection from 172.30.32.1 on port 1883.
1624911643: New client connected from 172.30.32.1 as 1AQo3WGdyUuQD4612nYcAZ (p2, c1, k60, u’homeassistant’).
1624911691: New connection from 172.30.32.2 on port 1883.
1624911691: Socket error on client , disconnecting.
1624911811: New connection from 172.30.32.2 on port 1883.
1624911811: Socket error on client , disconnecting.
1624911931: New connection from 172.30.32.2 on port 1883.
1624911931: Socket error on client , disconnecting.
1624911954: New connection from 172.30.32.1 on port 1883.
1624911954: New client connected from 172.30.32.1 as 2XYyqv4x4fQYn9sf691JdA (p1, c1, k60, u’homeassistant’).
1624911954: Client 2XYyqv4x4fQYn9sf691JdA disconnected.
1624912051: New connection from 172.30.32.2 on port 1883.
1624912051: Socket error on client , disconnecting.
1624912171: New connection from 172.30.32.2 on port 1883.
1624912171: Socket error on client , disconnecting.
1624912291: New connection from 172.30.32.2 on port 1883.
1624912291: Socket error on client , disconnecting.
1624912411: New connection from 172.30.32.2 on port 1883.
1624912411: Socket error on client , disconnecting.
1624912531: New connection from 172.30.32.2 on port 1883.
1624912531: Socket error on client , disconnecting.

If I change the host to core-mosquitto then I get what appears to be a better outcome:

2021-06-28 20:43:12 - INFO: Starting texecom2mqtt v1.0.42…
2021-06-28 20:43:12 - INFO: Connected to alarm, sleeping for 1 second…
2021-06-28 20:43:13 - INFO: Connection ready
2021-06-28 20:43:13 - INFO: Fetched serial number: 1028327
2021-06-28 20:43:13 - INFO: Logging in
2021-06-28 20:43:14 - INFO: Successfully logged in
2021-06-28 20:43:14 - INFO: Connected to MQTT
2021-06-28 20:43:14 - INFO: Fetched panel info: Premier Elite 48 (V4.01.03LS1)
2021-06-28 20:43:15 - INFO: Fetched Area A: Area A
2021-06-28 20:43:15 - INFO: Fetched Area B: Area B
2021-06-28 20:43:15 - INFO: Fetched Area C: Area C
2021-06-28 20:43:15 - INFO: Fetched Area D: Area D
2021-06-28 20:43:15 - INFO: Fetched Zone 1: Entrance Lobby (Type: Guard Access; Areas: A)
2021-06-28 20:43:16 - INFO: Fetched Zone 2: Hallway (Type: Guard Access; Areas: A)
2021-06-28 20:43:16 - INFO: Fetched Zone 3: Living Room (Type: Guard; Areas: A)
2021-06-28 20:43:16 - INFO: Fetched Zone 4: Playroom (Type: Guard; Areas: A)
2021-06-28 20:43:17 - INFO: Fetched Zone 5: Master Bedroom (Type: Guard; Areas: A)
2021-06-28 20:43:17 - INFO: Fetched Zone 6: Guest Bedroom (Type: Guard; Areas: A)
2021-06-28 20:43:17 - INFO: Fetched Zone 7: Garage Door (Type: Entry/Exit 1; Areas: A)
2021-06-28 20:43:18 - INFO: Fetched Zone 9: Garage PIR (Type: Guard Access; Areas: A)
2021-06-28 20:43:18 - INFO: Fetched Zone 10: Stairwell Bottom (Type: Guard; Areas: A)
2021-06-28 20:43:18 - INFO: Fetched Zone 11: Bar PIR (Type: Guard; Areas: A)
2021-06-28 20:43:19 - INFO: Fetched Zone 12: Bar Rear DR (Type: Guard; Areas: A)
2021-06-28 20:43:19 - INFO: Fetched Zone 13: Bar Rear DR (Type: Guard; Areas: A)
2021-06-28 20:43:19 - INFO: Fetched Zone 14: Stairwell Top (Type: Guard; Areas: A)

Either way still don’t get any devices or entities showing in MQTT

Edited: I do however get a successful MQTT connection with this

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] mosquitto.sh: executing…
[21:44:19] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:44:20] INFO: Starting NGINX for authentication handling…
[21:44:20] INFO: Starting mosquitto MQTT broker…
1624913060: mosquitto version 1.6.12 starting
1624913060: |-- *** auth-plug: startup
[21:44:21] INFO: Successfully send discovery information to Home Assistant.
[21:44:21] INFO: Successfully send service information to the Supervisor.
1624913060: Config loaded from /etc/mosquitto/mosquitto.conf.
1624913060: Loading plugin: /usr/share/mosquitto/auth-plug.so
1624913060: ├── Username/password checking enabled.
1624913060: ├── TLS-PSK checking enabled.
1624913060: └── Extended authentication not enabled.
1624913060: Opening ipv4 listen socket on port 1883.
1624913060: Opening ipv6 listen socket on port 1883.
1624913060: Opening websockets listen socket on port 1884.
1624913060: Warning: Mosquitto should not be run as root/administrator.
1624913060: mosquitto version 1.6.12 running
1624913060: New connection from 127.0.0.1 on port 1883.
1624913060: Socket error on client , disconnecting.
1624913061: New connection from 172.30.32.1 on port 1883.
1624913061: New client connected from 172.30.32.1 as 1AQo3WGdyUuQD4612nYcAZ (p2, c1, k60, u’homeassistant’).
1624913081: New connection from 172.30.33.1 on port 1883.
{“result”: “ok”, “data”: {}}1624913081: New client connected from 172.30.33.1 as texecom2mqtt (p2, c1, k10, u’mqttuser’).
1624913131: New connection from 172.30.32.2 on port 1883.
1624913131: Socket error on client , disconnecting.

I’m not sure so maybe someone else has more ideas.

For diagnostics, I used MQTT Explorer on my Windows PC to check to confirm what traffic was being transmitted. It might help test your configurations - when the texecom2mqtt was working, I immediately saw the messages come in to MQTT explorer. Also if you click on the ‘configure’ button in the HA Mosquitto integration you can send test packets from HA which you should also see in MQTT explorer. I think this way you can see what bit isn’t communicating properly.

PS. Used the “</>” button for posting code as it retains the indentations which make it easier for others to diagnose code issues.

Thanks Matt, I shall have a look at explorer

I finally managed to get it working :slight_smile: and now a new challenge which hopefully is a simpler one… how do you get it to be available in Google Home/Assistant?

What do you want to do with your alarm in Google Home?

I’ll admit that I’ve removed all of the alarm-related integrations from my Google Home sync in HA for security reasons. Being able to set/unset an alarm by voice sounds a nice idea, but I’m not remotely comfortable with the security considerations of this so it’s not for me.