Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support

I have successfully installed the Texecom2mqtt add on into my HA pi, and can see successfully connectivity to my premier elite 48 panel in the log, however I’m not getting anything appear in Ha itself, on the configuration tab in texecom2mqtt this is the yams export, am I missing something?
texecom:

  host: 192.168.10.32
  udl_password: "1234”
  port: 10001
mqtt:
  host: mqtt://core-mosquitto:1883
  port: 1883
  prefix: texecom2mqtt
  username: mqqtt
  password: mqqtt
  client_id: texecom2mqtt
  keepalive: 30
  clean: true
  retain: true
  retain_log: false
  qos: 2
  reject_unauthorized: true
  discovery: true
homeassistant:
  discovery: true
  prefix: home-assistant
areas:
  - id: house
    name: House Alarm
    full_arm: armed_away
    part_arm_1: armed_night
    part_arm_2: armed_home
    part_arm_3: armed_custom_bypass
    code_arm_required: true
    code_disarm_required: true
    code: "8795"
  - id: ...
    name: ...
zones:
  - id: front_door
    name: Front Door Sensor
    device_class: motion
  - id: ...
    name: ...
cache: true
log: debug

Are you seeing something like this in your log?:

2022-09-13 19:40:19 - INFO: Connected to MQTT broker: core-mosquitto:1883 (retain: true, clean: true, client_id: texecom2mqtt, qos: 0)

My working config looks like this:

texecom:
   host: redacted
   udl_password: " redacted91"
 mqtt:
   host: mqtt://core-mosquitto
   username:  redacted
   password:  redacted
   client_id: texecom2mqtt
   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

You have 1883 as port both in the host part as well as port part.

In the username/password part you state ‘mqqtt’ Is this correct? (if you use authentication)

Have you looked at the broker? (e.g MQTT Explorer)

Well spotted mrhass, I have removed from the host section and it still connects fine. Yes I created a new mqqtt user with admin role and will change once I have it up and running. Mqqt explorer I haven’t got that installed.

Yes that is in the log:

2022-09-14 13:58:45 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
2022-09-14 13:58:45 - INFO: Connected to alarm, sleeping for 2 seconds...
2022-09-14 13:58:47 - DEBUG: Executing serial number command
2022-09-14 13:58:47 - INFO: Connection ready
2022-09-14 13:58:47 - INFO: Logging in to panel
2022-09-14 13:58:47 - INFO: Successfully logged in to panel
2022-09-14 13:58:49 - INFO: Connected to MQTT broker: core-mosquitto:1883 (retain: true, clean: true, client_id: texecom2mqtt, qos: 2)

I can see it’s connected fine to my control panel, it lists all the zones, devices etc in the log but what do I do next I thought as I have discovery on it would simply put all in to Ha. What do I do next?

You don’t need to do anything else, there should be a single device named after your alarm model (eg Texecom Premier Elite 64).

I think probably your prefix’s need to be the same between mqtt and homeassistant. I don’t have those parameters and it works fine.

I think home assistant mqtt broker is listening for ‘homeassistant’. I would suggest getting mqtt explorer and see what you are publishing.

MQTT autodiscovery in Hass is default set to the ‘homeassistant’ topic, so in the config it’s set to “home-assistant” which won’t work with default settings.

Yep, you have copied the example from the GitHub site, unfortunately the value shown against that prefix would be non-working in a default ha site. If you haven’t changed your ha mqtt default, then you don’t need to include that value (or some of the others that are optional).

Right thanks for your help all, I think I’m getting somewhere now, I took out all of the none required settings out of my config and restarted, now I can see all of the alarm devices under Mosquitto broker inc the control panel itself. Can I set/unset the alarm from within Ha? can I see the status of the alarm? Can I get notification when the alarm is set/unset or alarm activated?

Hi all,

I understand in future versions of HA, I need to switch Sensor: Platform MQTT configuration.yaml to mqtt: sensor: etc.

I’ve tried to switch the config but it’s not working. Can someone help me understand where I’m going wrong?

Old Working Config

  - platform: mqtt
    name: "Alarm Logged In By"
    state_topic: "texecom2mqtt/log"
    value_template: "{{ value_json.entity.user_name }}"
    
  - platform: mqtt
    name: "MQTT Alarm Logged In By - Last Updated"
    state_topic: "texecom2mqtt/log"
    device_class: timestamp
    #value_template: "{{ value_json.timestamp }}"
    value_template: >-
          {{ value_json.timestamp.strftime('%Y-%m-%dT%H:%M:%S') }}Z

New Code which doesn’t seem to work

mqtt:
  sensor:
    name: "Alarm Logged In By"
    state_topic: "texecom2mqtt/log"
    value_template: "{{ value_json.entity.user_name }}"
    
    name: "MQTT Alarm Logged In By - Last Updated"
    state_topic: "texecom2mqtt/log"
    device_class: timestamp
    #value_template: "{{ value_json.timestamp }}"
    value_template: >-
          {{ value_json.timestamp.strftime('%Y-%m-%dT%H:%M:%S') }}Z

Thanks in advance!

Your yaml construction is wrong. It should look like this, which is for a different mqtt entity but same principle, note the hyphen before name which identifies each grouping of attributes.

mqtt:
  sensor:
    - name: "TC Electricity Instant"
      state_topic: "SMART/HILD/84F3EB180551"
      unit_of_measurement: 'W'
      value_template: "{{ value_json['elecMtr']['0702']['04']['00']|int(base=16) }}"
      icon: 'mdi:flash'

Thanks @RogTP. That sorted it!

Hello all - I’m trying to connect my texecom alarm to HomeAssistant but am unable to do a successful connection. I am new to homeassistant, mosquito brokers and texecom2mqtt, so I might not be doing something right.

This is what my log in texecom2mqtt looks like when I “Start” texecom2mqtt:

2022-10-08 13:40:23 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
2022-10-08 13:40:23 - INFO: Connected to alarm, sleeping for 2 seconds...
2022-10-08 13:40:25 - DEBUG: Executing serial number command
2022-10-08 13:40:29 - DEBUG: Command serial timed out (attempt 1, id: serial).
2022-10-08 13:40:29 - TRACE: Received data chunk of length 7
2022-10-08 13:40:29 - INFO: Connection ready
2022-10-08 13:40:29 - INFO: Logging in to panel
2022-10-08 13:40:29 - TRACE: Executing command 1
2022-10-08 13:40:29 - DEBUG: Panel socket closed
2022-10-08 13:40:29 - INFO: Panel disconnected, exiting now

My yaml looks like this. It is pretty short right now as I wanted to get the connection going first before adding zones and areas and other optional details. The udl_password I got from my alarm company contact and I put that 5 digit number in quotes. I think that my host IP is correct because logs do say “connecting to alarm…sleeping for 2 seconds…” but I am not 100% sure.

texecom:
  host: 192.168.x.x
  udl_password: "five_digit_number_my_alarm_contact_gave"
mqtt:
  host: core-mosquitto
  username: username_that_i_made_while_setting_mosquitto_broker
  password: password_that_i_made_while_setting_mosquitto_broker
homeassistant:
  discovery: true
areas: []
zones: []
cache: true
log: trace

Any help you can provide will be greatly appreciated. Is my host wrong, or udl_password or something else? Thank you in advance!

For your mqtt config:

  • you have a DNS pointing ‘core-mosquitto’ to your broker?
  • Have you tried testing your broker with e.g. MQTT Explorer? (Same host, username, password as your config)

For texecom config:

  • You are connecting to a ComIP which has nothing else connected, right?

Hi,

I’m having an issue where the panel disconnects after around 3 minutes of uptime. I can’t see anyone else reporting this issue which is a bit concerning. Error below:
2022-10-09 19:15:40 - DEBUG: Updating system power…
2022-10-09 19:15:40 - WARNING: Panel returned NAK response when getting power
2022-10-09 19:15:40 - DEBUG: Closing connection to panel
2022-10-09 19:15:40 - DEBUG: Closed connection to panel
2022-10-09 19:15:40 - INFO: Panel disconnected, exiting now

I’ve posted the issue (with some extra details) here: Add-on crashes shortly after Panel returned NAK response when getting power · Issue #73 · dchesterton/texecom2mqtt-hassio · GitHub - though it seems like issues haven’t been answered for months on there so hoping someone else might be able to help (is the addon maintained anymore?)

Thanks very much

Thanks for coming back.
mqtt config:
-I do use openDNS so now I’m testing with direct IP instead of “host: core-mosquitto”. in the config, now I’m using IP address of homeassistant, which is currently 192.168.2.106. But, no change
-when I use the IP address from previous bullet in mqtt explorer with credentials, I do see connection established, so I hope that means that the credentials are ok. Screenshot below
mqttexplorer

texecom config:
-i do use Texecom’s app on my phone as well with my alarm. if that’s the issue, i dont know how to disconnect that.

my current config file looks like this:

texecom:
  host: 192.168.2.18
  port: 10001
  udl_password: "five_digit_number"
mqtt:
  host: mqtt://192.168.2.106:1883
  username: username_that_works_fine_in_mqtt_explorer
  password: password_that_works_fine_in_mqtt_explorer
homeassistant:
  discovery: true
areas: []
zones: []
cache: true
log: trace

Still, log file says this:
2022-10-09 20:26:55 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)…
2022-10-09 20:26:55 - INFO: Connected to alarm, sleeping for 2 seconds…
2022-10-09 20:26:57 - DEBUG: Executing serial number command
2022-10-09 20:27:00 - DEBUG: Command serial timed out (attempt 1, id: serial).
2022-10-09 20:27:00 - TRACE: Received data chunk of length 7
2022-10-09 20:27:00 - INFO: Connection ready
2022-10-09 20:27:00 - INFO: Logging in to panel
2022-10-09 20:27:00 - TRACE: Executing command 1
2022-10-09 20:27:00 - DEBUG: Panel socket closed
2022-10-09 20:27:00 - INFO: Panel disconnected, exiting now

Again, I’m really new to all this so I might not have even understood the questions properly.

Just log out of the app. But assuming you have the smartcom reporting back to Texecom you really need to get a separate device (e.g. comip) for HA to use. The Smartcom doesn’t like communicating in two directions at the same time.

That said I would expect that it would log in on occasion. Have you connected using the ip you are trying using Wintex? That would prove if the ip and url work.

Hi,

I am getting the following error when connecting to my Texecom Elite Com-IP from within HomeAssistant.

I have checked that the UDL password is correct (2711) and that the default port 10001 is used by the alarm management company. I have used the default HA mosquitto broker add-on and have used the credentials below to successfully connect using MQTT Explorer.

Any other input gratefully received.

2022-10-10 10:06:17 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)…
2022-10-10 10:06:17 - INFO: Connected to alarm, sleeping for 2 seconds…
2022-10-10 10:06:19 - INFO: Connection ready
2022-10-10 10:06:19 - INFO: Logging in to panel
2022-10-10 10:06:19 - INFO: Successfully logged in to panel
2022-10-10 10:06:49 - ERROR: Could not connect to MQTT broker

Here’s my config file (keeping it simple to get initial setup working)

texecom:
  host: 192.168.1.28
  udl_password: "2711"
mqtt:
  host: mqtt://homeassistant.local
  port: 1883
  user: mqttuser
  password:redacted
  client_id: texecom2mqtt
  keepalive: 30
homeassistant:
  discovery: true
areas: []
zones: []