Skip to content

Commit 6ca7abe

Browse files
Merge branch 'SmartThingsCommunity:main' into Bosch_motion_sensor_support
2 parents 0723d13 + 1f59baa commit 6ca7abe

File tree

25 files changed

+234
-137
lines changed

25 files changed

+234
-137
lines changed

drivers/SmartThings/matter-switch/fingerprints.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,41 @@ matterManufacturer:
910910
vendorId: 0x1189
911911
productId: 0x0AC3
912912
deviceProfileName: light-color-level
913+
- id: "4489/61444"
914+
deviceLabel: OSRAM MATTER PLUG UK
915+
vendorId: 0x1189
916+
productId: 0xF004
917+
deviceProfileName: plug-binary
918+
- id: "4489/61443"
919+
deviceLabel: OSRAM MATTER PLUG EU WH
920+
vendorId: 0x1189
921+
productId: 0xF003
922+
deviceProfileName: plug-binary
923+
- id: "4489/61441"
924+
deviceLabel: OSRAM MATTER CLASSIC A 60W
925+
vendorId: 0x1189
926+
productId: 0xF001
927+
deviceProfileName: light-color-level
928+
- id: "4489/2353"
929+
deviceLabel: SMART MATTER FLOORCORN200 MGC WT
930+
vendorId: 0x1189
931+
productId: 0x0931
932+
deviceProfileName: light-color-level
933+
- id: "4489/2350"
934+
deviceLabel: SMART MATTER FLOORCORN140 MGC BK
935+
vendorId: 0x1189
936+
productId: 0x092E
937+
deviceProfileName: light-color-level
938+
- id: "4489/2352"
939+
deviceLabel: SMART MATTER FLOORCORN140 MGC WT
940+
vendorId: 0x1189
941+
productId: 0x0930
942+
deviceProfileName: light-color-level
943+
- id: "4489/2351"
944+
deviceLabel: SMART MATTER FLOORCORN200 MGC BK
945+
vendorId: 0x1189
946+
productId: 0x092F
947+
deviceProfileName: light-color-level
913948
#Shelly
914949
- id: "5264/1"
915950
deviceLabel: Shelly Plug S MTR Gen3

drivers/SmartThings/matter-thermostat/fingerprints.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ matterManufacturer:
5050
vendorId: 0x1206
5151
productId: 0x0001
5252
deviceProfileName: thermostat-nostate-nobattery
53+
- id: "4614/17"
54+
deviceLabel: LUX TQX Smart Thermostat
55+
vendorId: 0x1206
56+
productId: 0x0011
57+
deviceProfileName: thermostat-humidity-nostate-nobattery
5358
#Meross
5459
- id: "4933/57345"
5560
deviceLabel: Smart Wi-Fi Thermostat

drivers/SmartThings/zigbee-bed/src/shus-mattress/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ end
3636

3737
local function process_control_attr_factory(cmd)
3838
return function(driver, device, value, zb_rx)
39-
device:emit_event(cmd.idle())
39+
device:emit_event(cmd("idle", { visibility = { displayed = false }}))
4040
end
4141
end
4242

@@ -129,7 +129,7 @@ local function process_capabilities_hardness_factory(cap,attrs,cap_attr)
129129
)
130130
--A button that can be triggered continuously
131131
local evt_ctrl = cap_attr.soft()
132-
local evt_idle = cap_attr.idle()
132+
local evt_idle = cap_attr("idle", { visibility = { displayed = false }})
133133
if cmd.args[cap] == "hard" then
134134
evt_ctrl = cap_attr.hard()
135135
end
@@ -148,7 +148,7 @@ local function device_init(driver, device)
148148
end
149149

150150
local function device_added(driver, device)
151-
device:emit_event(custom_capabilities.yoga.supportedYogaState({"stop", "left", "right"}))
151+
device:emit_event(custom_capabilities.yoga.supportedYogaState({"stop", "left", "right"}, { visibility = { displayed = false }}))
152152
do_refresh(driver, device)
153153
end
154154

drivers/SmartThings/zigbee-bed/src/test/test_shus_mattress.lua

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test.register_coroutine_test(
5959
function()
6060
test.socket.device_lifecycle:__queue_receive({ mock_device.id, "added" })
6161
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
62-
custom_capabilities.yoga.supportedYogaState({"stop", "left", "right"}) ))
62+
custom_capabilities.yoga.supportedYogaState({"stop", "left", "right"}, { visibility = { displayed = false }}) ))
6363
local read_0x0006_messge = cluster_base.read_manufacturer_specific_attribute(mock_device, PRIVATE_CLUSTER_ID, 0x0006, MFG_CODE)
6464
local read_0x0007_messge = cluster_base.read_manufacturer_specific_attribute(mock_device, PRIVATE_CLUSTER_ID, 0x0007, MFG_CODE)
6565
local read_0x0009_messge = cluster_base.read_manufacturer_specific_attribute(mock_device, PRIVATE_CLUSTER_ID, 0x0009, MFG_CODE)
@@ -140,7 +140,7 @@ test.register_coroutine_test(
140140
)
141141

142142
test.register_coroutine_test(
143-
"Device reported leftback 0 and driver emit custom_capabilities.left_control.leftback.idle()",
143+
"Device reported leftback 0 and driver emit custom_capabilities.left_control.leftback.idle({ visibility = { displayed = false }})",
144144
function()
145145
local attr_report_data = {
146146
{ 0x0000, data_types.Uint8.ID, 0 }
@@ -150,12 +150,12 @@ test.register_coroutine_test(
150150
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
151151
})
152152
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
153-
custom_capabilities.left_control.leftback.idle()))
153+
custom_capabilities.left_control.leftback.idle({ visibility = { displayed = false }})))
154154
end
155155
)
156156

157157
test.register_coroutine_test(
158-
"Device reported leftback 1 and driver emit custom_capabilities.left_control.leftback.idle()",
158+
"Device reported leftback 1 and driver emit custom_capabilities.left_control.leftback.idle({ visibility = { displayed = false }})",
159159
function()
160160
local attr_report_data = {
161161
{ 0x0000, data_types.Uint8.ID, 1 }
@@ -165,12 +165,12 @@ test.register_coroutine_test(
165165
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
166166
})
167167
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
168-
custom_capabilities.left_control.leftback.idle()))
168+
custom_capabilities.left_control.leftback.idle({ visibility = { displayed = false }})))
169169
end
170170
)
171171

172172
test.register_coroutine_test(
173-
"Device reported leftwaist 0 and driver emit custom_capabilities.left_control.leftwaist.idle()",
173+
"Device reported leftwaist 0 and driver emit custom_capabilities.left_control.leftwaist.idle({ visibility = { displayed = false }})",
174174
function()
175175
local attr_report_data = {
176176
{ 0x0001, data_types.Uint8.ID, 0 }
@@ -180,12 +180,12 @@ test.register_coroutine_test(
180180
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
181181
})
182182
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
183-
custom_capabilities.left_control.leftwaist.idle()))
183+
custom_capabilities.left_control.leftwaist.idle({ visibility = { displayed = false }})))
184184
end
185185
)
186186

187187
test.register_coroutine_test(
188-
"Device reported leftwaist 1 and driver emit custom_capabilities.left_control.leftwaist.idle()",
188+
"Device reported leftwaist 1 and driver emit custom_capabilities.left_control.leftwaist.idle({ visibility = { displayed = false }})",
189189
function()
190190
local attr_report_data = {
191191
{ 0x0001, data_types.Uint8.ID, 1 }
@@ -195,12 +195,12 @@ test.register_coroutine_test(
195195
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
196196
})
197197
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
198-
custom_capabilities.left_control.leftwaist.idle()))
198+
custom_capabilities.left_control.leftwaist.idle({ visibility = { displayed = false }})))
199199
end
200200
)
201201

202202
test.register_coroutine_test(
203-
"Device reported lefthip 0 and driver emit custom_capabilities.left_control.lefthip.idle()",
203+
"Device reported lefthip 0 and driver emit custom_capabilities.left_control.lefthip.idle({ visibility = { displayed = false }})",
204204
function()
205205
local attr_report_data = {
206206
{ 0x0002, data_types.Uint8.ID, 0 }
@@ -210,12 +210,12 @@ test.register_coroutine_test(
210210
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
211211
})
212212
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
213-
custom_capabilities.left_control.lefthip.idle()))
213+
custom_capabilities.left_control.lefthip.idle({ visibility = { displayed = false }})))
214214
end
215215
)
216216

217217
test.register_coroutine_test(
218-
"Device reported lefthip 1 and driver emit custom_capabilities.left_control.lefthip.idle()",
218+
"Device reported lefthip 1 and driver emit custom_capabilities.left_control.lefthip.idle({ visibility = { displayed = false }})",
219219
function()
220220
local attr_report_data = {
221221
{ 0x0002, data_types.Uint8.ID, 1 }
@@ -225,12 +225,12 @@ test.register_coroutine_test(
225225
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
226226
})
227227
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
228-
custom_capabilities.left_control.lefthip.idle()))
228+
custom_capabilities.left_control.lefthip.idle({ visibility = { displayed = false }})))
229229
end
230230
)
231231

232232
test.register_coroutine_test(
233-
"Device reported rightback 0 and driver emit custom_capabilities.right_control.rightback.idle()",
233+
"Device reported rightback 0 and driver emit custom_capabilities.right_control.rightback.idle({ visibility = { displayed = false }})",
234234
function()
235235
local attr_report_data = {
236236
{ 0x0003, data_types.Uint8.ID, 0 }
@@ -240,12 +240,12 @@ test.register_coroutine_test(
240240
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
241241
})
242242
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
243-
custom_capabilities.right_control.rightback.idle()))
243+
custom_capabilities.right_control.rightback.idle({ visibility = { displayed = false }})))
244244
end
245245
)
246246

247247
test.register_coroutine_test(
248-
"Device reported rightback 1 and driver emit custom_capabilities.right_control.rightback.idle()",
248+
"Device reported rightback 1 and driver emit custom_capabilities.right_control.rightback.idle({ visibility = { displayed = false }})",
249249
function()
250250
local attr_report_data = {
251251
{ 0x0003, data_types.Uint8.ID, 1 }
@@ -255,12 +255,12 @@ test.register_coroutine_test(
255255
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
256256
})
257257
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
258-
custom_capabilities.right_control.rightback.idle()))
258+
custom_capabilities.right_control.rightback.idle({ visibility = { displayed = false }})))
259259
end
260260
)
261261

262262
test.register_coroutine_test(
263-
"Device reported rightwaist 0 and driver emit custom_capabilities.right_control.rightwaist.idle()",
263+
"Device reported rightwaist 0 and driver emit custom_capabilities.right_control.rightwaist.idle({ visibility = { displayed = false }})",
264264
function()
265265
local attr_report_data = {
266266
{ 0x0004, data_types.Uint8.ID, 0 }
@@ -270,12 +270,12 @@ test.register_coroutine_test(
270270
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
271271
})
272272
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
273-
custom_capabilities.right_control.rightwaist.idle()))
273+
custom_capabilities.right_control.rightwaist.idle({ visibility = { displayed = false }})))
274274
end
275275
)
276276

277277
test.register_coroutine_test(
278-
"Device reported rightwaist 1 and driver emit custom_capabilities.right_control.rightwaist.idle()",
278+
"Device reported rightwaist 1 and driver emit custom_capabilities.right_control.rightwaist.idle({ visibility = { displayed = false }})",
279279
function()
280280
local attr_report_data = {
281281
{ 0x0004, data_types.Uint8.ID, 1 }
@@ -285,12 +285,12 @@ test.register_coroutine_test(
285285
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
286286
})
287287
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
288-
custom_capabilities.right_control.rightwaist.idle()))
288+
custom_capabilities.right_control.rightwaist.idle({ visibility = { displayed = false }})))
289289
end
290290
)
291291

292292
test.register_coroutine_test(
293-
"Device reported righthip 0 and driver emit custom_capabilities.right_control.righthip.idle()",
293+
"Device reported righthip 0 and driver emit custom_capabilities.right_control.righthip.idle({ visibility = { displayed = false }})",
294294
function()
295295
local attr_report_data = {
296296
{ 0x0005, data_types.Uint8.ID, 0 }
@@ -300,12 +300,12 @@ test.register_coroutine_test(
300300
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
301301
})
302302
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
303-
custom_capabilities.right_control.righthip.idle()))
303+
custom_capabilities.right_control.righthip.idle({ visibility = { displayed = false }})))
304304
end
305305
)
306306

307307
test.register_coroutine_test(
308-
"Device reported righthip 1 and driver emit custom_capabilities.right_control.righthip.idle()",
308+
"Device reported righthip 1 and driver emit custom_capabilities.right_control.righthip.idle({ visibility = { displayed = false }})",
309309
function()
310310
local attr_report_data = {
311311
{ 0x0005, data_types.Uint8.ID, 1 }
@@ -315,7 +315,7 @@ test.register_coroutine_test(
315315
zigbee_test_utils.build_attribute_report(mock_device, PRIVATE_CLUSTER_ID, attr_report_data, MFG_CODE)
316316
})
317317
test.socket.capability:__expect_send(mock_device:generate_test_message("main",
318-
custom_capabilities.right_control.righthip.idle()))
318+
custom_capabilities.right_control.righthip.idle({ visibility = { displayed = false }})))
319319
end
320320
)
321321

drivers/SmartThings/zigbee-button/src/test/test_aqara_button.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ test.register_coroutine_test(
270270
local attr_report_data = {
271271
{ PRIVATE_ATTRIBUTE_ID_ALIVE, data_types.OctetString.ID, "\x01\x21\xB8\x0B\x03\x28\x19\x04\x21\xA8\x13\x05\x21\x45\x08\x06\x24\x07\x00\x00\x00\x00\x08\x21\x15\x01\x0A\x21\xF5\x65\x0C\x20\x01\x64\x20\x01\x66\x20\x03\x67\x20\x01\x68\x21\xA8\x00" }
272272
}
273+
test.wait_for_events()
273274
test.socket.zigbee:__queue_receive({
274275
mock_device_h1_double_rocker.id,
275276
zigbee_test_utils.build_attribute_report(mock_device_h1_double_rocker, PRIVATE_CLUSTER_ID, attr_report_data,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-- Copyright 2025 SmartThings, Inc.
2+
-- Licensed under the Apache License, Version 2.0
3+
4+
local is_ezex_power_meter = function(opts, driver, device)
5+
local FINGERPRINTS = require("ezex.fingerprints")
6+
for _, fingerprint in ipairs(FINGERPRINTS) do
7+
if device:get_model() == fingerprint.model then
8+
return true, require("ezex")
9+
end
10+
end
11+
12+
return false
13+
end
14+
15+
return is_ezex_power_meter
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Copyright 2025 SmartThings, Inc.
2+
-- Licensed under the Apache License, Version 2.0
3+
4+
local ZIGBEE_POWER_METER_FINGERPRINTS = {
5+
{ model = "E240-KR080Z0-HA" }
6+
}
7+
8+
return ZIGBEE_POWER_METER_FINGERPRINTS

drivers/SmartThings/zigbee-power-meter/src/ezex/init.lua

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
-- Copyright 2022 SmartThings
2-
--
3-
-- Licensed under the Apache License, Version 2.0 (the "License");
4-
-- you may not use this file except in compliance with the License.
5-
-- You may obtain a copy of the License at
6-
--
7-
-- http://www.apache.org/licenses/LICENSE-2.0
8-
--
9-
-- Unless required by applicable law or agreed to in writing, software
10-
-- distributed under the License is distributed on an "AS IS" BASIS,
11-
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
-- See the License for the specific language governing permissions and
13-
-- limitations under the License.
1+
-- Copyright 2025 SmartThings, Inc.
2+
-- Licensed under the Apache License, Version 2.0
3+
144

155
local capabilities = require "st.capabilities"
166
local constants = require "st.zigbee.constants"
@@ -20,19 +10,7 @@ local ElectricalMeasurement = clusters.ElectricalMeasurement
2010
local energy_meter_defaults = require "st.zigbee.defaults.energyMeter_defaults"
2111
local configurations = require "configurations"
2212

23-
local ZIGBEE_POWER_METER_FINGERPRINTS = {
24-
{ model = "E240-KR080Z0-HA" }
25-
}
2613

27-
local is_ezex_power_meter = function(opts, driver, device)
28-
for _, fingerprint in ipairs(ZIGBEE_POWER_METER_FINGERPRINTS) do
29-
if device:get_model() == fingerprint.model then
30-
return true
31-
end
32-
end
33-
34-
return false
35-
end
3614

3715
local instantaneous_demand_configuration = {
3816
cluster = SimpleMetering.ID,
@@ -88,7 +66,7 @@ local ezex_power_meter_handler = {
8866
init = configurations.power_reconfig_wrapper(device_init),
8967
doConfigure = do_configure,
9068
},
91-
can_handle = is_ezex_power_meter
69+
can_handle = require("ezex.can_handle"),
9270
}
9371

9472
return ezex_power_meter_handler
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-- Copyright 2025 SmartThings, Inc.
2+
-- Licensed under the Apache License, Version 2.0
3+
4+
local is_frient_power_meter = function(opts, driver, device)
5+
local FINGERPRINTS = require("frient.fingerprints")
6+
for _, fingerprint in ipairs(FINGERPRINTS) do
7+
if device:get_model() == fingerprint.model then
8+
return true, require("frient")
9+
end
10+
end
11+
12+
return false
13+
end
14+
15+
return is_frient_power_meter
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- Copyright 2025 SmartThings, Inc.
2+
-- Licensed under the Apache License, Version 2.0
3+
4+
local ZIGBEE_POWER_METER_FINGERPRINTS = {
5+
{ model = "ZHEMI101" },
6+
{ model = "EMIZB-132" },
7+
}
8+
9+
return ZIGBEE_POWER_METER_FINGERPRINTS

0 commit comments

Comments
 (0)