Fire Safety Central with Home Assistant

Robert Andresen Home Assistant, Internet of things, Tutorials 1 Comment

One of the main reasons for getting into more advanced smarthome, was smoke detectors. I was looking for a control panel for smoke detectors that could notify me if anything triggers, and especially if something triggers in my rental apartment.

I ended up with Fibaro smoke sensor (FGSD002) and Home Assistant (HA).

Tellstick Znet Lite v2

Before setting up my HA, I was testing them on my Telldus. This worked fine, but needed some advanced LUA-scripting to get all the functionality I wanted. This was not ideal, when I probably was going to end up with 10-15 smoke detectors and no good frontend view.

Home Assistant

HA wasn’t straight forward, but a little simpler that Telldus with LUA. The best thing about HA, is the possibility to get a «control panel» function, with status on all my smoke detectors, like battery and if a trigger is sent (tamper and fire).

Adding it to HA and setting z-wave parameters

I added them as secure node. If you are not familiar with adding node’s to HA, please read the docs. It’s mostly as simple as clicking «ADD NODE SECURE» and clicking the button on the smoke detector three times – but to add a secure node, you should have created a network key in your config.

Click HEAL NETWORK after adding a new node.

Give it a name.

 

Setting node config

The smoke detector will not send a tamper notification if not configured to do so.

Parameter 2: Z-Wave notification status

I selected «all notifications enabled».

Parameter 13: Alarm broadcast

This parameter should set that the smoke detector should broadcast the alarm to the other detectors in the same network. I have not tested this yet, so I’m not sure if they have to be in the same group association or not.

I selected the parameter «Smoke ACTIVE, tamper INACTIVE» – because I don’t see why it should send a tamper status to the other smoke detectors.

Parameter 4: Sound notification status

Is not necessary, but give a little beep if you unmounted the smoke detector.

Tip: It could be useful to restart your HA after adding the node and giving it a name. Doesn’t look like the renaming is affected before a restart. Setting Node config parameters are needs the device to wake up. Clicking the button on the smoke detector once, will wake it up and making it receive the new settings.

My config

I have splitted up my config into multiple files, but here is the basic idea. See my full config on Github.

automations.yaml

# Smoke alert: Livingroom
- alias: 'SmokeAlert Livingroom'
  trigger:
  - platform: state
    entity_id: sensor.fibaro_smoke_livingroom_alarm_level
    to: '255'
  action:
  - service: notify.notify
    data:
        message: "Fire detected in Livingroom"
        title: "Fire!"
  - service: notify.emergency_contact
    data:
        message: "Fire detected in Livingroom"

        
# TamperAlert Livingroom
- alias: 'Smokealarm Tamper Livingroom'
  trigger:
  - platform: state
    entity_id: sensor.fibaro_smoke_livingroom_burglar
    to: '3'
  action:
  - service: notify.ios_robertiphone7
    data:
        message: "Smokedetector livingroom not mounted"
        title: "Smokedetector"

 

customize.yaml

# Template sensors: Smokealarm
    sensor.smokealarm_livingroom:
        entity_picture: /local/icons/smoke_alarm_fibaro.png

 

sensor.yaml

  - platform: template
    sensors:
      smokealarm_livingroom:
        friendly_name: 'Livingroom'
        value_template: >-
          {% if is_state("sensor.fibaro_smoke_livingroom_alarm_level", "255") %}
            Alarm
          {% elif is_state("sensor.fibaro_smoke_livingroom_burglar", "3") %}
            Not mounted
          {% else %}
            Standby
          {% endif %}

  - platform: template
    sensors:
      batt_smoke_livingroom:
        friendly_name: 'Smokedetector livingroom'
        value_template: '{{ states.zwave.fibaro_smoke_livingroom.attributes.battery_level }}'
        unit_of_measurement: '%'

 

group.yaml

The groups are set to view false, as the group themselves are included in other group.

security_smoke_alarm_status:
  name: Røykvarslere
  entities:
  - sensor.smokealarm_livingroom
  - sensor.smokealarm_hallway
  - sensor.smokealarm_gl_bedroom
  - sensor.smokealarm_gl_livingroom
  view: false

sensor_battery:
  name: Batteri
  entities:
  - sensor.batt_smoke_gl_bedroom
  - sensor.batt_smoke_livingroom
  - sensor.batt_smoke_hallway
  view: false

 

The frontend view

This is how it looks in my HA.

«Ikke montert» is Norwegian for «Not mounted». This value shows if I take the smoke detector down.