Gpio not work

Hello every one I have a problem with gpio on Home assistant, someone can help me? my installation is on rspberry pi 3b and when I try to modify the configuration. yaml file nothing apper on the main page of home assistant.

this is my code:

Example configuration.yaml entry

switch:

  • platform: rpi_gpio
    ports:
    11: Fan Office
    12: Light Desk

2020-04-29 16:20:48 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up rpi_gpio platform for binary_sensor
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/binary_sensor.py”, line 45, in setup_platform
port_name, port_num, pull_mode, bouncetime, invert_logic
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/binary_sensor.py”, line 63, in init
rpi_gpio.setup_input(self._port, self._pull_mode)
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/init.py”, line 36, in setup_input
GPIO.setup(port, GPIO.IN, GPIO.PUD_DOWN if pull_mode == “DOWN” else GPIO.PUD_UP)
RuntimeError: No access to /dev/mem. Try running as root!
2020-04-29 16:20:49 WARNING (MainThread) [pydeconz.utils] Received unexpected bridge id: 0000000000000000
2020-04-29 16:20:49 WARNING (MainThread) [pydeconz.utils] Received unexpected bridge id: 0000000000000000

this are the log

Please edit your first post and format you code as per point 11 here: How to help us help you - or How to ask a good question

sorry guys, the code is:

# Example configuration.yaml entry
switch:
  - platform: rpi_gpio
    ports:
      11: Fan Office
      12: Light Desk
and this is the log:
2020-04-29 18:27:44 ERROR (MainThread) [homeassistant.components.switch] Error while setting up rpi_gpio platform for switch
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/switch.py", line 37, in setup_platform
    switches.append(RPiGPIOSwitch(name, port, invert_logic))
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/switch.py", line 50, in __init__
    rpi_gpio.setup_output(self._port)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rpi_gpio/__init__.py", line 31, in setup_output
    GPIO.setup(port, GPIO.OUT)
RuntimeError: No access to /dev/mem.  Try running as root!
2020-04-29 18:27:44 WARNING (MainThread) [pydeconz.utils] Received unexpected bridge id: 0000000000000000
2020-04-29 18:27:44 WARNING (MainThread) [pydeconz.utils] Received unexpected bridge id: 0000000000000000

Are you running the 64bit version of Home Assistant?

The GPIO integration does not work with the 64 bit image. Which is one of the reasons the 32bit image is recommended.

onestly I don’t know, were I can check it? Sorry but I’m new in this world.

I have this version: Home Assistant 0.108.9.

The developer tools / info page has a system health box that lists it.

arch armv7l
dev false
docker false
hassio false
os_name Linux
os_version 4.19.97-v7+
python_version 3.7.3
timezone Europe/Rome
version 0.108.9
virtualenv true

Lovelace

dashboards 1
mode auto-gen
resources 0