Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support

Hi Daniel - Discovery is working fine on my docker install, but I cannot activate the alarm from HA. I have 4 areas so not sure if this is the reason, but all 4 areas are displayed and mapped correctly.

I can set up alerts in HA and automations on PIR activation so it’s just this that doesn’t work

Premier Elite 64
Firmware: V5.02.01LS1

Any ideas?

Probably worth posting your config so people can check if there are obvious issues. Do obscure password/etc of course.

1 Like

Ok, I finally have it working again, I had at one point changed my UDL to a 6 digit number, I have changed it back to a 4 digit number and it has now connected again, I didn’t expect that this would be an issue, surely not everyone has a 4 digit UDL ?

I also put a delay on ATS path faults to 5 minutes, no idea if that has made any difference though.

Happy to hear you have it working again! I haven’t had time nor patience to look at this for some time so I really appreciate you coming back here with your progress. When you say you changed your UDL back to a 4 digit number, what is it exactly that you are referring to? My UDL password is way longer than 4 digits and has always been, so I suspect you are referring to something else.

Hi Herbert, I got the original issue fixed (that we both had ‘ECONNREFUSED’) by upograding the firmware and defaulting my panel. I then had another issue where it kept saying that it could not log in to the panel. That was when I changed my UDL back to a 4 digit and it worked, I’ve no idea why that would be as I’m sure you and many others use more than 4 digits.

1 Like

I am a trying to use the Texecom sensors to trigger other things (lights etc), but I am new to HA and struggling.

This is the data from my door sensor…

{
    "name": "Front Door",
    "number": 1,
    "areas": [
        "A"
    ],
    "status": 1,
    "type": "Entry/Exit 1"
}

However I can’t see any relevant equivalent to the status which changes from 0 to 1 when the door opens.

Does anyone have a blueprint for Texecom or can give me a steer please?
Any help gratefully received.

EDIT: I fixed this no attribute needed!!

Sure. Here’s my config for a door sensor that turns the heating off if any external door has been open for 5 minutes:

- id: heating_off_if_door_open
  alias: Turn heating off if doors left open
  trigger:
  - platform: state
    entity_id:
    - binary_sensor.back_door
    - binary_sensor.patio_door
    - binary_sensor.front_door
    from: 'off'
    to: 'on'
    for: 00:05:00
  condition:
  - condition: state
    entity_id: climate.heating
    state:
    - heat
    - auto
  action:
  - service: script.heating_disable
  - service: notify.mobile_app
    data_template:
      message: Heating disabled due to open {{ trigger.to_state.attributes.friendly_name }}

You can’t edit this particular one in the UI (I don’t think the multiple-entities trigger is supported yet), but a similar state trigger for a single entity might look like this:

1 Like

Thanks so much @daern very helpful!

I think the front door binary sensor should change from on to off when it opens (or the other way round). Is that not what you are after?

@RogTP I was using the wrong syntax 1 and 0 not on and off! Thanks

1 Like

Thanks Craig, I finally took myself the time to sort this out. I registered for a cloud account and updated the firmware of the SmartCom from v03.03.03 to v04.00.11 and that made the difference.

What a hero - Daniel this is a superb integration and one I have been looking for for a while.

After some initial success I’m having a couple of challenges and would welcome some pointers as all the discovered devices seem to be “Unavailable” on my dashboard and I don’t understand why from the log below.

Also periodically my Texecom panel will advise audibly and on the keypad that the com port has gone into fault. Are these two issues linked??

Form the Texecommqtt log everything appears fine and all devices are discovered as you would expect. The only thing here is that the PA Audible device is not a regoniosed type (no big deal)

2022-03-05 10:00:46 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)…
2022-03-05 10:00:47 - INFO: Connected to alarm, sleeping for 2 seconds…
2022-03-05 10:00:49 - INFO: Connection ready
2022-03-05 10:00:49 - INFO: Logging in to panel
2022-03-05 10:00:49 - INFO: Successfully logged in to panel
2022-03-05 10:00:50 - INFO: Connected to MQTT broker: 192.168.1.86:1883 (retain: true, clean: true, client_id: texecom2mqtt, qos: 0)
2022-03-05 10:00:50 - INFO: Serial number: XXXXXX
2022-03-05 10:00:50 - INFO: Panel: Premier Elite 64 (V5.06.00LS1)
2022-03-05 10:00:51 - INFO: Fetched Area A: The House
2022-03-05 10:00:51 - INFO: Fetched Area B: The Garden
2022-03-05 10:00:51 - INFO: Fetched Area C: Area C
2022-03-05 10:00:51 - INFO: Fetched Area D: Area D
2022-03-05 10:00:51 - INFO: Fetched Zone 1: Front Door (Type: Entry/Exit 1; Areas: A)
2022-03-05 10:00:52 - INFO: Fetched Zone 2: Master Bedroom (Type: PA Audible; Areas: A)
2022-03-05 10:00:56 - INFO: Fetched Zone 9: Rear Patio Doors (Type: Entry/Exit 1; Areas: A)
2022-03-05 10:00:57 - INFO: Fetched Zone 11: Patio Sensor (Type: Moment Key; Areas: B)
2022-03-05 10:00:58 - INFO: Fetched Zone 12: Rear Siren (Type: Custom; Areas: A)
2022-03-05 10:01:00 - INFO: Fetched Zone 17: Toilet (Type: Guard; Areas: A)
2022-03-05 10:01:01 - INFO: Fetched Zone 18: Landing (Type: Guard; Areas: A)
2022-03-05 10:01:01 - INFO: Fetched Zone 19: Kitchen (Type: Guard; Areas: A)
2022-03-05 10:01:02 - INFO: Fetched Zone 20: Living Room (Type: Guard; Areas: A)
2022-03-05 10:01:02 - INFO: Fetched Zone 21: Utilty Door (Type: Guard; Areas: A)
2022-03-05 10:01:03 - INFO: Fetched Zone 22: Hallway (Type: Guard Access; Areas: A)
2022-03-05 10:01:03 - INFO: Fetched Zone 23: Study (Type: Guard; Areas: A)
2022-03-05 10:01:04 - INFO: Fetched Zone 25: Rear Fence (Type: Moment Key; Areas: B)
2022-03-05 10:01:05 - INFO: Fetched Zone 27: Garage Door (Type: Entry/Exit 1; Areas: A)
2022-03-05 10:01:06 - INFO: Fetched Zone 28: Driveway (Type: Moment Key; Areas: B)
2022-03-05 10:01:27 - INFO: Updating all zone states…
2022-03-05 10:01:27 - INFO: Updating all area states…
2022-03-05 10:01:28 - INFO: Application ready

From the Mosquitto Log.

[09:59:57] INFO: Successfully send discovery information to Home Assistant.
[09:59:57] INFO: Successfully send service information to the Supervisor.
1646474396: Config loaded from /etc/mosquitto/mosquitto.conf.
1646474396: Loading plugin: /usr/share/mosquitto/auth-plug.so
1646474396: ├── Username/password checking enabled.
1646474396: ├── TLS-PSK checking enabled.
1646474396: └── Extended authentication not enabled.
1646474396: Opening ipv4 listen socket on port 1883.
1646474396: Opening ipv6 listen socket on port 1883.
1646474396: Opening websockets listen socket on port 1884.
1646474396: Warning: Mosquitto should not be run as root/administrator.
1646474396: mosquitto version 1.6.12 running
1646474396: New connection from 127.0.0.1 on port 1883.
1646474396: Socket error on client , disconnecting.
1646474398: New connection from 172.30.32.1 on port 1883.
{“result”: “ok”, “data”: {}}1646474398: New client connected from 172.30.32.1 as 70M9DkcoyiMgn4Loticcxe (p2, c1, k60, u’mqtt’).
1646474415: New connection from 172.30.32.1 on port 1883.
1646474415: New client connected from 172.30.32.1 as texecom2mqtt (p2, c1, k60).

Showing the client is connected yet as i say the devices and areas in my dashboard remain “Unavailable”

Any support is greatly appreciated.

Thanks

Are you using a Smartcom to access the panel. I found when doing this, the connection would fail occasionally. It was better when I ran a constant ping against it, but that was just a hack. I now use a ComWiifi (but you could use ComIP) for HA, and leave the Smartcom for Texecom App/Wintex/etc. That has proved to be much more stable.

Hi there, I was originally using the smartcom but decided to add the ComWiFi to com3 for the purposes of this integration.

I have been through the “monitor hardware” functions looking to disable com part monitoring in a bid to eradicate the error but this isn’t sadly a feature of the panel software.

Hello

I’m running Home Assistant via QNAP docker so I do not have a supervisor install option. Do you have any pointer on manual installation?

Thanks for any help in advance.

Stu

Hi, I’ve had a ComIP installed for texecom2mqtt access in addition to the SmartCom for the Texecom app, but I still get garbage out of the panel from time to time causing texecom2mqtt to restart:

2022-04-15 07:08:42 - ERROR: Corrupt response from panel: CRC 227 is invalid (message: 744d08db015700e3)
2022-04-17 12:19:00 - ERROR: Corrupt response from panel: CRC 48 is invalid (message: 744d081a19150130)
2022-04-20 06:53:20 - ERROR: Corrupt response from panel: CRC 122 is invalid (message: 744d0657197a)

Is this something others see as well or can it be avoided?

And is it coincidence that the previous message logged immediately before the corrupt response is the same?

2022-04-15 07:08:42 - DEBUG: Updating system power...
2022-04-17 12:19:00 - DEBUG: Updating system power...
2022-04-20 06:53:20 - DEBUG: Updating system power...

Hi Daniel,

I had the alarm trigger today and I did not get the notification so I am looking at my config, I have changed as follows

alias: TEXECOM ALARM TRIGGERED
description: ''
trigger:
  - platform: mqtt
    topic: texecom2mqtt/1184708/area/house_alarm
condition:
  - condition: template
    value_template: '{{ trigger.payload_json[''status''] == ''triggered'' }}'
action:
  - service: persistent_notification.create
    data_template:
      message: >-
        {{ trigger.payload_json['last_active_zone']['name'] if
        trigger.payload_json['last_active_zone'] else 'Unknown' }}
      title: Alarm Triggered
  - service: notify.mobile_app_sm_g998b
    data_template:
      message: >-
        {{ trigger.payload_json['last_active_zone']['name'] if
        trigger.payload_json['last_active_zone'] else 'Unknown' }}
      title: Alarm Triggered
mode: single

and this is my log output.

2022-04-20 16:48:17 - INFO: Serial number: 1184708,
2022-04-20 16:48:18 - INFO: Panel: Premier Elite 24 (V5.06.00LS1),
2022-04-20 16:48:18 - INFO: Fetched Area A: House Alarm,
2022-04-20 16:48:18 - INFO: Fetched Area B: Area B,

previously it was set to area_a, I have changed it to house_alarm

Is this right and without triggering the alarm should this now work and notify?

Regards,

CRC failures are a known problem with the Texecom panels. See this post, which explains the problem: Texecom2mqtt: Texecom alarm panel and MQTT integration with HA support - #462 by marshn

This may be what you are seeing?

Missed that post - very interesting. Some gems of info her that I had also missed!

Many thanks to everyone who has contributed.