texecom2mqtt-hassio icon indicating copy to clipboard operation
texecom2mqtt-hassio copied to clipboard

Addon stops on connection timeout

Open trullock opened this issue 2 years ago • 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"

trullock avatar Aug 23 '22 07:08 trullock

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

joaobarros avatar Aug 26 '22 12:08 joaobarros

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

simonlock avatar Aug 26 '22 13:08 simonlock

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

dtpmca avatar Aug 31 '22 11:08 dtpmca

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?

dtpmca avatar Sep 01 '22 15:09 dtpmca

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

bodlang avatar Sep 02 '22 18:09 bodlang

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

mrwee avatar Sep 09 '22 21:09 mrwee

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.

cwelsh1812 avatar Oct 18 '22 11:10 cwelsh1812

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

bodlang avatar Oct 18 '22 13:10 bodlang

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.

cwelsh1812 avatar Nov 04 '22 16:11 cwelsh1812

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

mrwee avatar Nov 10 '22 18:11 mrwee

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.

cwelsh1812 avatar Dec 27 '22 14:12 cwelsh1812

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.

mrwee avatar Dec 28 '22 09:12 mrwee

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

trullock avatar Dec 28 '22 12:12 trullock

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.

dchesterton avatar Dec 28 '22 16:12 dchesterton

@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 :)

mrwee avatar Dec 28 '22 17:12 mrwee

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

~Bribes~ Coffees also given 👍

trullock avatar Dec 29 '22 07:12 trullock

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

peteclarkez avatar Feb 01 '23 22:02 peteclarkez

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

cjoha avatar Feb 08 '23 21:02 cjoha

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 :(

mrwee avatar Feb 09 '23 21:02 mrwee

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.

peteclarkez avatar Feb 19 '23 21:02 peteclarkez

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
}

trullock avatar Aug 17 '23 19:08 trullock

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.

pgale avatar Jun 12 '24 08:06 pgale