Release 0.113 and RFXtrx

I’ve done the same and go back to 0.112, this is crazy.
My home automation has become too big after 2 years to correct this. As long as there is no solution for this, then no more updates. Everything works and I only see disadvantages with this update.

2 Likes

I don’t think there is an easy way to remove devices, probably the entities can be deleted but not the device. You could dive into the device registry and manually delete it but it’s a bit cumbersome.
Once the options can be set through UI for this integration there will be a way to delete devices.

Do you have your full log file?

This is somewhat difficult to explain, part of the hex code of your entities is from the full hex code in your configuration.yaml.

You could hold off a bit, there is work in progress to add devices through the UI (without restarting HA). That way you could add them one by one and rename them.

Moved to 114 from 112 and have successfully moved all my entities to the new RFXtrx integration with one exception.

An electricity sensor - the CT clamp from an Owl CM160

It shows up but does not get updated as it was pre-114.

Anyone any experience with this? Nothing obvious in log files.

Screenshot and config below:

#RfxTrx
rfxtrx:
  device: /dev/ttyUSB0
  automatic_add: false
  devices:
    #Sockets / Plugs 
    09130002550551014050:
      #name: Xmas Plug
      fire_event: True
      signal_repetitions: 2

    #Contact Sensors
    09130000043eee013b60:
      #name: front_gate_contact
      device_class: opening
      data_bits: 4
      command_on: 0xe
      command_off: 0x7
    09130003043eeb013b60:
      #name: front_gate_tamper
      device_class: problem
      off_delay:
        seconds: 5

    #Lights
    0a14000031340001100070:
      #name: Dining
      fire_event: True

    115a010175c2090000092e0000000b352079:
      #name: Electricity

Your config helped me out, thank you mate!!!

@IwanAnand No problem.

Do you have the same and is it working for you - do anything specific other than add the device id?
Help me give I helped you :wink:

I had issues with setting up RFXtrx and with the entities (covers (blinds) only).

Of you enable debug logging for the rfxtrx integration, do you see something that is formatted like below and hints to an update for your energy sensor?

_LOGGER.debug(
            "Sensor update (Device ID: %s Class: %s Sub: %s)",
            event.device.id_string,
            event.device.__class__.__name__,
            event.device.subtype,
        )

Also check with debug logging enabled whether the id string with which the device reports changed (only the first 14 digits, the rest is data and probably changed but this doesn’t matter)

Well that was fun! I used to have this:

switch rfxtrx:
  platform: rfxtrx
  automatic_add: False
  devices:
    0a140000e85af601010070:
      name: DoorBell
      fire_event: True

And changed it to be:

rfxtrx:
  device: /dev/ttyUSB1
  automatic_add: False
  devices:
    # Doorbell
    0a140000e85af601010070:
      fire_event: True

What device_class do i need to add as there doesn’t seem to be just a “swtich” anymore and it now shows up a lightwaveRF light switch, which it isnt, its just a RF doorbell?

It seems like some people in this thread managed to rename their devices so that the entities got their old names. Is this possible, or did I just misunderstand? If I rename a device, only its “friendly name” is changed. The entities ID:s are still named something like sensor.viking_02811_eb_00_temperature, while my old name was sensor.garage_temperature.

Is the only way around this to manually modify each entity, or is there some trick to give the devices and sensors a new “real” ID?

The only way is to select each entity and rename the entity id. The self configured entity id is as real as it gets.

1 Like

The library cannot distinguish between the two as the code you have is shared among a number of devices. You can rename the entities to anything you like. In case of a doorbell, if you want to use it in an automation, the binary sensor will get you what you want. You can build your automation on the state event fires by it.

If you use the following config you can keep using the same names. I need this since I am using Node-Red and renaming is a lot of work.

rfxtrx:
    device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A12U574-if00-port0
    debug: True
    devices:
      09130073238c06019d50: 
#       name: motion_binnen_woonkamer_10
        device_class: motion
        off_delay:
         seconds: 5

binary_sensor:
  - platform: template
    sensors:
      motion_binnen_woonkamer_10:
        value_template: "{{ states['binary_sensor.pt2262_238c06'].state }}"
        device_class: motion

You will find the 238c06 name in the log-file:
2020-09-27 22:00:21 DEBUG (MainThread) [homeassistant.components.rfxtrx] Receive RFXCOM event: {‘packet_type’: 19, ‘sub_type’: 0, ‘type_string’: ‘PT2262’, ‘id_string’: ‘238c06’, ‘data’: ‘0913000e238c06019e50’, ‘values’: {
2020-09-27 22:00:21 DEBUG (MainThread) [homeassistant.components.rfxtrx.binary_sensor] Binary sensor update (Device ID: 238c06 Class: LightingDevice Sub: 0)

1 Like

I wanted to share some hints after the the worst upgrade experience so far with my 165 rfxtrx entitites. Maybe it can help some others like me that downgraded at first and waited until having enough time to do the upgrade. Don’t take this wrong; I’m really happy with home assistant!

If you are still waiting to upgrade you could push your luck and wait for https://github.com/home-assistant/core/pull/38317 (apparently cancelled) to be merged. To avoid clicking through endless web dialogs mapping your entity names again.

Anyhow, after the update to 0.113+ you will need to move your rfxtrx configuration into configuration.yaml according to https://www.home-assistant.io/integrations/rfxtrx/ You can also do like I did and place the rfxtrx config in a separate file included using “rfxtrx: !include rfxtrx.yaml” in configuration.yaml

If you have a lot of entities it can be useful to add them deactivated by turning off that setting in the system config found in the three dot menu of the rfxtrx integration. Then move your configuration for switches/lights/sensors into into the devices section of the rfxrtx section commenting names in the process. My included rfxtrx.yaml starts like this:

device: /dev/ttyUSB0
#debug: True
#automatic_add: True
devices:
# Temperature sensors
  "0a52090ed70000d1370159":
    # name: Sovrum
  "08500706d800006159":
    # name: Sovrum Ute
...

After restarting home assistant you can then use the rfxtrx integration to reach the devices. Then use the hex codes in the device name to find the matching entries in your device section and grab the old (now commented) name and use this when clicking the device to find the corresponding entities. Then open those entities that you actually want to see and rename, set id, enable entity and click update. There may be a simpler way, but this was what I did. (It would have been really nice if the the id was updated from the name to avoid having to fill in both.)

There can also be some fiddling with dimmable lights now being switches and vice versa. You will need to do some bitflipping in the id:s to solve this, for example I transformed the light “0b11002400055efa01020d60” to “0b11002400055efa01010f60” to get a switch instead. I looked at the similar switches I had and with guesswork I succeeded. I think you can also re-register you device again using the dimming possibilities instead of on/off to get a dimmable light. See Rfxtrx lights are recognized as switches in 0.113

I also had an issue with event “button_pressed” not being triggered anymore for my rfxtrx remotes. I moved to the “state_changed” event which nowadays seems being triggered on pressed buttons even if they do not change states (thank you) so this regexp automation seems to work now (after also adding .new_state):

- alias: Belysning fjärrisar
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: state_changed
  condition:
    condition: template
    value_template: "{{ trigger.event.data.entity_id | regex_match('switch.fjarr') }}"
  action:
    - service_template: >
        {% if trigger.event.data.new_state.state == "on" %}
          homeassistant.turn_on
        {% else %}
          homeassistant.turn_off
        {% endif %}
      data_template:
        entity_id: >
          {% if trigger.event.data.entity_id | regex_match('switch.fjarr_._1_') %}
            group.belysning_dag
          {% elif trigger.event.data.entity_id | regex_match('switch.fjarr_._2_') %}
            group.belysning_sovrum
          {% else %}
            group.belysning_ute
          {% endif %}

I’m a bit sad with the general home assistant movement towards clicking around in web interfaces as the only way to manage your configuration. The yaml files in a git repo was a very robust solution for configuration handling. And to be able to share your configuration with other home assistant users was extremely useful. I understand wanting to reach a broader audience but I just wished that it could be more compatible with the old solution.

The diff of my update can be found here if it can help anyone doing the upgrade:


(Excluding the renaming changes performed in the web interface dialogs of course.)
2 Likes

Your post was flagged as inappropriate : the community feels it is offensive, abusive, or a violation of our community guidelines.

Looks like I hurt someones feelings there, oh well :wink:

The good thing about open source is that you can take the source of, say an integration, rewrite it and remove all the dumbed down nonsense, turning it back into something viable for power users who like to have full control over their entities, rather than having some obscure automatic system decide for them. Yes, I will have to maintain it for coming HA changes, but hey, if that’s the price I have to pay to not have half of my house break from some erratic update (RFXCom controlled devices play a very important role in my setup), then so be it.

The great thing about this, is that you get to discover how to develop for HA. The rfxtrx integration is actually a good candidate, as it is a pretty simple integration.

Sorry to say or ask, but I’m still lost what to do, does anyone have a clear explanation how to get RFXtrx working again, last time I reverted back to 0.112 but now I really want to fix the few RFXtrx entries I have so I finally can stay on 0.116.

After updating to 0.116.3 I get the following error in HA:

This is what I have in configuration.yaml:

# RFXCOM (3)      
rfxtrx:
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11I6V7C-if00-port0
switch (3):
  - platform: rfxtrx
    automatic_add: True
    devices:
      0b1100000211a21a01010f80:
        name: Scentsy TV
        fire_event: True
      0b1100010211a21a02010f70:
        name: Scentsy Keuken
        fire_event: True
      0b1100020211a21a03010f70:
        name: Scentsy Slaapkamer Ouders
        fire_event: True
      0b11000100a71a6a01010f70:
        name: Vitrinekast
        fire_event: True
      0b11000200a71a6a02010f70:
        name: Kerstboom
        fire_event: True
      0b11000300a71a6a03010f70:
        name: ClickGrow
        fire_event: True

This is what I have in automations.yaml:

- id: '1594719666151'
  alias: Vitrinekastverlichting aan fri-sat-sun 10:00
  description: ''
  trigger:
  - at: '10:00'
    platform: time
  condition:
  - condition: time
    weekday:
    - fri
    - sat
    - sun
  action:
  - data: {}
    entity_id: switch.vitrinekast
    service: switch.turn_on
- id: '1594930264273'
  alias: Vitrinekastverlichting uit fri-sat-sun 23:30
  description: ''
  trigger:
  - at: '23:30'
    platform: time
  condition:
  - condition: time
    weekday:
    - fri
    - sat
    - sun
  action:
  - data: {}
    entity_id: switch.vitrinekast
    service: switch.turn_off
- id: '1594931035164'
  alias: Scentsy Slaapkamer Ouders aan dagelijks om 21:15
  description: ''
  trigger:
  - at: '19:30:00'
    platform: time
  condition: []
  action:
  - data: {}
    entity_id: switch.scentsy_slaapkamer_ouders
    service: switch.turn_on
- id: '1594931228049'
  alias: Scentsy Slaapkamer Ouders uit dagelijks om 22:30
  description: ''
  trigger:
  - at: '22:30:00'
    platform: time
  condition: []
  action:
  - data: {}
    entity_id: switch.scentsy_slaapkamer_ouders
    service: switch.turn_off

Anyone? Thanks in advance =)

Br,
Melvin

Try the following. The name key doesn’t work anymore, you have to change the names in the UI.

rfxtrx:
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11I6V7C-if00-port0
  automatic_add: True
  devices:
    0b1100000211a21a01010f80:
      #name: Scentsy TV
      fire_event: True
    0b1100010211a21a02010f70:
      #name: Scentsy Keuken
      fire_event: True
    0b1100020211a21a03010f70:
      #name: Scentsy Slaapkamer Ouders
      fire_event: True
    0b11000100a71a6a01010f70:
      #name: Vitrinekast
      fire_event: True
    0b11000200a71a6a02010f70:
      #name: Kerstboom
      fire_event: True
    0b11000300a71a6a03010f70:
      #name: ClickGrow
      fire_event: True
1 Like

Perfect, thanks Rob! That did it for me and got it back working now =)

Steps taken:

  • Changed the rfxtrx part in configuration.yaml as in your example.
  • Under Entities find the RFXtrx devices ==> test to see what is what and add a friendly name.
  • In LoveLace edit the Lights section and change the entity to the new switch.ac_0*****a_*

Et voilà;

For the automations; changed the actions in YAML and edit to the new switch.ac_0*****a_1

Thanks again,

Br,
Melvin