Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializing RFXCOM RFXtrx after Home Assistant (re)start doesn't work #110480

Closed
roelvdwater opened this issue Feb 13, 2024 · 4 comments
Closed

Comments

@roelvdwater
Copy link

The problem

I have an RFXCOM RFXtrx433XL and I'm using the RFXCOM RFXtrx integration to control my roller shutters. This works great, but after (re)starting Home Assistant, it happens sometimes that the integration doesn't load. After reloading the integration manually, everything works normally.

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

RFXCOM RFXtrx

Link to integration documentation on our website

https://www.home-assistant.io/integrations/rfxtrx/

Diagnostics information

config_entry-rfxtrx-a8c6be9137de953f2512220190df14d5.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 16:12:12 (1 occurrences)
Last logged: 16:12:12

Error setting up entry RFXTRX for rfxtrx
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/rfxtrx/__init__.py", line 93, in async_setup_entry
    await async_setup_internal(hass, entry)
  File "/usr/src/homeassistant/homeassistant/components/rfxtrx/__init__.py", line 170, in async_setup_internal
    rfx_object = await hass.async_add_executor_job(_create_rfx, config)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/rfxtrx/__init__.py", line 140, in _create_rfx
    rfx = rfxtrxmod.Connect(
          ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/RFXtrx/__init__.py", line 978, in __init__
    self.transport = transport_protocol(device)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/RFXtrx/__init__.py", line 779, in __init__
    self.connect()
  File "/usr/local/lib/python3.12/site-packages/RFXtrx/__init__.py", line 784, in connect
    self.serial = serial.Serial(self.port, 38400, timeout=0.1)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/serial/serialutil.py", line 244, in __init__
    self.open()
  File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 336, in open
    self._update_dtr_state()
  File "/usr/local/lib/python3.12/site-packages/serial/serialposix.py", line 713, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
OSError: [Errno 71] Protocol error

Additional information

No response

@home-assistant
Copy link

Hey there @Danielhiversen, @elupus, @RobBie1221, mind taking a look at this issue as it has been labeled with an integration (rfxtrx) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of rfxtrx can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign rfxtrx Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


rfxtrx documentation
rfxtrx source
(message by IssueLinks)

@elupus
Copy link
Contributor

elupus commented Feb 13, 2024

Will be solved once Danielhiversen/pyRFXtrx#150 gets ready.

@roelvdwater
Copy link
Author

roelvdwater commented Feb 14, 2024

Will be solved once Danielhiversen/pyRFXtrx#150 gets ready.

Thanks. I noticed that it also mentions "Handle a socket shutdown leading to 100% cpu uage". My system (Raspberry Pi 3B+) is also crashing/not responding up to a couple of times per day since a couple of days. Could this be related to the issue that's fixed as part of your PR?

@elupus
Copy link
Contributor

elupus commented Feb 26, 2024

Should be fixed in next release hopefully

@elupus elupus closed this as completed Feb 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants