Adding Yaml conf in configuration.yaml

Hallo ,

I’m having an issue to include extra yaml files into my configuration.yaml. I tried differed ways , looked all over youtube and even started a new Home assistant server to test from scratch. Probably I’m doing something wrong

I’m using the Following code in my configuration ( I added the cameras.yaml )

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate
   
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
camera: !include cameras.yaml

#### alamrs #####
alarm_control_panel:
  - platform: manual

and the following code in the cameras.yaml


camera:
  - platform: generic
    still_image_url: "http://xxx.xxx.xxx.xxx/ISAPI/Streaming/Channels/101/picture"
    stream_source: "rtsp://user:[email protected]:554/Streaming/Channels/102"
    name: "Oprit"
    verify_ssl: false
    username: "xxxxxx"
    password: "xxxxxxxxx"
    authentication: digest

When I use the same code directly in the configuration.yaml everything works fine. What is I’m doing wrong :worried:

It’s still work in progress , but I already created the following dashboard.

because it started to get crowded in the Configuration file I would like to split some things up as I go further .

Thanks a lot

Remove or comment out this from your cameras.yaml

Yes , it works ,
It was that easy . :man_facepalming:, I overlooked it somewhere

Thank you !!

I keep getting the following error code and can’t figure out why its not working. It was working before without issue but I was recently adding new code for alexa switches then started getting errors that point me to the lines for my camera. Can anyone tell whats going on. I checked all the spacing?

Configuration errors
Error loading /config/configuration.yaml: while parsing a block collection
** in “/config/configuration.yaml”, line 20, column 3**
expected , but found ‘?’
** in “/config/configuration.yaml”, line 36, column 3**

amcrest:

  • host: 192.168.xx.xxx
    username: admin
    password:
    name: Camera 1
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online
  • host: 192.168.xx.xxxx
    username: admin
    name: Camera 2
    password:
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online
      sensors:
    • sdcard

Add thrid camera

  • host: 192.168.xx.xxx
    username: admin
    password:
    name: Camera 3
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online
      resolution: low
      stream_source: snapshot
      sensors:
    • ptz_preset

Add forth camera

  • host: 192.168.xx.xxx
    username: admin
    password:
    name: Camera 4
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online

Add fifth camera

  • host: 192.168.xx.xx
    username: admin
    password:
    name: Camera 5
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online

Add sixth camera

  • host: 192.168.xx.xx
    username: admin
    password:
    name: Camera 6
    binary_sensors:
    • motion_detected
    • crossline_detected
    • online

Add sevnth camera

  • host: 192.168.xx.xxxx
    username: admin
    password:
    name: Camera 7
    binary_sensors:
    • motion_detected
    • crossline_detected

Your yaml is invalid, or you did post it wrong (not properly formatted)

I think I posted it wrong… I"ll correct and repost

Configuration errors
Error loading /config/configuration.yaml: while parsing a block collection
in “/config/configuration.yaml”, line 20, column 3
expected , but found ‘?’
in “/config/configuration.yaml”, line 36, column 3

amcrest:
  - host: 192.168.xx.xx
    username: admin 
    password: xx.xx
    name: Camera 1
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
  - host: 192.168.xx.xx
    username: admin
    name: Camera 2
    password: xx.xx
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
  sensors:
      - sdcard

  # Add thrid camera
  - host: 192.168.xx.xx
    username: admin
    password: xx
    name: Camera 3
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
    resolution: low
    stream_source: snapshot
    sensors:
      - ptz_preset
  # Add forth camera
  - host: 192.168.xx.xxx
    username: admin
    password: xx
    name: Camera 4
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
  # Add fifth camera
  - host: 192.168.xx.xx
    username: admin
    password: 
    name: Camera 5
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
  #Add sixth camera
  - host: 192.168.xx.xx
    username: admin
    password: 
    name: Camera 6
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online
#seventh camera
  - host: 192.168.xx.xx
    username: admin
    password: xxx
    name: Camera 7
    binary_sensors:
      - motion_detected
      - crossline_detected
      - online