RFLink - Debug log shows button press but no device / entity

So I connected my RFLink to my HA server and activated debug logging.
I just don’t understand how to get the remote as a device and I haven’t even tried adding my 433MHz Smart Plugs…

While pressing a button on my old Nexa remote I get the following in the log:

2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] received data: 20;87;New
2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] received data: Kaku;ID=016805be;SWITCH=
2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] received data: 1;CMD=ON;
2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] got packet: 20;87;NewKaku;ID=016805be;SWITCH=1;CMD=ON;
2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'newkaku', 'id': '016805be', 'switch': '1', 'command': 'on'}
2021-02-09 18:02:00 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'newkaku_016805be_1', 'command': 'on'}
2021-02-09 18:02:00 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'newkaku_016805be_1', 'command': 'on'}
2021-02-09 18:02:00 DEBUG (MainThread) [homeassistant.components.rflink] entity_ids: []
2021-02-09 18:02:00 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known and automatic add disabled

In my configuration.yaml I have this:

rflink:
  port: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_55037313237351E06132-if00

switch:
  - platform: rflink
    automatic_add: true
    devices:
      newkaku_016805be_1:
        name: Damned Button

Anyone that knows what I am missing here? Any tips / links on what to read up on?

The RFLink switch domain don’t have an automatic_add attribute.
Try to add the light domain to your config, and once you get the device_id, remove it:

light:
  - platform: rflink
    automatic_add: true

References:

Already tried it. Tried it again when I read your reply.
Still gives the same debug log with the anoying “device_id not known and automatic add disabled”. It feels like I am doing something wrong in my configuration.yaml so that HA still thinks automatic add is disabled.

Your config looks good to me.

How do you restart HA? I remember some bug where HA restart from UI fails on config validation and don’t restart (without notifiy).
I recommend to remove all the RFLink config and restart HA looking at the startup logs.

The day before yesterday I rebooted the machine after upgrading the OS… I tend to do things like that… fresh start… but I will try a reboot now.

What logs should I look in and for what?

I’m curious if the RFLink logs keep coming out after removing the configuration.
I know it seems a bit absurd, but what your traces show does not seem to match the configuration, so try from scratch and add configurations until you see where the problem may be.
I nothing happens, I would try to put just the RFLink configuration:

rflink:
  port: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_55037313237351E06132-if00

And after this, some RFLink domain, like the light domain.

Ok. First reboot I got complaints about the syntax in configuration.yaml and rflink entries.
I did a copy paste from the HA page on RFLink… and… goddamn… it works…

I have two entites now, newkaku_016805be_1 and newkaku_016805be_2 after two button presses. Adding these “light” entities in Lovlace I can control the two “lights” on / off with the two first button sets on my remote.
Ok… so now it works. I am just going to figure out how to get them as Switches. I guess changing “light:” to “switch:”. I read that somewhere… that I “Switch” had no auto adding so “Light” was the way to get it in.

However, there are nothing registered in the configuration.yaml… are the entities kept after a reboot or?

My smart plugs, how do I get them into HA? I guess they are quiet and are waiting for commands or?

Fine.

Now you can configure this codes as switch entities:

switch:
  - platform: rflink
    devices:
      newkaku_016805be_1:
        name: Damned Button

But this is what you had in the beginning…
I guess it should work now.

Actually in HA you may want to represent the plug state’s (and not the remotes).
What is done usually is to configure an entity that reacts to remote’s signals.

So in HA the switch will represent the plug, and its state changes with the remotes (like the real one).

Another thing that can be done is to represent your plug with another device_id, let’s say something like:

switch:
  - platform: rflink
    devices:
      newkaku_776805be_1:
        name: my_new_button

Now, this new button can be paired with your plug. You need to follow the pairing process for your plug. This way your plug will react to the physical button and to the HA button. This is not necessary, but it is one of the possibilities you have.

PS: RFLink don’t keep entities between restarts, only those that are in the configuration.

Sorry for not getting back earlier. Real life happened :slight_smile:

Thanks for helping me out and for having the patience to explain things. It REALLY helped.

I have now dropped the idea of connecting to the smart plug dimmers since a) I have lost the remote and b) they are so ancient I can’t find any documentation anywhere on the internet.

I am pausing RFLink for now because I have to migrate from my Z-Wave setup that is depreciated now…