dchesterton / texecom2mqtt-hassio

Home Assistant add-on. Connect to Texecom Premier Elite alarm panels and publish updates to MQTT. Supports arming/disarming as well as zone updates and alarm events.
https://hub.docker.com/r/dchesterton/texecom2mqtt
MIT License
51 stars 9 forks source link

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

Open metaljay opened 5 days ago

metaljay commented 5 days ago

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 commented 5 days ago

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