dchesterton/texecom2mqtt-hassio

Addon stops on connection timeout

Opened this issue ยท 22 comments

Describe the bug
My ComWIFI periodcally loses WiFi connectivity, when it does texecom2mqtt reports "connection timeout" and stops itself, despite me having the restart option turned on. So when the ComWIFI regains wifi I have to manually restart texecom2mqtt :(

When it encounters a timeout can it do an exponential backoff or something and keep retrying, instead of just dying

Application version
1.2.3

Texecom alarm type
Premier Elite 64

Home Assistant version
2022.8.4

Debug log
Will post next time it occurs, but a message to the effect of "connection to panel timed out"

I have the same issue, just now my addon was stopped for 6 days.

It's the same issue for me. Since receiving the August homeassistant updates the app stops very regularly and doesn't auto restart.

Hi, also getting the same issue, the error file showed, the following error. I've now got a script to restart it if the alarm becomes unavailable, but a recent update somewhere has upset something.
IMG_2756

I'm having this happen now at least once every other day. Any idea on what the issue is or anything I can log to help resolve?

I have experienced this as well - every couple days the texecom2mqtt stops and has to be manually restarted

version 1.2.3

home assistant 2022.7.7
ha os 8.4
Mosquito 6.1.3

mrwee commented

Same problem here.
Versions:
Home Assistant 2022.8.7
Supervisor 2022.08.6
Operating System 8.5
Frontend 20220802.0 - latest
Add-on: 1.2.3

Hi, also getting the same issue, the error file showed, the following error. I've now got a script to restart it if the alarm becomes unavailable, but a recent update somewhere has upset something. IMG_2756

I am also getting this exact same error.

Starts up immediately if I manually start the add-on.

OK so this isn't a fix but a workaround that saves me having to manually restart the service... if you put this into your automation yaml file the system will start the texecom2mqtt addon if the alarm is unavailable for 1 minute. You need to change your alarm entity_id and texecom2mqtt addon name as appropriate.

- id: restarttexecom
  alias: restarttexecom
  trigger:
  - platform: state
    entity_id: alarm_control_panel.house
    to: 'unavailable'
    for:
      minutes: 1
  condition: []
  action:
  - service: hassio.addon_start
    data:
      addon: c15a2434_texecom2mqtt
  mode: single

Even using an automation to restart the add-on doesn't work for me, the automation runs but looks like the add-on keeps falling over with the same error. Strangely when the alarm is armed it seems to be stable.

mrwee commented

That automation doesn't do it for me either :(. Still need to start it manually again.

Add-on still crashes quite a bit for me (multiple times per day), as I mentioned in my last post, the automation within Home Assistant hasn't worked for me either. I have found though, that creating an automation within node-red and looping it until the add-on is successfully running seems to at least have kept it running now for well over a week. I'm sure this could be achieved within Home Assistant but I find node-red easier to work with sometimes.

mrwee commented

Does anyone know if the integration has been abandoned by @dchesterton? He used to be very responsive in fixing stuff.
Hope he's all right.

He was pushing code on the 24th.... Perhaps we can send him some mince pies

Hey folks, I'm still here! I've got a 7-month old baby now so my spare time is very limited unfortunately. I will try and look at this at some point but I can't promise when.

mrwee commented

@dchesterton Wonderful to hear! Congrats! And I'm glad you're ok :)
Just bought you some cups of coffee, please buy some nice toy for the baby :)

Also got a 7 month old, I feel your pain :)

Bribes Coffees also given ๐Ÿ‘

I'm also having the same issue, but just setup this Automation to restart after X minutes
Simillar to the one above, but works by enabling the running status of the addon

https://www.youtube.com/watch?v=z3rBG0ioaPY

image

image

alias: Addon Texecom Delayed Restart
description: Restarts the texecom addon when it's been down more than 5 mins
trigger:
  - type: not_running
    platform: device
    device_id: 9c7869f797e49c960874b6070ce90ad5
    entity_id: binary_sensor.texecom2mqtt_running
    domain: binary_sensor
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  - service: hassio.addon_start
    data:
      addon: c15a2434_texecom2mqtt
mode: single
cjoha commented

I'm seeing this situation as well. But I have a comIP module, hardwired into my switch.

mrwee commented

I'm also having the same issue, but just setup this Automation to restart after X minutes Simillar to the one above, but works by enabling the running status of the addon

Doesn't work for me. The add-on doesn't restart :(

I'm also having the same issue, but just setup this Automation to restart after X minutes Simillar to the one above, but works by enabling the running status of the addon

Doesn't work for me. The add-on doesn't restart :(

Is there any trace information on the automation? It's been running for me a few weeks now.

2023-08-17 18:37:16 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
node:events:368
      throw er; // Unhandled 'error' event
      ^
Error: connect EHOSTUNREACH xxx.xxx.xxx.xxx:10001
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -113,
  code: 'EHOSTUNREACH',
  syscall: 'connect',
  address: 'xxx.xxx.xxx.xxx',
  port: 10001
}

Same issue every 4-5 days or so. SmartCom and ComIP (which this is connected to):

Error: connect EHOSTUNREACH 192.168.0.21:10001
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -113,
  code: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '192.168.0.21',
  port: 10001
}
2024-06-12 06:49:42 - INFO: Starting texecom2mqtt v1.2.3 (Node v16.13.0)...
node:events:368
      throw er; // Unhandled 'error' event
      ^

Manual restart was fine.

@dchesterton I know you were busy with life a year or two ago - is it likely that you will be able to put any more time into this to handle these exceptions gracefully? I know it's so difficult when you're a one-man integration dev! Many thanks.