Trying to use RPI-RF, not very successful

I just tried to install my RF transmitter to my switches but…
I’m runnig the HA in a virtualenv and this is what I get:
17-02-19 19:48:52 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform rpi_rf
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/”, line 151, in _async_setup_platform
entity_platform.add_entities, discovery_info
File “/usr/lib/python3.4/asyncio/”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/”, line 68, in setup_platform
File “/srv/homeassistant/lib/python3.4/site-packages/rpi_rf/”, line 77, in enable_tx
GPIO.setup(self.gpio, GPIO.OUT)
RuntimeError: No access to /dev/mem. Try running as root!

(I ran pip install rpi-rf==0.9.6 to in the virtualenv)

try this

sudo adduser pi gpio

and beside pi also your Home Assistant user (hass or homeassistant)

1 Like

Adding homeassistant to pgio made the trick!

Thank you for your help!

// Tommy