Skip to content

Configuration

Luca Mazzilli edited this page Nov 8, 2022 · 5 revisions

configuration file is located in module folder or can be passed to ialarm-mqtt via -c argument:

ialarm-mqtt -c /path/to/my/config/config.yaml

edit config.yaml and adjust "mqtt" and "server" settings according to your need.

yaml file

name: AlarmName #(optional, if not provided will be your panel default name - TCPIP_PANEL for Antifurto365)
server:
  host: 192.168.1.81 #tcp panel ip
  port: 18034  #default tcp panel port
  username: admin #tcp panel username
  password: password #tcp panel password
  zones: #number of zones to publish/handle in an array of included zones: [1,2,3,4,5,6,15,19,22]. It seems that 40 is the alarm limit
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    #- 7 #this commented zone will not appear in Home Assistant
    #- 8 #this commented zone will not appear in Home Assistant
    #- 9 #this commented zone will not appear in Home Assistant
    #- 10 #this commented zone will not appear in Home Assistant
    - 11
    - 12
    - 13
    - 14
    - 15
    - 16
    - 17
    - 18
    - 19
    - 20
    - 21
    - 22
    - 23
    - 24
    - 25
    - 26
    - 27
    - 28
    - 29
    - 30
    - 31
    - 32
    - 33
    - 34
    - 35
    - 36
    - 37
    - 38
    - 39
    - 40  
  polling_status: 30000  #milliseconds for polling alarm status (default is 30 seconds)
  polling_events: 10000 #milliseconds for polling alarm log events (default is 10 seconds)
mqtt:
  host: 192.168.1.82 #mqtt server ip
  port: 1883 #mqtt server port
  username: admin #mqtt panel username
  password: password #mqtt panel password
  clientId: ialarm-mqtt #mqtt client id
  cache: 5m #this will sends data only if changed or every 5 minutes
  retain: true #mqtt retain
hadiscovery:
  alarm_qos: 2 #QoS for the alarm topic
  sensors_qos: 0 #QoS for the sensors topic
code: 1234 #HA frontend alarm code
zoneName: Zone #zone prefix name (Zone 1 Kitchen, etc )
events: #events sensor configuration
  name: iAlarm last event
  icon: mdi:message-alert
bypass: #bypass switch configuration
  name: Bypass
  icon: mdi:lock-open

specific zone config

Sensor are exposed to Home Assistang using specific device_class but if you want to personalize the sensor you can add a zones property to your yaml.

Most of the sensors are normally closed but some water leak works as normally open contact, so to correcly report them to home assistant the sensor can configured as "contactType" : "NO" and "statusProperty" : "open".

some examples:

zones: 
  - number: 1
    device_class: door
  - number: 12
    device_class: motion
  - number: 13
    device_class: motion
  - number: 16
    contactType: NO
    device_class: moisture
    statusProperty: fault

mqtt topics

mqtt topics and payloads can be configured to integrate it what you use. See full.config.yaml for all possible configuration keys.

Example with mqttthing (homebridge) and default payloads

Note: cancel is not used by mqqtthing

payloads:
  alarmAvailable: online
  alarmNotvailable: offline
  alarmDecoder:
    armAway:
      - AA
      - AwayArm
    armHome:
      - SA
      - StayArm
    disarm:
      - D
    cancel:
      - C
    triggered:
      - T
  alarm:
    armAway: armed_away
    armHome: armed_home
    disarm: disarmed
    cancel: cancel
    triggered: triggered
  sensorOn: "1"
  sensorOff: "0"