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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

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

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

local AEOTEC_MULTISENSOR_FINGERPRINTS = {
{ manufacturerId = 0x0086, productId = 0x0064 }, -- MultiSensor 6
{ manufacturerId = 0x0371, productId = 0x0018 }, -- MultiSensor 7
}

return AEOTEC_MULTISENSOR_FINGERPRINTS
37 changes: 4 additions & 33 deletions drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/init.lua
Original file line number Diff line number Diff line change
@@ -1,38 +1,12 @@
-- 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
local cc = require "st.zwave.CommandClass"
--- @type st.zwave.CommandClass.Notification
local Notification = (require "st.zwave.CommandClass.Notification")({ version = 3 })

local AEOTEC_MULTISENSOR_FINGERPRINTS = {
{ manufacturerId = 0x0086, productId = 0x0064 }, -- MultiSensor 6
{ manufacturerId = 0x0371, productId = 0x0018 }, -- MultiSensor 7
}

local function can_handle_aeotec_multisensor(opts, self, device, ...)
for _, fingerprint in ipairs(AEOTEC_MULTISENSOR_FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
local subdriver = require("aeotec-multisensor")
return true, subdriver
end
end
return false
end

local function notification_report_handler(self, device, cmd)
local event
if cmd.args.notification_type == Notification.notification_type.POWER_MANAGEMENT then
Expand Down Expand Up @@ -61,12 +35,9 @@ local aeotec_multisensor = {
[Notification.REPORT] = notification_report_handler
}
},
sub_drivers = {
require("aeotec-multisensor/multisensor-6"),
require("aeotec-multisensor/multisensor-7")
},
sub_drivers = require("aeotec-multisensor.sub_drivers"),
NAME = "aeotec multisensor",
can_handle = can_handle_aeotec_multisensor
can_handle = require("aeotec-multisensor.can_handle"),
}

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

local function can_handle_multisensor_6(opts, self, device, ...)
local MULTISENSOR_6_PRODUCT_ID = 0x0064
if device.zwave_product_id == MULTISENSOR_6_PRODUCT_ID then
return true, require("aeotec-multisensor.multisensor-6")
end
return false
end
return can_handle_multisensor_6
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
-- 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 @@ -19,12 +10,8 @@ local cc = require "st.zwave.CommandClass"
local Configuration = (require "st.zwave.CommandClass.Configuration")({ version = 2 })
local WakeUp = (require "st.zwave.CommandClass.WakeUp")({version = 2})

local MULTISENSOR_6_PRODUCT_ID = 0x0064
local PREFERENCE_NUM = 9

local function can_handle_multisensor_6(opts, self, device, ...)
return device.zwave_product_id == MULTISENSOR_6_PRODUCT_ID
end

local function wakeup_notification(driver, device, cmd)
--Note sending WakeUpIntervalGet the first time a device wakes up will happen by default in Lua libs 0.49.x and higher
Expand Down Expand Up @@ -62,7 +49,7 @@ local multisensor_6 = {
}
},
NAME = "aeotec multisensor 6",
can_handle = can_handle_multisensor_6
can_handle = require("aeotec-multisensor.multisensor-6.can_handle"),
}

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

local function can_handle_multisensor_7(opts, self, device, ...)
local MULTISENSOR_7_PRODUCT_ID = 0x0018
if device.zwave_product_id == MULTISENSOR_7_PRODUCT_ID then
return true, require("aeotec-multisensor.multisensor-7")
end
return false
end

return can_handle_multisensor_7
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
-- 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 @@ -19,13 +10,8 @@ local cc = require "st.zwave.CommandClass"
local Configuration = (require "st.zwave.CommandClass.Configuration")({ version = 2 })
local WakeUp = (require "st.zwave.CommandClass.WakeUp")({ version = 2 })

local MULTISENSOR_7_PRODUCT_ID = 0x0018
local PREFERENCE_NUM = 10

local function can_handle_multisensor_7(opts, self, device, ...)
return device.zwave_product_id == MULTISENSOR_7_PRODUCT_ID
end

local function wakeup_notification(driver, device, cmd)
--Note sending WakeUpIntervalGet the first time a device wakes up will happen by default in Lua libs 0.49.x and higher
--This is done to help the hub correctly set the checkInterval for migrated devices.
Expand Down Expand Up @@ -62,7 +48,7 @@ local multisensor_7 = {
}
},
NAME = "aeotec multisensor 7",
can_handle = can_handle_multisensor_7
can_handle = require("aeotec-multisensor.multisensor-7.can_handle"),
}

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

local lazy_load_if_possible = require "lazy_load_subdriver"
local sub_drivers = {
lazy_load_if_possible("aeotec-multisensor/multisensor-6"),
lazy_load_if_possible("aeotec-multisensor/multisensor-7"),
}
return sub_drivers
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

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

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

local ZWAVE_WATER_TEMP_HUMIDITY_FINGERPRINTS = {
{ manufacturerId = 0x0371, productType = 0x0002, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro EU
{ manufacturerId = 0x0371, productType = 0x0102, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro US
{ manufacturerId = 0x0371, productType = 0x0202, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro AU
{ manufacturerId = 0x0371, productId = 0x0012 } -- Aeotec Water Sensor 7
}

return ZWAVE_WATER_TEMP_HUMIDITY_FINGERPRINTS
34 changes: 5 additions & 29 deletions drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor/init.lua
Original file line number Diff line number Diff line change
@@ -1,40 +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 capabilities = require "st.capabilities"
--- @type st.zwave.CommandClass
local cc = require "st.zwave.CommandClass"
--- @type st.zwave.CommandClass.Notification
local Notification = (require "st.zwave.CommandClass.Notification")({ version = 3 })

local ZWAVE_WATER_TEMP_HUMIDITY_FINGERPRINTS = {
{ manufacturerId = 0x0371, productType = 0x0002, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro EU
{ manufacturerId = 0x0371, productType = 0x0102, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro US
{ manufacturerId = 0x0371, productType = 0x0202, productId = 0x0013 }, -- Aeotec Water Sensor 7 Pro AU
{ manufacturerId = 0x0371, productId = 0x0012 } -- Aeotec Water Sensor 7
}

--- Determine whether the passed device is zwave water temperature humidiry sensor
local function can_handle_zwave_water_temp_humidity_sensor(opts, driver, device, ...)
for _, fingerprint in ipairs(ZWAVE_WATER_TEMP_HUMIDITY_FINGERPRINTS) do
if device:id_match(fingerprint.manufacturerId, fingerprint.productType, fingerprint.productId) then
local subdriver = require("aeotec-water-sensor")
return true, subdriver
end
end
return false
end

--- Default handler for notification command class reports
---
Expand Down Expand Up @@ -68,7 +44,7 @@ local zwave_water_temp_humidity_sensor = {
},
},
NAME = "zwave water temp humidity sensor",
can_handle = can_handle_zwave_water_temp_humidity_sensor
can_handle = require("aeotec-water-sensor.can_handle"),
}

return zwave_water_temp_humidity_sensor
35 changes: 35 additions & 0 deletions drivers/SmartThings/zwave-sensor/src/apiv6_bugfix/can_handle.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- 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 })

-- doing refresh would cause incorrect state for device, see comments in wakeup-no-poll
local NORTEK_FP = {mfr = 0x014F, prod = 0x2001, model = 0x0102} -- NorTek open/close sensor
local POPP_THERMOSTAT_FP = {mfr = 0x0002, prod = 0x0115, model = 0xA010} --Popp thermostat
local AEOTEC_MULTISENSOR_6_FP = {mfr = 0x0086, model = 0x0064} --Aeotec multisensor 6
local AEOTEC_MULTISENSOR_7_FP = {mfr = 0x0371, model = 0x0018} --Aeotec multisensor 7
local ENERWAVE_MOTION_FP = {mfr = 0x011A} --Enerwave motion sensor
local HOMESEER_MULTI_SENSOR_FP = {mfr = 0x001E, prod = 0x0002, model = 0x0001} -- Homeseer multi sensor HSM100
local SENSATIVE_STRIP_FP = {mfr = 0x019A, model = 0x000A}
local FPS = {NORTEK_FP, POPP_THERMOSTAT_FP,
AEOTEC_MULTISENSOR_6_FP, AEOTEC_MULTISENSOR_7_FP,
ENERWAVE_MOTION_FP, HOMESEER_MULTI_SENSOR_FP, SENSATIVE_STRIP_FP}

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

for _, fp in ipairs(FPS) do
if device:id_match(fp.mfr, fp.prod, fp.model) then return false end
end
local subdriver = require("apiv6_bugfix")
return true, subdriver
else
return false
end
end

return can_handle
33 changes: 4 additions & 29 deletions drivers/SmartThings/zwave-sensor/src/apiv6_bugfix/init.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
-- 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 })

-- doing refresh would cause incorrect state for device, see comments in wakeup-no-poll
local NORTEK_FP = {mfr = 0x014F, prod = 0x2001, model = 0x0102} -- NorTek open/close sensor
local POPP_THERMOSTAT_FP = {mfr = 0x0002, prod = 0x0115, model = 0xA010} --Popp thermostat
local AEOTEC_MULTISENSOR_6_FP = {mfr = 0x0086, model = 0x0064} --Aeotec multisensor 6
local AEOTEC_MULTISENSOR_7_FP = {mfr = 0x0371, model = 0x0018} --Aeotec multisensor 7
local ENERWAVE_MOTION_FP = {mfr = 0x011A} --Enerwave motion sensor
local HOMESEER_MULTI_SENSOR_FP = {mfr = 0x001E, prod = 0x0002, model = 0x0001} -- Homeseer multi sensor HSM100
local SENSATIVE_STRIP_FP = {mfr = 0x019A, model = 0x000A}
local FPS = {NORTEK_FP, POPP_THERMOSTAT_FP,
AEOTEC_MULTISENSOR_6_FP, AEOTEC_MULTISENSOR_7_FP,
ENERWAVE_MOTION_FP, HOMESEER_MULTI_SENSOR_FP, SENSATIVE_STRIP_FP}

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

for _, fp in ipairs(FPS) do
if device:id_match(fp.mfr, fp.prod, fp.model) then return false end
end
local subdriver = require("apiv6_bugfix")
return true, subdriver
else
return false
end
end

local function wakeup_notification(driver, device, cmd)
device:refresh()
end
Expand All @@ -40,7 +15,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-sensor/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


--- @type st.zwave.CommandClass.Configuration
local Configuration = (require "st.zwave.CommandClass.Configuration")({ version=4 })
Expand Down
Loading
Loading