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

Warning for beta 113.0b0 and RFXTRX #37916

Closed
KentEkl opened this issue Jul 16, 2020 · 22 comments
Closed

Warning for beta 113.0b0 and RFXTRX #37916

KentEkl opened this issue Jul 16, 2020 · 22 comments
Assignees
Milestone

Comments

@KentEkl
Copy link

KentEkl commented Jul 16, 2020

If you install the beta you will get two messages in the log that says that you should remove RFXTRX from your sensors and switches configuration because it's not supported any more.
If you follow that recommendation and remove it you will end up with a configuration that is a big catastrophe for your setup.
All your automations, scripts and Lovelace configurations depending on RFXTRX will stop working because the device/entities names changes and how do I handle dummy RFXTRX devices used in my automations.
There are no instructions that i was able to find on how to migrate my current setup to the new way of working with RFXTRX.
New devices, new entities that does not give any clue or mappings to my running setup?
I'm aware that it is a beta but where are the backward compability?
I have probably missed something so please enlighten me and point me to the documentation on how to migrate my large RFXTRX setup with all my automations depending on RFXTRX sensors/switches and dummy devices.

@mbo18
Copy link
Contributor

mbo18 commented Jul 16, 2020

Updated documentation is here https://rc.home-assistant.io/integrations/rfxtrx/ until 113.0 is out.

@KentEkl
Copy link
Author

KentEkl commented Jul 16, 2020

Yes Ihave read the new documentation but it says nothing about how to transfer your current configuration into the new way of working ? You have to be a pro and edit the configuration manually in .storage to at least get something to work.

@dshokouhi
Copy link
Member

Make sure to check the breaking change in the beta release notes. This integration is now setup via the integration screen. Doesn't seem like you can import the yaml you just set it up there.

@probot-home-assistant
Copy link

Hey there @Danielhiversen, @elupus, mind taking a look at this issue as its been labeled with an integration (rfxtrx) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@elupus
Copy link
Contributor

elupus commented Jul 16, 2020

To transfer you mainly need to move your config to the rfxtrx key rather than per platform.

Once that is done, all your dummy devices should show up. There may be changed entity names. But you can now change entity name from GUI. So you should be able to assign the names you had before.

@elupus
Copy link
Contributor

elupus commented Jul 16, 2020

You can only import config. You can't set it up from integration screen yet.

@elupus
Copy link
Contributor

elupus commented Jul 16, 2020

I suppose it might be somewhat hard to understand which device is which if you have many.

PS. Do friendly name rename on device level instead of entity since there are now going to be multiple entities per device. Then it will rename all entities related to that device.

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

I still believe that someone that understands all this changes has to write a some sort of migration guide.
It's very hard to understand all that has to be done by reading/finding the documentation.

Example.

  1. Copy all your current device switches and sensors configuration to ... ?
  2. Be aware of that 085007018700805c79:
    name: Kitchen
    name: will not be valid anymore and you will not find 085007018700805c79: in the new setup, instead look for . . to identify your switches/sensors.
  3. Open the integration under configuration and rename . . . or ? If you want to keep your old names you should . . ?
  4. Change your automations/scripts to the new device/entity.
  5. If you have many devices you should do it like this. . . so you find your devices and understand what to change in your automations/scipts.
  6. When you are ready remove/keep the device entries under RFXTRX ??
  7. If you add a new device you will not se the 085007018700805xxx: anymore or ?? what should be added as a device under RFXTRX: in the configuration.yaml

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

Copied from above linked doc. The config have not changed much...

New config:

rfxtrx:
  host: 192.168.0.2
  port: 50000
  devices:
    # Light 1
    0b11000f10e9e5660b010f70:

    # Binary Sensor with data bits setup
    0913000022670e013b70:
      device_class: opening
      data_bits: 4
      command_on: 0xe
      command_off: 0x7

Old config:

rfxtrx:
  host: 192.168.0.2
  port: 50000

light:
  platform: rfxtrx
  devices:
    0b11000f10e9e5660b010f70:
      name: Light 2
      fire_event: True

binary_sensor:
  platform: rfxtrx
  devices:
    0913000022670e013b70:
      name: Binary Sensor
      device_class: opening
      data_bits: 4
      command_on: 0xe
      command_off: 0x7

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

Tried to copy your config but it does not work so I must be doing something wrong ?

rfxtrx:
host: 192.168.0.2
port: 50000
devices:
# Light 1
0b11000f10e9e5660b010f70:

Invalid config for [rfxtrx]: expected a dictionary for dictionary value @ data['rfxtrx']['devices']['0b11000f10e9e5660b010f70']. Got None. (See /config/configuration.yaml, line 199).

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

Oh crap. There is a commit missing in rc. You need a key under the decice.

rfxtrx:
  host: 192.168.0.2
  port: 50000
  devices:
    # Light 1
    0b11000f10e9e5660b010f70
      fire_event: false

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

Thanks elupus.
Added a key and now I have a lot of 'AC 3ef0ffe:16' type devices, is your next advice to manually try to find out which one maps to the earlier entity and edit the names in the configuration tool and change my automations/scipts to use the new entities ?

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

You edit the name from GUI. I suggest you go to the devices page under settings and rename the whole device rather than renaming individual entities.

Once that is done you can also rename the entity id to what you had before.

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

You did adjust the event data with what you had before right? I just posted an example code.

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

Yes I changed it, did not have any event data before, I will follow your instructions and hopefully it will work with Google Assistant also. Should I keep the configuration in configuration.yaml when I'm ready and the config is in the registry ?
Thank's for your support.

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

Another question, if I need to delete a device, do I have tho remove the whole integration and start all this work from the beginning ?

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

Devices don't seem to be possible to delete. But once automatic_add is off, you can delete all entities linked to the device.

@remb0
Copy link

remb0 commented Jul 17, 2020

This page helps eronmous.

my config is:

rfxtrx:

  device: /dev/ttyUSB1
#  debug: true
  devices:
    0b1100250205060801000070
#     name: Computer
    0b11000d0059edf20b010f70
#      name: remote_rfx_keukenlamp
    0b1100100059edf20c010f70
#      name: remote_rfx_eettafel
    0b11001000a12d2e0b010f70
#      name: Lamp_Tuin_Gevel
    0b11000400038b3c02000070
#      name: trapgat_uit
    0b11010b0000080002010f70
#      name: trapgat_aan
    0a520719210e00c53f0169
#      name: badkamertemp
    0b11002a009a0fd20a010f60 
#        name: motion wc
    0b1100300082b6160c020f70 
#     name: Gang
    0b1100260082b6160b000070
#     name: remote_rfx_overloop 
    0b110004009a0fd20a010f60
#      name: wc
    0b1100140082b6160b020f70
#      name: Overloop
    0b1100020005031e01010f70
#      name: waskamer    
    0b11001f00a2fea60c010f70
#      name: logeerkamer
    "071a000009090907"
#      name: Zonnescherm
    "071a000002020202"
#      name: rolluiken_both
    "071a000005090804"
#      name: rolluiken_links
    "071a000004040405"
#      name: rolluiken_rechts

but i got:
Error loading /config/configuration.yaml: while parsing a block mapping
in "/config/packages/433.yaml", line 2, column 3
expected , but found ''
in "/config/packages/433.yaml", line 7, column 5
don't understand what did i wrong?

@elupus
Copy link
Contributor

elupus commented Jul 17, 2020

Make sure you add, fire_event: false for now. The devices need to have a key right now. Think it will be fixed for final release.

You are also missing colons after each device.

@KentEkl
Copy link
Author

KentEkl commented Jul 17, 2020

Up and running after many hours of trial and error so I'm closing this.

@KentEkl KentEkl closed this as completed Jul 17, 2020
@LeFanch
Copy link

LeFanch commented Jul 26, 2020

Hello,
I'm totally lost. I don't understand how I'll be able to make my current configuration working without devices name.
I had to downgrade to 0.112, but I begin to understand I'll have a lot of work...

@elupus
Copy link
Contributor

elupus commented Jul 27, 2020

You rename from GUI. So sure some detective work may be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants