Hey there.
I’m attempting to set up GPIO Sensors in my set up. They are simply momentary switches that will perform automation.
Here is my configuration:
binary_sensor:
platform: rpi_gpio
ports:
16: ButtonOne
20: ButtonTwo
21: ButtonThree
pull_mode: "UP"
bouncetime: 50
invert_logic: false
I’m getting this error message and I’m running the latest version of Raspian.
16-08-22 00:17:04 homeassistant.components.binary_sensor: Error while setting up platform rpi_gpio
Traceback (most recent call last):
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
discovery_info)
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/binary_sensor/rpi_gpio.py", line 32, in setup_platform
port_name, port_num, pull_mode, bouncetime, invert_logic))
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/binary_sensor/rpi_gpio.py", line 49, in __init__
rpi_gpio.setup_input(self._port, self._pull_mode)
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/rpi_gpio.py", line 46, in setup_input
GPIO.PUD_DOWN if pull_mode == 'DOWN' else GPIO.PUD_UP)
RuntimeError: No access to /dev/mem. Try running as root!