Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support

Looking at this some more, I think the add-on exposes an event to HASS via MQTT. There is a list of available events on the info page of the add-on. So I think it should be possible to catch the event. It would however be good if the battery info was exposed as a battery sensor. I’ve not successfully listened to them yet, but I’ll continue to play.

EDIT: I should add I’ve listened to other texecom2mqtt events, just not log events yet.

fyi - I believe a sensor could be created from the MQTT events using the HA MQTT Integration (MQTT Sensor - Home Assistant). That said, I don’t know exactly what the event is that would indicate the low battery and how it is formatted, so I’ve currently written some NodeRed to monitor for events with ‘Battery’ in them. I expect it will be a year…

ComIP added on Com3 via ComPort+, in addition to the SmartCom (not shown):

HA integration switched over to the new IP address, tested and verified. Will now monitor to see what happens…

Looking for some advice, i’m a total newbie to HA and struggling to get this working.

I’ve installed the add on and installed MQTT but may have missed a few things along the way.

I’m getting this error on the logs:

2021-11-14 15:46:59 - INFO: Starting texecom2mqtt v1.1.6…
2021-11-14 15:46:59 - INFO: Connected to alarm, sleeping for 1 second…
2021-11-14 15:47:00 - INFO: Connection ready
2021-11-14 15:47:00 - INFO: Fetched serial number: XXXXXXX
2021-11-14 15:47:00 - INFO: Logging in
2021-11-14 15:47:01 - INFO: Successfully logged in
2021-11-14 15:47:01 - ERROR: Unhandled rejection - Error: ENOENT: no such file or directory, open ‘/cert/ca.pem’
at Object.openSync (fs.js:458:3)
at Object.openSync (pkg/prelude/bootstrap.js:505:32)
at Object.readFileSync (fs.js:360:35)
at Object.readFileSync (pkg/prelude/bootstrap.js:758:36)
at MQTT.connect (/snapshot/app/dist/mqtt/mqtt.js:195:31)
at /snapshot/app/dist/index.js:72:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)

So i’ve fixed the above and the MQTT is connected to texecom2mqtt. The logs are showing that the zones are being fetched correctly however I’m missing an entity - I’ve checked the MQTT is showing are discoverable and no default prefix’s have been changed.

This is my config:

texecom:
  host: 192.168.x.xx
  udl_password: 'xxxx'
  port: 10001
mqtt:
  host: 192.168.0.xx
  port: 1883
  prefix: texecom2mqtt
  username: xx
  password: xx
  client_id: texecom2mqtt
  keepalive: 30
  retain: true
  retain_log: false
  qos: 2
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: false
    code_disarm_required: false
    code: 'xxxx'
zones:

And the logs are as follows:

2021-11-15 15:58:13 - INFO: Starting texecom2mqtt v1.1.6...
2021-11-15 15:58:13 - INFO: Connected to alarm, sleeping for 1 second...
2021-11-15 15:58:14 - INFO: Connection ready
2021-11-15 15:58:14 - INFO: Fetched serial number: xxxx
2021-11-15 15:58:14 - INFO: Logging in
2021-11-15 15:58:14 - INFO: Successfully logged in
2021-11-15 15:58:14 - INFO: Connected to MQTT
2021-11-15 15:58:14 - INFO: Fetched panel info: Premier Elite 64 (V4.02.01LS1)
2021-11-15 15:58:15 - INFO: Fetched Area A: House Alarm
2021-11-15 15:58:15 - INFO: Fetched Area B: Area B
2021-11-15 15:58:15 - INFO: Fetched Area C: Area C
2021-11-15 15:58:15 - INFO: Fetched Area D: Area D
2021-11-15 15:58:18 - INFO: Fetched Zone 9: Keypad (Type: Entry/Exit 1; Areas: A)
2021-11-15 15:58:18 - INFO: Fetched Zone 10: Front Door (Type: Guard; Areas: A)
2021-11-15 15:58:19 - INFO: Fetched Zone 11: Hall PIR (Type: Guard; Areas: A)
2021-11-15 15:58:19 - INFO: Fetched Zone 12: Front Lounge PIR (Type: Guard; Areas: A)
2021-11-15 15:58:19 - INFO: Fetched Zone 13: Rear Lounge PIR (Type: Guard; Areas: A)
2021-11-15 15:58:20 - INFO: Fetched Zone 14: Patio Doors (Type: Guard; Areas: A)
2021-11-15 15:58:20 - INFO: Fetched Zone 15: Kitchen PIR (Type: Guard; Areas: A)
2021-11-15 15:58:20 - INFO: Fetched Zone 16: Back Door (Type: Entry/Exit 1; Areas: A)
2021-11-15 15:58:20 - INFO: Fetched Zone 17: Landing PIR (Type: Guard; Areas: A)
2021-11-15 15:58:21 - INFO: Fetched Zone 18: Zone 18 (Type: Custom; Areas: A)
2021-11-15 15:58:35 - INFO: Updating all zone states...
2021-11-15 15:58:35 - INFO: Updating all area states...
2021-11-15 15:58:35 - INFO: Application ready

Have you checked if it’s posted to the MQTT Broker with e.g. MQTT Explorer?

Was hoping someone could help me. I am trying to disarm the alarm via homekit. But it just spins, as it probably requires the code to be entered, any idea where I can put the code in the config.
My texecom config is -

texecom:
    host: 192.168.0.xx # Required: Texecom panel IP address
    udl_password: "xxxx" # Optional: UDL password programmed in the panel. Note: this is NOT the code used to arm/disarm the panel (default: 1234)
    port: 1001 # Optional: port used to connect to the panel (default: 10001)

mqtt:
    host: xxxxxx # Optional: broker URL or IP address (default: localhost)
    port: 1883 # Optional: broker port (default: 1883 or 8883 for TLS connections)
    prefix: texecom2mqtt # Optional: topic prefix to use (default: texecom2mqtt)
    username: xxxx # Optional: broker user (default: none)
    password: xxxxx # Optional: broker password (default: none)
    client_id: texecom2mqtt # Optional: client ID (default: random)
    keepalive: 30 # Optional: keepalive in seconds (default: 10)
    retain: true # Optional: retain (default: true)
    retain_log: false # Optional: retain on log messages (default: false)

homeassistant:
    discovery: true # Optional: enable Home Assistant discovery (default: false)
    prefix: homeassistant # Optional: Home Assistant MQTT topic prefix (default: homeassistant)

areas:
    - id: A
      name: House Alarm
      full_arm: armed_away
      part_arm_1: armed_night
      part_arm_2: armed_home
      code_arm_required: false
      code_disarm_required: true
      code: "xxxx"

log: debug 

My HA config is - configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

`# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml`

Any help will be much appreciated.
Thanks

I’ve bought and installed a ComWiFI via Com3 but I’m now stuck with the below.

I’ve connected the ComWiFI to my wifi

2021-11-26 16:14:26 - INFO: Starting texecom2mqtt v1.1.6...
2021-11-26 16:14:26 - INFO: Connected to alarm, sleeping for 1 second...
2021-11-26 16:14:28 - INFO: Connection ready
2021-11-26 16:14:28 - INFO: Fetched serial number: XXXXXX
2021-11-26 16:14:28 - INFO: Logging in
2021-11-26 16:14:28 - ERROR: Could not log in
2021-11-26 16:14:28 - INFO: Connected to MQTT
2021-11-26 16:14:28 - ERROR: write after end
2021-11-26 16:14:32 - ERROR: This socket has been ended by the other party

Given it’s fetching the serial number, the IP details must be correct, i know the UDL password is correct, so whats up?

Do I need to configure the ComWiFi inside the panel somehow?

Configuration:

texecom:
  host: 192.168.xxx.yyyy
  udl_password: 'zzzz'
mqtt:
  host: core-mosquitto
homeassistant:
  discovery: true
areas: []
zones: []

I’ve set Com 3 as a ComIP via texecom cloud:

I’ve set Com 3 up the same as Com 2:

Am i missing a setting to allow logging in/comms via the comwifi?

Update

I can connect via Wintex using the ip/udl password from my configuration above.

ComWifi firmware is version 1.0.05, is there an update? can someone point me at an official source if so?

My own config looks like this. I see you are missing the port, so might be worth adding explicitly:

texecom:
  host: 192.168.x.x
  udl_password: <password>
  port: 10001
mqtt:
  host: 192.168.x.x
  port: 1883
  username: <username>
  password: <password>
  client_id: texecom2mqtt

Thanks, but explicitly setting the port didn’t change anything.

I’ve noticed im on firmware: Elite 64 V5.00.03 LS1

When I try to upgrade it via Texecom Cloud I get:

Last upgrade: [upgrade_status] PanelFW: CRM logon failed - UDL passcode error

Anyone know what that means and how to fix it?

Start with Site Management → Diagnostics. Will give you a good idea of what’s working and what isn’t!

FWIW, mine is an Elite 48 - V5.04.01 LS.

Ha what an idiot, I’d left my phone connected to the ComWifi’s AP (which was still activated, put it into just STA mode now).

Seems this was upsetting things, despite allowing Wintex to work :man_shrugging:

Thank you Daniel for making this add-on available.

I have been using this for some time now and it’s been working like a charm all along. About a week ago it all of a sudden stopped working, and I can for all the tea in China not figure out how to get it up and running again. Since it stopped working I have updated the app to v2 and also Wintex to 7.2.3 to be able to login again. When I start the add-on the log (debug log level) is this:

2021-12-06 19:24:57 - INFO: Starting texecom2mqtt v1.1.7...
2021-12-06 19:24:57 - ERROR: connect ECONNREFUSED 192.168.1.205:10001
2021-12-06 19:24:57 - DEBUG: Panel socket closed
2021-12-06 19:24:57 - INFO: Panel disconnected, exiting now

Is there anyone who can point me in the right direction? How do I open the panel socket?! I am lost here and am really missing the convenience of having lights go on triggered by PIR or activating/deactivating the alarm when we leave the house and come back.

Do you just have a smartcom or that plus a comip? Do you connect from wintex via ip or via smart connect (or whatever it is called)? Have you disconnected wintex before starting the addon? That last question may not matter depending on answers to the first two, but if only smartcom and connect via ip, the wintex connection will lockout the addon connection.

Thanks for your reply. I do have both a smartcom and a ComIP set up. Wintex I connect through the smartcom and Wintex is not connected when I try to connect from the add-on.

I connect via my ComWifi and it got stuck a few weeks ago, I think I logged into it and restarted it, I imagine it is the same with the ComIP. Depends whether you connect the addon via it. You can also reset the SmartCom by taking the front off and holding down a button, I forget which. There is a thread a posted on the Texecom forum asking about it.

Also you could try connecting wintex via the same route you use for the addon, if it connects then the problem is likely with your addon config.

Hi All,

I’ve been struggling with the integration but resolved most issues. I now have a config related issue. I’ve tried various config syntax but there seems to be multiple versions floating around here.

this is my config:

texecom:
    host: 192.168.0.124
    udl_password: "123456"
    port: 10001

mqtt:
    host: localhost
    port: 1883
    prefix: texecom2mqtt
    username: name
    password: password
    client_id: texecom2mqtt
    keepalive: 10
    retain: true
    retain_log: false
    qos: 0

homeassistant:
    discovery: true
    prefix: "homeassistant"

areas:
    - id: House
      name: house
      full_arm: armed_away
      part_arm_1: night_time_arm
      part_arm_2: dogs_home_arm
      part_arm_3: not_used
      code_arm_required: true
      code_disarm_required: true
      code: '123456'
    - id: Garage
      name: garage
      full_arm: armed_away
      part_arm_1: night_time_arm
      part_arm_2: dogs_home_arm
      part_arm_3: not_used
      code_arm_required: true
      code_disarm_required: true
      code: '123456'

log: trace # Optional: trace, debug, panel, info, warning or error (default: info)

This is the error I get:

(node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'match' of undefined

    at /snapshot/app/node_modules/better-ajv-errors/lib/modern/helpers.js:26:53

    at Array.forEach (<anonymous>)

    at makeTree (/snapshot/app/node_modules/better-ajv-errors/lib/modern/helpers.js:21:13)

    at _default (/snapshot/app/node_modules/better-ajv-errors/lib/modern/helpers.js:116:16)

    at _default (/snapshot/app/node_modules/better-ajv-errors/lib/modern/index.js:27:45)

    at validate (/snapshot/app/dist/config.js:58:24)

    at Object.loadConfig (/snapshot/app/dist/config.js:41:16)

    at /snapshot/app/dist/index.js:11:29

    at Object.<anonymous> (/snapshot/app/dist/index.js:74:3)

    at Module._compile (pkg/prelude/bootstrap.js:1433:22)

(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will t

If I remove the areas section, it runs, so there’s something astray with that section.

Any thoughts?

Thanks!

Not sure if its case sensitive or not, but yours seems to be backwards to the example in the documentation:

    - id: house # Required: area number or ID (e.g. 'detached_garage', '4A' or '2')
      name: House Alarm # Optional: override the area name (default: area name in panel)

Other than that, I think you’d have to check the area names against the panel/Wintex, or try with the area numbers as the ID instead?

I just tried swapping the capitalisation and then tried both lower case and same error.

Tried id of A and 1 for the first and B and 2 for the second - same error.

In Wintex, the area text is set as:
“House”
and
“Garage”

and the part arm text is:
“Night Time Arm”
“Dogs Home Arm”
“Not Used”

Not sure what the full arm line should be though?

Thanks

Yours looks more or less the same as mine:

areas:
  - id: house
    name: House Alarm
    full_arm: armed_away
    part_arm_1: armed_night
    part_arm_2: armed_home
    code_arm_required: true
    code_disarm_required: true
    code: '1234'
  - id: garage
    name: Garage Alarm
    full_arm: armed_away
    part_arm_1: armed_night
    part_arm_2: armed_home
    code_arm_required: true
    code_disarm_required: true
    code: '1234'

I notice you have four spaces before the “-” on your first array item. YAML is a stupid syntax, so could this be the cause? (I only have two spaces on mine)