question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFXTRX integration doesn't recover from a dropped network connection to an RFXTRX, requires HA restart

See original GitHub issue

The problem

I have an RFXTRX433 device, connected to Home Assistant via a tcp connection.

This works well in normal operation. However, if the TCP connection is interrupted due to a network issue (e.g. RFXTRX is at a remote location and broadband is interrupted), then Home Assistant loses connection to it. This state can’t currently be recovered from when the network connection is restored without restarting the whole of Home Assistant.

I suggest one of the following is considered:

  1. The RFXTRX integration with Home Assistant monitors the health of the TCP connection to the RFXTRX, and if it drops, attempts to restart it on a timer
  2. The RFXTRX integration exposes a rfxtrx.reconnect service which can be called by an automation (for example, one could detect a lack of rfxtrx events and use this to trigger the reconnect service)

Environment

  • Home Assistant Core release with the issue: 0.114.1
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.12
  • Integration causing this issue: RFXTRX
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/rfxtrx/

Problem-relevant configuration.yaml

rfxtrx:
  host: !secret rfxtrx_ip
  port: 2167
  automatic_add: true

Traceback/Error logs


Additional information

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
giejaycommented, Mar 15, 2022

Still a valid issue for me. Even reload does not work for me.

When sending a command to my cover:

  File "/usr/src/homeassistant/homeassistant/components/rfxtrx/cover.py", line 124, in async_open_cover
    await self._async_send(self._device.send_up2sec)
  File "/usr/src/homeassistant/homeassistant/components/rfxtrx/__init__.py", line 516, in _async_send
    await self.hass.async_add_executor_job(fun, rfx_object.transport, *args)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/RFXtrx/__init__.py", line 162, in send_up2sec
    self.send_command(transport, 0x11)
  File "/usr/local/lib/python3.9/site-packages/RFXtrx/__init__.py", line 130, in send_command
    transport.send(pkt.data)
  File "/usr/local/lib/python3.9/site-packages/RFXtrx/__init__.py", line 794, in send
    self.sock.send(pkt)
BrokenPipeError: [Errno 32] Broken pipe
2reactions
elupuscommented, Mar 31, 2021

Still valid

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFXTRX Integration and HA reboot problem? - Configuration
I have noticed that my HA instance has started to restart fairly regularly after a few days of stability.
Read more >
Help! Home Assistant Won't Restart! (7 Possible Solutions)
1. Check the address · 2. Power cycle your server · 3. Ping your Home Assistant server · 4. Check your configuration with...
Read more >
0.113.0b3 New rfxtrx-integration restores switch state to last ...
The problem Trying the new rfxtrx integration with state restoration, at HA restart the switch state is always restored to last state ...
Read more >
Home Assistant | I am trying to add 433 mhz switches through ...
Instructions on how to integrate RFXtrx switches into Home Assistant. ... to the previous working (for me) version doesn't help restore functionality.
Read more >
MDM lost mode no wifi connection a… - Apple Developer
It looks like the device is in a special "Lost Mode". Is this normal? How can I disable the lost mode now, when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found