Remote component start up has become unreliable

Since first starting with HA over 8 months ago one of my most reliable components has been the iTach remote.

I have two iTach Flex units with three devices on one and four devices on the other. For each device there are many, many codes. All were working perfectly up until a month or so ago.

Now every time I restart HA one or two devices will stop working (no IR code sent to the iTach Flex). The device that does not work is random. Another restart of HA and they all may work or a different device will stop working. Usually only one or two devices stop working, all the the other devices still work. There is nothing wrong with the iTach units. I can still connect to them with putty and successfully send the codes manually for the devices that are not functioning in HA.

I had a look at the history of this component and it seems quite a bit of clean up work started about this time.

In particular the need to supply a device and entity id was removed. So I changed all 180 of my remote calls from scripts like this:

lounge_tv_menu:
  sequence:
  - service: remote.send_command
    data:
      entity_id: remote.lounge_tv
      command: "Menu"
      device: remote.lounge_tv

To this:

lounge_tv_menu:
  sequence:
  - service: remote.send_command
    data:
      entity_id: remote.lounge_tv
      command: "Menu"

It has made no difference.

I have been trying to fix this for well over a month without success and the random nature of the failed devices and the fact that I can still manually control the devices via the iTach with putty is pointing me to a problem with the component.

Is anyone else experiencing issues with the iTach component or any of the remote components?

Could you post any logs you have from when its failing to send?

I noticed it was not working this morning after a restart last night. Restarted again twice then it was working again. There is nothing relevant in the log.

Do you recall which HA version you upgraded to when the problem started?

Sorry , no I do not.

It was quite a subtle fault, only one or two random devices not working so I did not notice when exactly it started.

A couple of log entries that may be relevant:

2018-11-03 21:11:24 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for remote.lounge_tv (<class 'homeassistant.components.remote.itach.ITachIP2IRRemote'>) took 0.528 seconds. Please report platform to the developers at https://goo.gl/Nvioub

2018-11-03 21:04:41 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.

Just happened again and I got the same warning:

websocket connection is closing.

The weird thing is it is only one device through the iTach that stops working. I would have thought all of them would stop working if the websocket closed.

I’ll look into this more and see if I can find out anything

Thanks Alan. It must be some sort of race/timing issue on start up. I was getting it to occur pretty consistently - once every three restarts. Now that I have moved to an external database it seems to be happening less. Though that could be anecdotal as I am restarting less at the moment.

Sorry this is all very vague. Is there a debug log I can start fot this component?

Could you post your full config? I’m wondering what other devices you may have enabled along with the itach.

Not there. Its huge.

Have sent you a PM.