Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Corrupt response from panel: Unexpected start, expected 't', got 0x22 #97

Open
metaljay opened this issue Sep 21, 2024 · 13 comments
Open
Assignees

Comments

@metaljay
Copy link

Describe the bug
Everything works as expected for a few hours, then I receive the below log. If I reboot the container a few times or the raspberry pi it sorts its self out but super weird?
As an aside, is there a way to shorten the amount of time before another MQTT alert can be sent? i.e. I have notifications for if a sensor is triggered, but I need to wait awhile before it detects and sends the notification. I thought it might be a dwell time but nothing obvious

Texecom alarm type
Premier Elite 23

Home Assistant version
N/A - Docker

2024-09-21 13:54:57 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
2024-09-21 13:54:57 - INFO: Connected to alarm, sleeping for 2 seconds...
2024-09-21 13:54:59 - DEBUG: Fetched data from cache
2024-09-21 13:54:59 - INFO: Connection ready
2024-09-21 13:54:59 - INFO: Logging in to panel
2024-09-21 13:55:00 - ERROR: Corrupt response from panel: Unexpected start, expected 't', got 0x22
2024-09-21 13:55:00 - DEBUG: Closing connection to panel
2024-09-21 13:55:00 - DEBUG: Closed connection to panel
2024-09-21 13:55:00 - DEBUG: Panel socket closed
2024-09-21 13:55:00 - INFO: Panel disconnected, exiting now
2024-09-21 13:55:11 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
2024-09-21 13:55:11 - INFO: Connected to alarm, sleeping for 2 seconds...
2024-09-21 13:55:13 - DEBUG: Fetched data from cache
2024-09-21 13:55:13 - INFO: Connection ready
2024-09-21 13:55:13 - INFO: Logging in to panel
2024-09-21 13:55:17 - DEBUG: Command 1 timed out (attempt 1, id: 0).
2024-09-21 13:55:20 - DEBUG: Command 1 timed out (attempt 2, id: 0).
2024-09-21 13:55:24 - DEBUG: Command 1 timed out (attempt 3, id: 0).
2024-09-21 13:55:27 - DEBUG: Command 1 timed out (attempt 4, id: 0).
2024-09-21 13:55:31 - DEBUG: Command 1 timed out (attempt 5, id: 0).
2024-09-21 13:55:31 - ERROR: Unhandled rejection - Command 1 timed out 5 times and could not be completed

Here is my config:

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

mqtt:
    host: 192.168.2.254 # 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: XXXX # Optional: broker password (default: none)
    client_id: texecom2mqtt # Optional: client ID (default: texecom2mqtt)
    keepalive: 30 # Optional: keepalive in seconds (default: 60)
    clean: true # Optional: clean session (default: true)
    retain: true # Optional: retain (default: true)
    retain_log: false # Optional: retain on log messages (default: false)
    qos: 2 # Optional: QoS (default: 0)
    reject_unauthorized: true # Optional: if not false, the server certificate is verified against the list of supplied CAs. Override with caution (default: true when using TLS)

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

# Optional: required only if you want to override a zone name or device class
zones:
    - id: 1 # Required: zone number or ID (e.g. 'front_door' or '4')
      name: Hallway # Optional: override the zone name (default: zone name in panel)
      device_class: motion # Optional: set the Home Assistant device class for a zone (default: the app will guess based on zone name and type). See https://www.home-assistant.io/integrations/binary_sensor/#device-class for available device classes
    - id: 2
      name: Lounge
      device_class: motion
    - id: 3
      name: Kitchen
      device_class: motion
    - id: 4
      name: Garage
      device_class: motion
    - id: 5
      name: Landing
      device_class: motion

# Optional: required only for Home Assistant mapping
areas:
    - id: 1 # 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)
      full_arm: armed_away # Optional: mappings of Texecom arm types to Home Assistant arm types (armed_away, armed_home, armed_night, armed_custom_bypass, armed_vacation), omit any which are not relevant
      part_arm_1: armed_night
      part_arm_2: armed_home
      part_arm_3: armed_custom_bypass
      code_arm_required: false # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code_arm_required
      code_disarm_required: false # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code_disarm_required
      code: "XXXX" # Optional: see https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#code

cache: true # Optional: cache panel data instead of loading it each time. Recommended if using a larger panel and/or your data will not change (default: false)
log: debug # Optional: trace, debug, panel, info, warning or error (default: info)
@metaljay
Copy link
Author

@RogerSelwyn wasn't sure if you get notifications anymore?

@michaelmarconi
Copy link

Ditto here @metaljay: I'm getting them so frequently (start-up, alarm mode change, etc) that it's rendered the integration useless for me:

  • ERROR: Corrupt response from panel: Unexpected start, expected 't', got 0x34
  • ERROR: Corrupt response from panel: Unexpected start, expected 't', got 0xd0
  • ERROR: Corrupt response from panel: Unexpected start, expected 't', got 0x53

Always followed by: INFO: Panel disconnected, exiting now

Assume you didn't get anywhere with this?

@metaljay
Copy link
Author

metaljay commented Oct 18, 2024

I didn't, I ended up switching to a different plugin that works quite well instead. I am mainly using apple devices so I use homebridge (as well as HA).

https://github.com/K1LL3R234/homebridge-texecom

Works perfectly for me, allows me to arm and disarm plus see triggers which help with automations.

I am using a ESP8266 and ser2net as my comport 3. (im leaving smartcom on 1 and 2). I raised an issue in that plugin around the packet data being sent which was causing errors but now everything works perfectly!

@michaelmarconi
Copy link

Thanks @metaljay; I'd prefer to remain in Home Assistant but I'll investigate that as an option...

@lodesmets
Copy link

@metaljay With that option, you control the alarm panel with apple homekit? Or also with HA?

@metaljay
Copy link
Author

@metaljay With that option, you control the alarm panel with apple homekit? Or also with HA?

Correct, I see everything in HomeKit (via homebridge)

I can then toggle automations from HomeKit (where I run out of for most my stuff anyway)

IMG_1047

@lodesmets
Copy link

@metaljay With that option, you control the alarm panel with apple homekit? Or also with HA?

Correct, I see everything in HomeKit (via homebridge)

I can then toggle automations from HomeKit (where I run out of for most my stuff anyway)

IMG_1047

Does that one work for you? Because for me the sync is only 1 way.
So if I arm the alarm through the panel, the change doesn't show up in homebridge

@lodesmets
Copy link

@dchesterton sorry to bother you, but is there really no way you can open-source the source code so we can take a look at the issues?
By now there are a couple other integrations for homekit that also open sourced their code

@metaljay
Copy link
Author

metaljay commented Jan 3, 2025

@dchesterton sorry to bother you, but is there really no way you can open-source the source code so we can take a look at the issues? By now there are a couple other integrations for homekit that also open sourced their code

He won’t reply, I also donated to him with a message asking him to to reply to the thread. Doesn’t reply on twitter either

@metaljay
Copy link
Author

metaljay commented Jan 3, 2025

@metaljay With that option, you control the alarm panel with apple homekit? Or also with HA?

Correct, I see everything in HomeKit (via homebridge)
I can then toggle automations from HomeKit (where I run out of for most my stuff anyway)
IMG_1047

Does that one work for you? Because for me the sync is only 1 way. So if I arm the alarm through the panel, the change doesn't show up in homebridge

Just tested, yes it shows up in homekit if I manually set on the panel
IMG_1400

@lodesmets
Copy link

Damn, I will look further, because for me the sync is only 1 way

@lodesmets
Copy link

I was able to extract the "code" from the container. But sadly it looks like it is compiled, so not easily to decompile/make our own version

@michaelmarconi
Copy link

I’ve tried that too @lodesmets; it’s been obfuscated to honour Mr Chesterton’s obligation to the NDA they made him sign.

I tried asking for the documentation myself but the request was rejected, as they don’t want “hobbyists” with the documentation, a stance I find both unreasonable and objectionable.

I’ve subsequently been in touch with the fractional CTO for Texecom who promised me he’d talk to their product people but hadn’t replied to multiple requests since then.

At this point I only see a few options:

  1. We attempt to reverse-engineer the protocol ourselves (time-consuming!)
  2. We put in a mass communication to the CEO asking them to open-source an SDK or make the wretched documentation available.

Security via obscurity is BS in my opinion anyway; if they want to make sure it’s secure, let us rip it apart and find the issue I say…

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants