Rfxtrx breaks, no clue why

Hi all,

I have a very weird issue going on. I started noticing that my RFXtrx 433mhz doorbell wasnt working anymore with my automations. All other components using rfxtrx (mainly lights) kept working though. After some troubleshooting (logs to debug) i noticed that no a single line was being logged about the rfxtrx component recieving data, although it should be recieving all the time. Sending signals is no problem though. Thats why i didnt notice it at first because my light automations were still working.

I traced the issue back around the time i introduced tradfri in hass. After disabling the tradfri gateway, rfxtrx was working again. Tried this a few times, and everytime the same result: as soon as i booted with tradfri active, rfxtrx breaks.

It isn’t interference (already moved the gateway, and disabled it after booting with a full config, it keeps breaking).

I"m using 2 rfxtr devices (1 433 mhz, 1 868 mhz (prototype)). The 868 is working, only the 433 mhz is not.
The 433 mhz is using the built in hass rfxtrx component, the 868 mhz is using a custom component (copy of the original component, called rfxtrx2, although i copied it a few versions back, so any updates on the rfx component are not in the custom component i guess).

Any ideas< or has anyone also seen this?

Oliver…

Never mind, seems not to be related to tradfri, at least not every time…got it working now with tradfri enabled…something else seems to break rfxtrx…at least the receiving part. I’ll keep digging the logs…

Ok, still struggling with rfxtrx.

I tried everything now, cant get it to work anymore.

  1. after every reboot, rfxtrx components break (have been working for more than a year without any issues), sometimes they work sometimes they dont. Mostly the 433 trx breaks. The 868 trx (using a custom component; you can only specify one device for rfxtrx, so i needed a second component) seems to work.

Sometimes rfxtrx433 is able to send signals, but doesnt recieve anything. You can clearly see this in the logs. If it works you see signals coming in, otherwise nothing. Most of the time i can send signals, just not recieve anything. One out of 20 reboots, it seems to work. The 868 component only recieves signals anyway, so if this doesn’t work I dont really know if it can send signals.

  1. I don’t think Tradfri has anything to do with this, but I cant get it to work stable anymore. It worked for 2 weeks, havent done a single config change (except some timing adjustments in automations), but it simply will not work anymore. After removing the manual tradfri part from the configuration it does seem to work sometimes. When using manual config it says dependencies cannot be loaded. When using discovery, it sometimes works, sometimes doesnt.

But Ok, lets not focus on tradfri, thats another problem.

I thought some dependencies in my pi2 with the all in one installer (pre dec 2016) broke or were corrupted so installed a new pi with hassio. Same issues!!! aargh. Updated pyrfxtrx in the custom component part to 20.1 (used for 2nd 868 rfxtrx), but this also doesnt help.

Went back from hassio to Pi2 with aio (pre dec 2016) and am trying to fix this.

Funny part it, I do not see anything in the logs. Put everything to debug, nothing. All components seem to load without issues.

To rule out hardware issues, I connected the 433 rfx to my laptop and used rfxmanager, but it recieves signals just fine. Also tried new firware, no results.

Tried disconnecting all usb ports to rule out power issues, doesn’t help :frowning:

I’m really out of ideas right now, all help would be welcome…

Oliver

Ok I firgured it out, after rebuilding the entire config, component by component, it breaks when using the custom component copy of rfxtrx (really weird because this was the first thing i tried when i started troubleshooting).
This used to work fine, but something chnanged in the rfxcom component that doesnt allow me to reuse the code.
I’m not a codemaster myself (understement), but i guess there is some dependency that cant really handle the componenent being used twice.

What I did to copy the component:

  • Copied rfxtrx.py to custom components but changes the domain to rfxtrx2 and named it rfxtrx as well.
  • Copied the folders sensors and switch for rftrx2 as well, copied the content (rftrx.py) named them rftrx2.py
  • where an import of homeassistant.rfxtrx was done, I chnages it to custom_components.rfxtrx2.

This worked perfectly fine for more than a year. I don’t know exaclty when it got broken, cant be to long ago though. The result is that only one of the 2 rfxcom devices loads (most of the time the custom component).

Any ideas what i should change so i can keep using both?

Regards,

Oliver

I just had the same problem. I could transmit but not receive any. so i set the binary_sensors: sensor: and switches: to

  - platform: rfxtrx
    automatic_add: false

all worked after that.

Looks like an error in Switches -
https://github.com/home-assistant/home-assistant/issues/9751

Doesn’t seem to solve the problem. Seems something else is wrong, I have 2 rfxcoms, one works perfectly fine, the other one doesn’t anymore.