Having a problem with the raspberry pi gpio component

i’m currently having a problem with the raspberry pi gpio component.
i have copied the example code for the configuration.yaml from the component page and pasted it.
when i reboot my raspberry pi and type its ip in my browser the browser says that he cant find the requested page.
so i’m thinking that their is a problem in my configuration file and it wont start home assistant.
hope someone knows how to solve this problem.
b.t.w i’m running home assistant on a raspberry pi 3.

kind regards dylan

Can you post the yaml here using the code blocks as stated above in the blue box. Can you also post the errors if any from the log file.

Impossible to diagnose without at least some information :wink:

Thank you for replying
Here is my log file :

2017-06-04 14:17:36 ERROR (Thread-1) [homeassistant.util.yaml] duplicate key: “switch”
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 49, column 0
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 55, column 0
2017-06-04 14:17:36 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: duplicate key: “switch”
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 49, column 0
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 55, column 0

Here is my configuration.yaml file :

  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 51.6456
  longitude: 4.9063
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 2
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Amsterdam

# Show links to resources in log and frontend

# Enables the frontend

# Enables configuration UI

  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/

# Discover some devices automatically

# Allows you to issue voice commands from the frontend in enabled browsers

# Enables support for tracking state changes over time.

# View all events in a logbook

# fritz dect outlets
  - platform: fritzdect
    username: Admin
    password: mypassword

# Raspberry pi GPIO control                                  <---- !!!! This is where i got the errors !!!! ---->
  - platform: rpi_gpio
      18: Fan Office
      17: Light Desk

# Track the sun

# Example configuration.yaml entry
  - platform: iss

# Security Camera
  - platform: synology
    username: admin
    password: mypassword
    verify_ssl: False

# CPU Speed Component
  platform: cpuspeed

# Example configuration.yaml entry
  - platform: ping

# Example configuration.yaml entry
  - platform: braviatv

# Text to speech
  platform: google

#  - platform: random

group: !include groups.yaml
automation: !include automations.yaml

Get rid of the second switch.

Note that the error log says there is a duplicat key switch.

I’m guessing your “switch” is on line 49 and 55 also based on the error log.

ok thank you
so if i would want to use them both could i just put 2 platforms under one switch like this :

  - platform: fritzdect
    username: Admin
    password: mypassword
  - platform: rpi_gpio
      18: Fan Office
      17: Light Desk

i figured the rest of the problem out on my own thank you for helping silvrr and keithh666