RF not showing up

I’ve been able to follow the first half of Bruhs tutorial and have a list of my RF codes. But when I add:

switch: !include devices/device_switch.yaml

to my config and then create:

  platform: rpi_rf
  gpio: 17
      protocol: 1
      pulselength: 186
      code_on: 12345678
      code_off: 12345678

If never shows up in the front end. I’ve seen a few posts saying “sudo adduser hass gpio” or to reboot but neither has helped.

Has anyone else had this problem?

Depending on when and how you installed Home Assistant, your Home Assistant username could either be hass or homeassistant. To confirm which username Home Assistant is using, type the following commands from the CLI:

getent passwd | grep hass
getent passwd | grep homeassistant

Whichever one returns a result is most likely the account that Home Assistant is using. If neither one returns a result, try running getent passwd (which doesn’t filter any accounts). You’ll have to look through all the accounts and see if one looks like it would be the Home Assistant account.

Once you know which username Home Assistant is using, run sudo adduser <username> gpio, inserting the correct username. Reboot the RPI using sudo reboot and see if it works again.

Script wise, everything looks correct from what I can see. I’ve included a working copy of my config of the ZAP switches.

platform: rpi_rf
gpio: 17
    #Unit 1
    code_off: !secret zap1_off
    code_on: !secret zap1_on
    protocol: !secret zap1_protocol
    pulselength: !secret zap1_pulselength
    #Unit 2
    code_off: !secret zap2_off
    code_on: !secret zap2_on
    protocol: !secret zap2_protocol
    pulselength: !secret zap2_pulselength
    #Unit 3
    code_off: !secret zap3_off
    code_on: !secret zap3_on
    protocol: !secret zap3_protocol
    pulselength: !secret zap3_pulselength
    #Unit 4
    code_off: !secret zap4_off
    code_on: !secret zap4_on
    protocol: !secret zap4_protocol
    pulselength: !secret zap4_pulselength
    #Unit 5
    code_off: !secret zap5_off
    code_on: !secret zap5_on
    protocol: !secret zap5_protocol
    pulselength: !secret zap5_pulselength
1 Like

Thanks for your reply. It must have taken a while for the switch to load in HA for some reason. I went to sleep and it was there the next morning.

I have a question you might be able to answer though. I have 2 different brand fan/light ceiling fans with remotes. I can control the light and fan of the bedroom one but can’t control any of the livingroom one. I’ve tried adding/removing pulsestrength and protocol with no luck. I did notice that the living room codes are 8 digits long and all the examples I can find are either 6 or 7.

Do you think there could be a character limit to the code that the basic transmitter can output?

      protocol: 5
      code_on: 12345678
      code_off: 12345678

      protocol: 5
      code_on: 1234567
      code_off: 1234567

I’m assuming that your spacing is correct in your YAML files, as it looks like you have more than 2 spaces in your living room light section. I don’t know if there is a limitation on the code length or not, but just to rule out an error in the configuration, put the working code in the non-working section and vice-versa. Then see if the problem moves or not.

If the longer codes still don’t work, it’s possible that either there is a code limit of 7 characters, or that the 8-digit fixture may not be exactly in the 315/433 MHz range that the transmitter can send. If the unit has dip switches, try it with 3 different settings:

Dip switches all at 0
Dip switches all at 1
Dip switches at 0, but with every other one at 1

Keep in mind that the reciever’s range width (i.e. 314.750-315.750) may be wider than the transmitter’s range width (i.e. 314.900-315.650) which is why you can “see” the code, but can’t “send” the code. Changing the dip switches, if available, adjusts the exact frequency that is being sent/received on most units.

Thanks for the reply.

Spacing is correct, just transferred it to here incorrectly. No luck on the dip switches unfortunately. Thanks for trying to help though, I’ll reply if I come up with a solution.