Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions drivers/SmartThings/zwave-siren/src/aeon-siren/can_handle.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local function can_handle_aeon_siren(opts, driver, device, ...)
local AEON_MFR = 0x0086
local AEON_SIREN_PRODUCT_ID = 0x0050

if device.zwave_manufacturer_id == AEON_MFR and device.zwave_product_id == AEON_SIREN_PRODUCT_ID then
return true, require("aeon-siren")
end
return false
end

return can_handle_aeon_siren
24 changes: 4 additions & 20 deletions drivers/SmartThings/zwave-siren/src/aeon-siren/init.lua
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local Basic = (require "st.zwave.CommandClass.Basic")({ version=1 })
local Configuration = (require "st.zwave.CommandClass.Configuration")({ version=1 })

local AEON_MFR = 0x0086
local AEON_SIREN_PRODUCT_ID = 0x0050

local SOUND_TYPE_AND_VOLUME_PARAMETER_NUMBER = 37
local CONFIGURE_SOUND_TYPE = "type"
local SOUND_TYPE_DEFAULT = 1
local CONFIGURE_VOLUME = "volume"
local VOLUME_DEFAULT = 3

local function can_handle_aeon_siren(opts, driver, device, ...)
return device.zwave_manufacturer_id == AEON_MFR and device.zwave_product_id == AEON_SIREN_PRODUCT_ID
end

local function configure_sound(device, sound_type, volume)
if sound_type == nil then sound_type = SOUND_TYPE_DEFAULT end
Expand Down Expand Up @@ -64,7 +48,7 @@ end

local aeon_siren = {
NAME = "aeon-siren",
can_handle = can_handle_aeon_siren,
can_handle = require("aeon-siren.can_handle"),
lifecycle_handlers = {
doConfigure = do_configure,
infoChanged = info_changed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local function can_handle_aeotec_doorbell_siren(opts, driver, device, ...)
local FINGERPRINTS = require("aeotec-doorbell-siren.fingerprints")
for _, fingerprint in ipairs(FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
return true, require("aeotec-doorbell-siren")
end
end
return false
end

return can_handle_aeotec_doorbell_siren
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local AEOTEC_DOORBELL_SIREN_FINGERPRINTS = {
{ manufacturerId = 0x0371, productType = 0x0003, productId = 0x00A2}, -- Aeotec Doorbell 6 (EU)
{ manufacturerId = 0x0371, productType = 0x0103, productId = 0x00A2}, -- Aeotec Doorbell 6 (US)
{ manufacturerId = 0x0371, productType = 0x0203, productId = 0x00A2}, -- Aeotec Doorbell 6 (AU)
{ manufacturerId = 0x0371, productType = 0x0003, productId = 0x00A4}, -- Aeotec Siren 6 (EU)
{ manufacturerId = 0x0371, productType = 0x0103, productId = 0x00A4}, -- Aeotec Siren 6 (US)
{ manufacturerId = 0x0371, productType = 0x0203, productId = 0x00A4}, -- Aeotec Siren 6 (AU)
}

return AEOTEC_DOORBELL_SIREN_FINGERPRINTS
34 changes: 4 additions & 30 deletions drivers/SmartThings/zwave-siren/src/aeotec-doorbell-siren/init.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local capabilities = require "st.capabilities"
local cc = require "st.zwave.CommandClass"
Expand All @@ -20,14 +10,6 @@ local Notification = (require "st.zwave.CommandClass.Notification")({version=3})
local SoundSwitch = (require "st.zwave.CommandClass.SoundSwitch")({version=1})
local preferencesMap = require "preferences"

local AEOTEC_DOORBELL_SIREN_FINGERPRINTS = {
{ manufacturerId = 0x0371, productType = 0x0003, productId = 0x00A2}, -- Aeotec Doorbell 6 (EU)
{ manufacturerId = 0x0371, productType = 0x0103, productId = 0x00A2}, -- Aeotec Doorbell 6 (US)
{ manufacturerId = 0x0371, productType = 0x0203, productId = 0x00A2}, -- Aeotec Doorbell 6 (AU)
{ manufacturerId = 0x0371, productType = 0x0003, productId = 0x00A4}, -- Aeotec Siren 6 (EU)
{ manufacturerId = 0x0371, productType = 0x0103, productId = 0x00A4}, -- Aeotec Siren 6 (US)
{ manufacturerId = 0x0371, productType = 0x0203, productId = 0x00A4}, -- Aeotec Siren 6 (AU)
}

local COMPONENT_NAME = "componentName"
local TONE = "tone"
Expand All @@ -51,14 +33,6 @@ local BUTTON_BATTERY_NORMAL = 99
local DEVICE_PROFILE_CHANGE_IN_PROGRESS = "device_profile_change_in_progress"
local NEXT_BUTTON_BATTERY_EVENT_DETAILS = "next_button_battery_event_details"

local function can_handle_aeotec_doorbell_siren(opts, driver, device, ...)
for _, fingerprint in ipairs(AEOTEC_DOORBELL_SIREN_FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
return true
end
end
return false
end

local function querySoundStatus(device)
for endpoint = 2, NUMBER_OF_SOUND_COMPONENTS do
Expand Down Expand Up @@ -316,7 +290,7 @@ end

local aeotec_doorbell_siren = {
NAME = "aeotec-doorbell-siren",
can_handle = can_handle_aeotec_doorbell_siren,
can_handle = require("aeotec-doorbell-siren.can_handle"),

lifecycle_handlers = {
added = device_added,
Expand Down
17 changes: 17 additions & 0 deletions drivers/SmartThings/zwave-siren/src/apiv6_bugfix/can_handle.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local function can_handle(opts, driver, device, cmd, ...)
local cc = require "st.zwave.CommandClass"
local WakeUp = (require "st.zwave.CommandClass.WakeUp")({ version = 1 })
local version = require "version"
if version.api == 6 and
cmd.cmd_class == cc.WAKE_UP and
cmd.cmd_id == WakeUp.NOTIFICATION
then
return true, require("apiv6_bugfix")
end
return false
end

return can_handle
11 changes: 4 additions & 7 deletions drivers/SmartThings/zwave-siren/src/apiv6_bugfix/init.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local cc = require "st.zwave.CommandClass"
local WakeUp = (require "st.zwave.CommandClass.WakeUp")({ version = 1 })


local function can_handle(opts, driver, device, cmd, ...)
local version = require "version"
return version.api == 6 and
cmd.cmd_class == cc.WAKE_UP and
cmd.cmd_id == WakeUp.NOTIFICATION
end

local function wakeup_notification(driver, device, cmd)
device:refresh()
Expand All @@ -20,7 +17,7 @@ local apiv6_bugfix = {
}
},
NAME = "apiv6_bugfix",
can_handle = can_handle
can_handle = require("apiv6_bugfix.can_handle"),
}

return apiv6_bugfix
16 changes: 3 additions & 13 deletions drivers/SmartThings/zwave-siren/src/configurations.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local devices = {
YALE_SIREN = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local function can_handle_ecolink_wireless_siren(opts, driver, device, ...)
local FINGERPRINTS = require("ecolink-wireless-siren.fingerprints")
for _, fingerprint in ipairs(FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
return true, require("ecolink-wireless-siren")
end
end
return false
end

return can_handle_ecolink_wireless_siren
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local ECOLINK_WIRELESS_SIREN_FINGERPRINTS = {
{ manufacturerId = 0x014A, productType = 0x0005, productId = 0x000A }, -- Ecolink Siren
}

return ECOLINK_WIRELESS_SIREN_FINGERPRINTS
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local capabilities = require "st.capabilities"
--- @type st.zwave.CommandClass
Expand All @@ -20,18 +10,7 @@ local Basic = (require "st.zwave.CommandClass.Basic")({ version = 1 })
--- @type st.zwave.CommandClass.SwitchBinary
local SwitchBinary = (require "st.zwave.CommandClass.SwitchBinary")({ version = 2 })

local ECOLINK_WIRELESS_SIREN_FINGERPRINTS = {
{ manufacturerId = 0x014A, productType = 0x0005, productId = 0x000A }, -- Ecolink Siren
}

local function can_handle_ecolink_wireless_siren(opts, driver, device, ...)
for _, fingerprint in ipairs(ECOLINK_WIRELESS_SIREN_FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
return true
end
end
return false
end

local function basic_set_handler(driver, device, cmd)
local value = cmd.args.target_value and cmd.args.target_value or cmd.args.value
Expand Down Expand Up @@ -103,7 +82,7 @@ local ecolink_wireless_siren = {
lifecycle_handlers = {
init = device_init
},
can_handle = can_handle_ecolink_wireless_siren,
can_handle = require("ecolink-wireless-siren.can_handle"),
}

return ecolink_wireless_siren
13 changes: 13 additions & 0 deletions drivers/SmartThings/zwave-siren/src/fortrezz/can_handle.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local function can_handle_fortrezz_siren(opts, self, device, ...)
if device.zwave_manufacturer_id == 0x0084 and
device.zwave_product_type == 0x0313 and
device.zwave_product_id == 0x010B then
return true, require("fortrezz")
end
return false
end

return can_handle_fortrezz_siren
25 changes: 5 additions & 20 deletions drivers/SmartThings/zwave-siren/src/fortrezz/init.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local cc = require "st.zwave.CommandClass"
local capabilities = require "st.capabilities"
local Basic = (require "st.zwave.CommandClass.Basic")({version=1})

local function can_handle_fortrezz_siren(opts, self, device, ...)
return device.zwave_manufacturer_id == 0x0084 and
device.zwave_product_type == 0x0313 and
device.zwave_product_id == 0x010B
end

local function set_and_get(value)
return function (self, device, command)
Expand All @@ -47,7 +32,7 @@ end

local fortrezz_siren = {
NAME = "fortrezz-siren",
can_handle = can_handle_fortrezz_siren,
can_handle = require("fortrezz.can_handle"),
capability_handlers = {
[capabilities.alarm.ID] = {
[capabilities.alarm.commands.siren.NAME] = set_and_get(0x42),
Expand All @@ -67,4 +52,4 @@ local fortrezz_siren = {
}
}

return fortrezz_siren
return fortrezz_siren
30 changes: 4 additions & 26 deletions drivers/SmartThings/zwave-siren/src/init.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Copyright 2022 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0


local capabilities = require "st.capabilities"
local cap_defaults = require "st.capabilities.defaults"
Expand Down Expand Up @@ -92,19 +82,7 @@ local driver_template = {
capabilities.relativeHumidityMeasurement,
capabilities.chime
},
sub_drivers = {
require("multifunctional-siren"),
require("zwave-sound-sensor"),
require("ecolink-wireless-siren"),
require("philio-sound-siren"),
require("aeotec-doorbell-siren"),
require("aeon-siren"),
require("yale-siren"),
require("zipato-siren"),
require("utilitech-siren"),
require("fortrezz"),
require("apiv6_bugfix"),
},
sub_drivers = require("sub_drivers"),
lifecycle_handlers = {
infoChanged = info_changed,
doConfigure = do_configure,
Expand Down
Loading
Loading