Yes, you may have to reset them if it’s not showing up. Pull battery tray out, then while pressing and holding button put tray in and hold button for 10+ seconds should make weird beep three ish times. Now that it’s reset. Repeat pairing procedure. You may have to repeat pairing a few times to completely set up the node.
I’ve tried to reset them without any luck, unfortunately.
Original author here. I’ve gone from SmartThings -> Native Z-Wave -> SmartThings -> zwave2mqtt. I’ve been extremely happy with zwave2mqtt since I’m not rebuilding my entire mesh every time that I restart HA. That being said, I switched these over to a binary sensor that doesn’t care if it’s smoke or CO. Here’s the binary_sensor template if anyone is interested:
- platform: template
sensors:
smoke_detector_basement_status:
friendly_name: 'Smoke - Basement Status'
device_class: 'smoke'
value_template: >-
{{ (is_state("sensor.smoke_detector_basement_alarm_level", "255") and is_state("sensor.smoke_detector_basement_alarm_type", "1")) or
(is_state("sensor.smoke_detector_basement_alarm_level", "255") and is_state("sensor.smoke_detector_basement_alarm_type", "2")) }}
smoke_detector_main_floor_status:
friendly_name: 'Smoke - Main Floor Status'
device_class: 'smoke'
value_template: >-
{{ (is_state("sensor.smoke_detector_main_floor_alarm_level", "255") and is_state("sensor.smoke_detector_main_floor_alarm_type", "1")) or
(is_state("sensor.smoke_detector_main_floor_alarm_level", "255") and is_state("sensor.smoke_detector_main_floor_alarm_type", "2")) }}
smoke_detector_upstairs_status:
friendly_name: 'Smoke - Upstairs Status'
device_class: 'smoke'
value_template: >-
{{ (is_state("sensor.smoke_detector_upstairs_alarm_level", "255") and is_state("sensor.smoke_detector_upstairs_alarm_type", "1")) or
(is_state("sensor.smoke_detector_upstairs_alarm_level", "255") and is_state("sensor.smoke_detector_upstairs_alarm_type", "2")) }}
where do you put this, in configuration.yaml?
I’ve got this in configuration.yaml
:
binary_sensor: !include_dir_merge_list binary_sensors
In then in the binary_sensors
directory, I have a file named templates.yaml
. That contains the text above.
@Turbo4door I’ve tried to reset them without any luck, unfortunately.
There is another thread about issues pairing with this device. Summary:
- Pair it as stated in the manual. It will go to sleep before finishing, and HA will report “initializing”.
- Pull the battery tray out, wait a few seconds. Push test button and keep depressed, insert battery tray. Release button immediately when the device beeps.
- Repeat step 2 until HA reports “sleeping” for the device. At this point, I only had a battery_level sensor.
- Restart HA. You should now see _alarm_level and _alarm_type sensors for this node.
Hope that helps.
Just got some of these, and have successfully ish set up the first one with HA. I got the node’s query stage to show as sleeping for a bit. However, when I would test the smoke detector, to confirm that the entity was changing as expected, it would change to a code of 12, but it would never change back. Anyone else see this behaviour?
Now after power cycling the smoke detector and restarting HA I am back to the initializing thing for some reason.
Yeah, they’re weird like that. That doesn’t matter if you’re using my binary sensor that I have listed above. It’s basically “your house is on fire” versus anything else.
McNutty195: However, when I would test the smoke detector, to confirm that the entity was changing as expected, it would change to a code of 12, but it would never change back.
These appear to not wake up often, so after the test it will sit about an hour then change back. At least… that’s what mine do in just a few tests. That’s my guess on waking up… when healing the network these may go a day and stay “initializing” but if I manually wake them up they chime in and the controller puts them back in “sleeping” mode.
It may hang in initializing after power-up for an extended time. Just do the “batteries out, test button, batteries in” maneuver so it wakes up and it should be put to sleep. Good luck… it’s amazing to me how differently these different devices behave.
Thanks for the reply. Yeah it isn’t really a big deal, just wondered if anyone else was seeing this behavior.
Understood. Yeah, can’t really say I’m a fan of Z-wave devices. They all seem to be really irritable and finiky. I have a z-wave lock and now these smoke alarms. Even the old door sensors I had for my smartthings system before HA were all this way.
They seem to work once you get them set up for the most part, but the initial setup seems to to always be pretty cumbersome.
They’re in sleep mode almost the entire time. This was both for SmartThings and OpenZWave. Minus actual alerts or the test button, they rarely seem to send anything. I’ve also had to pop the batteries out and put them back in just to get the battery percentage to update. That being said, I’ve never had them fail to send an alert when I’ve tested them.
That’s good to know. Yeah, the sleep settings seem a little over zealous. Then again, changing batteries less is nice and aggressive sleep settings is about the only way to accomplish that without hardwiring something.
Is there a way to stop the sounding alarm (e.g. when it goes off during cooking) from HA?
No, the alarm does not receive any commands like that.
I followed all the instructions here and have been able to get the smoke/co2 detector out of init and through dynamic. I also have the new states in lovelace.
However I in the Automations tab I only see Do something when battery level changes. I don’t see any alerts for the Co2 or Smoke.
How am I suppose to trigger events if the alerts don’t show up as triggers? I now have two of these devices connected to my zwave network.
Thanks!
How am I suppose to trigger events if the alerts don’t show up as triggers?
You’ll have to write the automations out without using the device automation editor.
Thanks for the overview but do you know how to get the naming conventions correct? I assume most people are using this to send alerts when the fire or CO2 alerts are sent to HA.
I ended up calling mine smoke alarm 1 & smoke alarm 2 since when I paired them I wasn’t sure where I was putting them.
Since then I put one in my livinroom and one in my basement.
Here is the code for displaying the status of the detectors in the UI and for sending me notifications on an alarm if I’m not home.
sensor:
platform: template
sensors:
basement_smoke_alarm_status:
friendly_name: 'Basement Smoke Alarm Status'
value_template: >-
{% if is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "1")%}
Smoke!
{% elif is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "2")%}
CO!
{% elif is_state("sensor.smoke_co_alarm_1_alarm_level", "0") and is_state("sensor.smoke_co_alarm_1_alarm_type", "12")%}
Testing
{% else %}
OK
{% endif %}
icon_template: >-
{% if is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "1")%}
mdi:fire
{% elif is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "2")%}
mdi:cloud-outline
{% else %}
mdi:smoke-detector
{% endif %}
livingroom_smoke_alarm_status:
friendly_name: 'Livingroom Smoke Alarm Status'
value_template: >-
{% if is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "1")%}
Smoke!
{% elif is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "2")%}
CO!
{% elif is_state("sensor.smoke_co_alarm_2_alarm_level", "0") and is_state("sensor.smoke_co_alarm_2_alarm_type", "12")%}
Testing
{% else %}
OK
{% endif %}
icon_template: >-
{% if is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "1")%}
mdi:fire
{% elif is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "2")%}
mdi:cloud-outline
{% else %}
mdi:smoke-detector
{% endif %}
automation:
- alias: Notification Smoke Alarm Basement
initial_state: 'off'
trigger:
platform: template
value_template: >
{% if (is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "1"))
or (is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "2"))%}
true
{% else %}
false
{% endif %}
action:
- service: notify.pushbullet_notify
data_template:
message: >
{% if (is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "1")) %}
'Smoke Alarm 1 is Going Off For Smoke!'
{% elif (is_state("sensor.smoke_co_alarm_1_alarm_level", "255") and is_state("sensor.smoke_co_alarm_1_alarm_type", "2")) %}
'Smoke Alarm 1 is Going Off For CO!'
{% endif %}
- alias: Notification Smoke Alarm Livingroom
initial_state: 'off'
trigger:
platform: template
value_template: >
{% if (is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "1"))
or (is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "2"))%}
true
{% else %}
false
{% endif %}
action:
- service: notify.pushbullet_notify
data_template:
message: >
{% if (is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "1")) %}
'Smoke Alarm 2 is Going Off For Smoke!'
{% elif (is_state("sensor.smoke_co_alarm_2_alarm_level", "255") and is_state("sensor.smoke_co_alarm_2_alarm_type", "2")) %}
'Smoke Alarm 2 is Going Off For CO!'
{% endif %}
- alias: Notification Smoke Alarm Testing
initial_state: 'off'
trigger:
- platform: state
entity_id: sensor.basement_smoke_alarm_status
to: 'Testing'
- platform: state
entity_id: sensor.livingroom_smoke_alarm_status
to: 'Testing'
action:
- service: notify.pushbullet_notify
data_template:
message: >
{% if trigger.to_state.entity_id == 'sensor.basement_smoke_alarm_status' %}
'Testing the Basement Smoke Alarm'
{% elif trigger.to_state.entity_id == 'sensor.livingroom_smoke_alarm_status' %}
'Testing the Livingroom Smoke Alarm'
{% endif %}
- alias: Delay Smoke Alarm Notify After Homeassistant Startup
initial_state: 'on'
trigger:
platform: event
event_type: zwave.network_ready
action:
- service: automation.turn_on
entity_id:
- automation.notification_smoke_alarm_basement
- automation.notification_smoke_alarm_livingroom
- automation.notification_smoke_alarm_testing
- alias: Delay Smoke Alarm Notify After Automation Reload
initial_state: 'on'
trigger:
platform: event
event_type: call_service
event_data:
domain: automation
service: reload
action:
- delay: '00:00:10'
- service: automation.trigger
entity_id: automation.delay_smoke_alarm_notify_after_homeassistant_startup
I needed to put the notification delay in after restart or automation reload because I was getting spurious notifications at those times.
I’m not sure if this is what you were asking but it should hopefully help.
Thanks so much. That looks really good so far. I do have one more question about the automation. If I put this in the configuration yaml then I don’t think I would need an automation ID. However the configuration can get messy (so I’m told) and I believe I can add this directly to the automations.yaml, however I am not sure how to create a valid ID.
Can you suggest a way to add this to either the configuration.yaml or the automations.yaml? I would like to create good habits now to make things easier in the future!