Trouble installing a rf module on Pi and using it in HA

Hi everybody,

I recently started with HA and trying some different projects.
For one is that I have some RF controlled plugs in my house (KAKU). I would like to connect those to my home assistant.
For the setup I have the following:
RPi 4 model B running the Hassio.
A cheap RF receiver and transmitter.

I’ve found this tutorial which does pretty much the thing I want. Amazing tutorial and explained very well. Also together with the use of this and this topic I get the basic of what needs to been done.

So the first thing I wanted to try was to run the script which is listening to the RF remote. I didn’t hook up the receiver yet, I just wanted to check if I could run the script.
I opened Advanced SSH & Web Terminal and started with installing the right packages and putting in the script. However when I try to run it it returns the following:

Traceback (most recent call last):
File "/root/rfrx.py", line 28, in <module>
rfdevice.enable_rx()
File "/usr/lib/python3.11/site-packages/rpi_rf/rpi_rf.py", line 188, in enable_rx
GPIO.setup(self.gpio, GPIO.IN)
RuntimeError: Mmap of GPIO registers failed

I can’t figure out what this error means and how to fix it.
All your help is most appreciated.

Greet BCevin

GPIO support has been removed from core a long time ago, but is still available as custom component in HACS

Ahh yes, I’ve read something about that. I installed it. Same goes for the rpi_rf function I reckon.
I installed both but still got the RuntimeError. Is it not possible because the HACS packaged only work for the core Hassio and not the SSH terminal?

Just for closure purposes, I used a ESP32 module to connect the RF module. This worked just fine.