First Alert Z-Wave Smoke / Carbon Monoxide Detectors don't show up in Home-Assistant

I had the same problem with the first alert detector, solution was to remove the alarm from the network and then add it through HA. From my understanding, the alarm only sends out it’s identifying information once so if you add it with OZWCP you won’t see it next time you launch HA. A restart of HA may also be needed after adding the alarm to get the entity IDs updated.
For the alarm types, 1 is fire alarm, 2 is CO, 12 is the test button, and 13 is stand by, the value seems to normally be 255, if you press the test button the type will change to 12, after the test is over the value will change to 0. After some time, the type changes back to 13 and the value changes to 255. Note: I haven’t confirmed 1 is fire and 2 is CO, I just read that on another forum, I have my alarm go off if the type ever isn’t 13 just to be safe.

Hope that helps!

Kip

3 Likes

Kip, does the alarm report its battery level?

It appears to be, under state attributes for the alarm type and level I get:

“battery_level”: 98,

I’ve only had the alarm for a couple of months so I don’t know if that’s realistic or not.

1 Like

For anyone who’s interested, this is the sensor template I use to show the alarm status (thanks to the information provided by @Kip).

sensor:
- platform: template
  sensors:
    status_smoke_co_alarm:
      value_template: >-
          {%- if is_state("sensor.first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4", "13") %}
              Idle
          {%- elif is_state("sensor.first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4", "1") %}
              Fire Detected
          {%- elif is_state("sensor.first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4", "2") %}
              Carbon Monoxide Detected
          {%- elif is_state("sensor.first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4", "12") %}
              Alarm Testing
          {% else %}
              Unknown
          {%- endif %}
      friendly_name: 'Smoke/CO Alarm'

And for getting battery status:

sensor:
- platform: template
  sensors:
    battery_level_smoke_co_alarm:
      value_template: '{{states.sensor.first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4.attributes.battery_level}}'
      friendly_name: 'Smoke/CO Alarm Battery'
      unit_of_measurement: '%'

The first_alert_zcombo_smoke_and_carbon_monoxide_detector_alarm_type_4 string will vary based on the node ID given by your zwave network. I had to wait some time and/or restart Home Assistant before I got an entity name that included “first_alert_zcombo_smoke_and_carbon_monoxide_detector”. When I first initially included the alarm on the network it just had some generic sensor alarm entity name.

7 Likes

Great template @c32817812, thanks!

Just an update on this. The reason they didn’t show up in HA is because the Command Class wasn’t in there. This is what I have now and it works.

<Node id="3" name="MY ALARM NAME" location="" basic="4" generic="161" specific="0" type="Alarm Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Probe">
		<Manufacturer id="138" name="First Alert Z-Wave Smoke and Carbon Monoxide Alarm">
			<Product type="1" id="2" name="" />
		</Manufacturer>
		<CommandClasses>
			<CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" after_mark="true" mapping="113">
				<Instance index="1" />
			</CommandClass>
			<CommandClass id="113" name="COMMAND_CLASS_ALARM" version="1" request_flags="2">
				<Instance index="1" />
				<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
				<Value type="list" genre="user" instance="1" index="1" label="Alarm Report" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
			</CommandClass>
			<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
			</CommandClass>
			<CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="1" request_flags="2">
				<Instance index="1" />
				<Value type="int" genre="system" instance="1" index="0" label="Wake-up Interval" units="Seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3600" />
			</CommandClass>
		</CommandClasses>
	</Node>
2 Likes

Are you sure it’s not supposed to be the alarm_report that ha the values, 1, 2, 12, and 13? I tested my alarm and the alarm_report is what changed to 12. The alarm_type changed to 255.

Mine was different again - alarm_level goes to 255 when there is an alarm and alarm_type gives the type. After the alarm is over, alarm_level resets to 255, but alarm_type stays at the last value. It also seems possible for alarm_level to go to 255 and alarm_type to go to 13 to represent an idle state. I built this sensor as a result - but I think the lesson here is test the device and see what you actually get!

- platform: template
  sensors:
    upstairs_smoke:
      value_template: '{%- if is_state("sensor.upstairs_smoke_alarm_alarm_level_47_1", "0") %}
                        Idle
                        {%else%}
                          {%- if is_state("sensor.upstairs_smoke_alarm_alarm_type_47_0", "1") %}
                          Fire
                          {%- elif is_state("sensor.upstairs_smoke_alarm_alarm_type_47_0", "2") %}
                          C02
                          {%- elif is_state("sensor.upstairs_smoke_alarm_alarm_type_47_0", "12") %}
                          Testing
                          {%- elif is_state("sensor.upstairs_smoke_alarm_alarm_type_47_0", "13") %}
                          Idle
                          {% else %}
                          Unknown
                          {%- endif %}
                        {%endif%}'
      friendly_name: 'Upstairs Smoke Alarm'
3 Likes

I also wrote a simple AppDaemon App to monitor it, send a notification and turn lights on when it goes off:

import appdaemon.appapi as appapi

#
# App to send notification when a sensor changes state
#
# Args:
#
# sensor: sensor to monitor e.g. sensor.upstairs_smoke
# idle_state - normal state of sensor e.g. Idle
# turn_on - scene or device to activate when sensor changes e.g. scene.house_bright
# Release Notes
#
# Version 1.0:
#   Initial Version

class SensorNotification(appapi.AppDaemon):

  def initialize(self):
    if "sensor" in self.args:
      for sensor in self.split_device_list(self.args["sensor"]):
        self.listen_state(self.state_change, sensor)
    
  def state_change(self, entity, attribute, old, new, kwargs):
    self.log("{} is in state {}".format(self.friendly_name(entity), new))
    self.notify("{} is in state {}".format(self.friendly_name(entity), new), name="ios")    
    if new != self.args["idle_state"] and "turn_on" in self.args:
      self.turn_on(self.args["turn_on"])
3 Likes

And a final point - I bought 1 of these then another 2. The first one fought me with the pairing until I figured it out, the second 2 were flawless when I had the exact sequence down - now very happy with these.

The sequence I used for ZWave pairing was exactly as follows:

  1. Using Open ZWave Control Panel, activate “Add Device”
  2. Only then, hold the test button and close the battery door, wait for the beep, release the button
  3. That’s it - OZWCP will find the device and fill in all details, command classes etc.

Don’t power the device on before pairing, don;t change the order of the above and it should work fine.

4 Likes

Has anyone actually observed the alarm type for smoke or CO? I do get 13 for a test, but have not seen it be a 1 or 2 for smoke or CO yet. Need to do some kind of test I guess.

I tested it by burning some tissue paper and it turned to a 1 for smoke.

For me, this is what worked to get the battery level:

  battery_level_bedroom_smoke_co_alarm:
    value_template: '{{states.zwave.bedroom_smoke_detector.attributes.battery_level}}'
    friendly_name: 'Bedroom Smoke/CO Battery'
    unit_of_measurement: '%'

Wonderful! thanks guys

@aimc I took your awesome template and app and put it to work tonight. But I also added tts with it for my sonos. I did this in SmartThings with the webcore component to speak announcements for my smoke alarms. Worked great for my kiddos. I have this one setup to fire off the initial announcement and then it will repeat itself every 30 seconds as long as the condition remains. Thank you.

import appdaemon.plugins.hass.hassapi as hass

#
# App to send notification when a sensor changes state
#
# Args:
#
# sensor: sensor to monitor e.g. sensor.upstairs_smoke
# idle_state - normal state of sensor e.g. Idle
# turn_on - scene or device to activate when sensor changes e.g. scene.house_bright
# Release Notes
#
# Version 1.0:
#   Initial Version

class SensorNotification(hass.Hass):

  def initialize(self):
    if "sensor" in self.args:
      for sensor in self.split_device_list(self.args["sensor"]):
        self.listen_state(self.state_change, sensor)
    self.media_player = 'group.speakers'

  def state_change(self, entity, attribute, old, new, kwargs):
    self.log("{} is in state {}".format(self.friendly_name(entity), new))
    #self.notify("{} is in state {}".format(self.friendly_name(entity), new), name="ios")
    if new != self.args["idle_state"] and "turn_on" in self.args:
      self.turn_on(self.args["turn_on"])
    if new == "Fire":
        while new == "Fire":
            self.fire_announcement(deviceID=entity)
            self.fire_handle = self.run_in(self.fire_announcement, 30, deviceID=entity)
        else:
            self.cancel_timer(self.fire_handle)
    if new == "CO2":
        while new == "CO2":
            self.co2_announcement(deviceID=entity)
            self.co2_handle = self.run_in(self.co2_announcement, 30, deviceID=entity
        else:
            self.cancel_timer(self.fire_handle)


    def fire_announcement(self,kwargs):
        friendly_name = self.get_state(kwargs['deviceID'], attribute='friendly_name')
        message = "The {} has detected smoke.  Please exit the house immediately through the safest path." .format(friendly_name)
        self.call_service("media_player/volume_set", entity_id=self.media_player, volume_level = 100)
        self.call_service("tts/google_say", entity_id=self.media_player, message=message)

    def co2_announcement(self,kwargs):
        friendly_name = self.get_state(kwargs['deviceID'], attribute='friendly_name')
        message = "The {} has detected carbon monoxide.  Please exit the house immediately through the safest path." .format(friendly_name)
        self.call_service("media_player/volume_set", entity_id=self.media_player, volume_level = 100)
        self.call_service("tts/google_say", entity_id=self.media_player, message=message)

edit: I commented out the notify for the moment while I’m still figuring out which notification platform I want to use. I’m probably also going to do a web call with IFTTT to call my cell phone and my wifes if we’re not home.

1 Like

So I cleaned up my code a good bit for anyone who would like to use this full credit goes to @aimc since I took his and just started adding to it. It will be available from this point forward here
EDIT: Sorry moved my repo to my own internal git server. But here is the code

import appdaemon.plugins.hass.hassapi as hass
import time
import datetime

#
# App to send notification when a sensor changes state
#
# Args:
#
# sensor: sensor to monitor e.g. sensor.upstairs_smoke
# idle_state - normal state of sensor e.g. Idle
# turn_on - scene or device to activate when sensor changes e.g. scene.house_bright
# Release Notes
#
# Version 1.0:
#   Initial Version

class SensorNotification(hass.Hass):

  def initialize(self):
    if "sensor" in self.args:
      for sensor in self.args["sensor"]:
        self.listen_state(self.state_change, sensor)
    self.media_player = 'group.speakers'
    self.alexa = 'group.alexa'

  def state_change(self, entity, attribute, old, new, kwargs):
    self.log("{} is in state {}".format(self.friendly_name(entity), new))
    testing = False
    if new == "Fire":
        self.log("Announcing there is a fire")
        message_text = "The {} has detected smoke.  Please exit the house immediately through the safest path." .format(self.friendly_name(entity))

    elif new == "CO":
        self.log("Announcing there is CO")
        message_text = "The {} has detected carbon monoxide.  Please exit the house immediately through the safest path." .format(self.friendly_name(entity))

    elif new == "Testing":
        testing = True
        self.log("Announcing that we're testing")
        message_text = "The {} has detected test mode.  There is no need for you to panic this is only a test." .format(self.friendly_name(entity))

    elif new == "Idle" and old != "Idle":
        self.log("The {} has gone back to Idle".format(self.friendly_name(entity), new))
        self.cancel_timer(self.timer)

    else:
        self.log("I got an unknown state")
        return

    starttime = datetime.datetime.now() + datetime.timedelta(seconds=1)
    self.timer = self.run_every(self.announcement_cb,starttime,15, message_text=message_text,testing=testing)

  def announcement_cb(self,kwargs):
      self.call_service("media_player/volume_set", entity_id=self.media_player, volume_level = 100)
      self.call_service("tts/google_say", entity_id=self.media_player, message=kwargs["message_text"])
      self.call_service("media_player/alexa_tts", entity_id=self.alexa, message=kwargs["message_text"])
      if not kwargs["testing"]:
          self.call_service("notify/hangouts", message=kwargs["message_text"])
          self.call_service("notify/discord", message=kwargs["message_text"], target="ACCOUNTID")
          for light in self.args["turn_on"]:
              self.turn_on(light)
2 Likes

Just had a thought and wondering if anyone has tried it. Can you set the state of the other alarms to match the state of the alarm that is going off to force them to activate? Kinda like how those alarms are linked to each other so if one goes off the rest go off? Would need to do some thought into this if you can, but I’m assuming since they sleep most of the time it’d be hard to get a command to them until they woke up but hopefully by then it would be a moot point. I guess you could lower the wake up from 3600 to like 300 but that doesn’t sound like a good idea for battery life.

No, this would not work. Changing the state in HA does not change the state of the device. In order to make the smoke alarm go off the device would need to accept such a command and unfortunately it does not.

1 Like

I was given the opportunity to discover a new state for these at 6am today when one of them started chirping 5 times in a row every minute.

According to the zcombo manual, 5 chirps means End of Life. It reported as Level = 255 and Type = 14 in HA, so I’ve updated my template sensors accordingly.

I also see in the manual there is a Malfunction alert with 3 chirps every minute. Since we now know 12-14, I’m going to speculate that will report as type 15. I’ll update if it’s ever confirmed.

3 Likes

It was way past due for me (in the U.S.) to replace my very old AC wired Smoke detectors and I also needed to update to code by adding detectors (battery operated) to all the bedrooms.
I choose two First Alert, models for this project:

I. Smoke and Carbon Monoxide Detector - Battery Powered

  • Model 1044807 (aka ZCombo - 2nd gen).
  • ZWave+ Smart Start
  • 2 AA batteries
  • Sensor Type:
  • ‎Electrochemical (CO), Photoelectric (Smoke)
  • Here are some of the various things you’ll find on the HA Device Page

    Those items in yellow mean they are not enabled in HA
    I have built an automation that makes use of the “Smoke detected” and the “Carbon monoxide detected” binary sensors. Unfortunately, hitting the “test” button on the First Alert does not change the state of these sensors to test out the automation (but FYI, it does change the state of the “Smoke alarm test” sensor).

II. Smoke and CO AC Wired with Interconnect. Connected to Zooz ZEN55

  • SMICO100-AC Interconnect Hardwire 2-in-1 (Meets Newer Standards)

  • Model: 1046874 This is not a ZWave device. But the Zooz Zen55 is

  • Smoke and CO Alarm with Battery Backup

  • Sensor Type: Ionization (Smoke), Electrochemical (CO)

  • Zooz ZEN55

    • ZWave+/LR device Smart Start (connected via Aeotec Gen5+).
    • Connects to the First Alert Interconnect Bus and monitors it for Smoke/CO detection. It can distinguish between Smoke and CO being output on the Interconnect Bus.
    • Here are some of the items that show up on the HA Device Page:

    I have built automations for the “Carbon monoxide detected” and “Smoke detected” binary sensors. Fortunately I can test this automation. When pressing the “test” button on the Smoke/CO detector, it activates the interconnect bus, once for smoke, once for CO, and the ZEN55 picks it up and activates the HA binary sensors.

Hope someone finds this useful. Best Regards.

1 Like