Correct formatting for alarm_panel.yaml

Can someone assist with the correct formatting for a dedicated yaml file for my alarm panel? I’m using Envisalink 3 with DSC and it works fine when integrated into the main configuration.yaml. In the interest of keeping things tidy though, I’ve split up my files as many have done but when I include the alarm-panel.yaml file, HASS dies completely. No SSH access, no SMB, no webpage. I’ve just had to use Parted Magic to remove the alarm_panel.yaml file and edit the configuration.yaml to remove the included file in the hope that I can get HASS started again. The following works in the main config:

envisalink:
#optional
  port: 4025
  evl_version: 3
  keepalive_interval: 60
  zonedump_interval: 30

#required
  host: 10.0.1.221
  panel_type: DSC
  user_name: user
  password: user
  code: !secret

  zones:
    01:
      name: 'Entry Door'
      type: 'opening'

Tried this in the alarm_panel.yaml and HASS died.

- platform: envisalink
  host: 10.0.1.221
  panel_type: DSC
  user_name: user
  password: user
  code: !secret
  port: 4025
  evl_version: 3
  keepalive_interval: 60
  zonedump_interval: 30
  zones:
    01:
      name: 'Entry Door'
      type: 'opening'

Heading home now to see if HASS will start with cleaned card. Any advice would be appreciated. I’d provide a log file, but you’ll see below that there is a problem with the log I recovered from the dead system (I’ve had this happen before while trying to add binary sensors).

I’m thinking this should be your alarm_panel.yaml file but my spacing may be off

- envisalink:  
    host: 10.0.1.221
    panel_type: DSC
    user_name: user
    password: user
    code: !secret
    port: 4025
    evl_version: 3
    keepalive_interval: 60
    zonedump_interval: 30
    zones:
      01:
        name: 'Entry Door'

and then just include the file in your main config.

Unfortunately my instance of HA is unrecoverable. This is the 2nd time a config error has completely killed my Pi with a 0 byte log file so loosing faith fast. Will rebuild tonight and try again.

Did you figure out wher to put the envisalink configuration ???

No. I know where to put it, just not how to format it when it’s in its own yaml. Works fine in configuration.yaml so have left it there for now. Online YAML checkers of no use when it comes to dedictaed yaml files as they do not report incorrect indents. e.g. The following reports as a correctly formatted YAML file but when included in sensors.yaml, prevents HASS from starting.

- platform: template
  sensors:
  Garage_door:
  value_template: '{% if is_state("binary_sensor.01_fibaro_garage_door", "on") %}Open{% else %}Closed{% endif %}'
  friendly_name: 'Garage Door'

The correct format is below but finding instruction on when to indent and when not to is cumbersome and not made any easier when yaml checkers don’t work. For me at least it’s a steep learning curve with lots of trial and error, constant reboots and log files inspections. :sweat:

- platform: template
  sensors:
    garage_door:
      value_template: '{% if is_state("binary_sensor.01_fibaro_garage_door", "on") %}Open{% else %}Closed{% endif %}'
      friendly_name: 'Garage Door Status'

I’m not sure of you got this working or not, but I ran into a number of similar issues last night when first splitting up my configuration.yaml and getting the new syntax’s right… ( differences needed when using !include, !include_dir_merge_list, !include_dir_named, etc…)
I didn’t run into any issues with the alarm panel though,

Here’s snippets of my configueation.yaml before:
homeassistant:
# Name of the location where Home Assistant is running
name: Home
…yadayada

#Alarm Panel Integration
envisalink:
  host: 192.168.xx.xx
  panel_type: HONEYWELL
  user_name: user
  password: user
  code: !secret envisalink_password
  port: 4025
  evl_version: 3
  keepalive_interval: 60
  zonedump_interval: 30
  panic_type: Police
  zones:
    1:
      name: 'Basement Smoke Detector'
      type: 'smoke'
    2:
      name: 'Front Door'
      type: 'opening'
...yadayada

Here’s my new configuration.yaml:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
...yadayada

###  Security  ###
#  Security Panel integration software/hardware, network interfaces etc...
envisalink: !include envisalink.yaml
...yadayada

and my new envisalink.yaml:

  host: 192.168.xx.xx
  panel_type: HONEYWELL
  user_name: user
  password: user
  code: !secret envisalink_password
  port: 4025
  evl_version: 3
  keepalive_interval: 60
  zonedump_interval: 30
  panic_type: Police
  zones:
    1:
      name: 'Basement Smoke Detector'
      type: 'smoke'
    2:
      name: 'Front Door'
      type: 'opening'
 ...yadayada

I think you just made a glitch by adding a platform line, so far in splitting things out I haven’t found the need to add any lines, its primarily been cutting everything below the section out and pasting it into a new file, and trying to focus/figure out the indentation which I just realized I believe my envisalink.yaml might be indented 2 extra spaces off the bat…
my ocd says to try changing it, reading your problem and the hard crash makes me think I’ll just leave it alone…

1 Like

Thanks, I did not get it sorted so just left the alarm config in the main config file. I’ll try your method and see what happens.

Finally got around to testing your config and it works! Thank you.

1 Like