Skip to content

Commit 51c33f1

Browse files
authored
Merge pull request #2951 from SmartThingsCommunity/release/beta-5-6-26
Release/Beta 5/6
2 parents 3c97a54 + 608a9ff commit 51c33f1

282 files changed

Lines changed: 5417 additions & 4581 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/jenkins-driver-tests.yml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
name: Run Jenkins driver tests
22
on:
3-
pull_request:
4-
paths:
5-
- 'drivers/**'
6-
73
pull_request_target:
84
paths:
95
- 'drivers/**'
106

11-
permissions:
12-
statuses: write
13-
147
jobs:
158
trigger-driver-test:
169
strategy:

‎drivers/SmartThings/matter-appliance/src/init.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ local matter_driver_template = {
297297
capabilities.windMode
298298
},
299299
sub_drivers = require("sub_drivers"),
300+
shared_device_thread_enabled = true,
300301
}
301302

302303
local matter_driver = MatterDriver("matter-appliance", matter_driver_template)

‎drivers/SmartThings/matter-energy/src/init.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@ matter_driver_template = {
750750
capabilities.battery,
751751
capabilities.chargingState
752752
},
753+
shared_device_thread_enabled = true,
753754
}
754755

755756
local matter_driver = MatterDriver("matter-energy", matter_driver_template)

‎drivers/SmartThings/matter-lock/src/init.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ local matter_lock_driver = {
714714
doConfigure = do_configure,
715715
infoChanged = info_changed,
716716
},
717+
shared_device_thread_enabled = true,
717718
}
718719

719720
-----------------------------------------------------------------------------------------------------------------------------

‎drivers/SmartThings/matter-lock/src/new-matter-lock/init.lua‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ local function match_profile_modular(driver, device)
259259
end
260260

261261
table.insert(enabled_optional_component_capability_pairs, {"main", main_component_capabilities})
262-
if lock_utils.optional_capabilities_list_changed(enabled_optional_component_capability_pairs, device.profile.components) then
262+
if modular_profile_name == "lock-modular-embedded-unlatch" -- the embedded config that may be needed is not checked by an optional capability comparison
263+
or lock_utils.optional_capabilities_list_changed(enabled_optional_component_capability_pairs, device.profile.components) then
263264
device:try_update_metadata({profile = modular_profile_name, optional_component_capabilities = enabled_optional_component_capability_pairs})
264265
end
265266
end

‎drivers/SmartThings/matter-lock/src/test/test_matter_lock_modular.lua‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,4 +623,77 @@ test.register_coroutine_test(
623623
}
624624
)
625625

626+
627+
local mock_nuki_smart_lock_ultra = test.mock_device.build_test_matter_device({
628+
profile = t_utils.get_profile_definition("lock-nocodes-notamper.yml"),
629+
manufacturer_info = {
630+
vendor_id = 0x135D,
631+
product_id = 0x00A1,
632+
},
633+
endpoints = {
634+
{
635+
endpoint_id = 0,
636+
clusters = {
637+
{ cluster_id = clusters.BasicInformation.ID, cluster_type = "SERVER" },
638+
},
639+
device_types = {
640+
{ device_type_id = 0x0016, device_type_revision = 1 } -- RootNode
641+
}
642+
},
643+
{
644+
endpoint_id = 1,
645+
clusters = {
646+
{
647+
cluster_id = DoorLock.ID,
648+
cluster_type = "SERVER",
649+
cluster_revision = 1,
650+
feature_map = 0x1000, -- UNBOLT
651+
},
652+
{
653+
cluster_id = clusters.PowerSource.ID,
654+
cluster_type = "SERVER",
655+
feature_map = 10
656+
},
657+
},
658+
device_types = {
659+
{ device_type_id = 0x000A, device_type_revision = 1 } -- Door Lock
660+
}
661+
}
662+
}
663+
})
664+
665+
local battery_support = {
666+
NO_BATTERY = "NO_BATTERY",
667+
BATTERY_LEVEL = "BATTERY_LEVEL",
668+
BATTERY_PERCENTAGE = "BATTERY_PERCENTAGE"
669+
}
670+
671+
local profiling_data = {
672+
BATTERY_SUPPORT = "__BATTERY_SUPPORT",
673+
}
674+
675+
test.register_coroutine_test(
676+
"Test Nuki Smart Lock Ultra profile change with user and pin supported",
677+
function()
678+
-- technically, since power source attributes must be read, this wouldn't be running via doConfigure, but this is straightforward.
679+
test.socket.device_lifecycle:__queue_receive({ mock_nuki_smart_lock_ultra.id, "doConfigure" })
680+
test.socket.capability:__expect_send(
681+
mock_nuki_smart_lock_ultra:generate_test_message("main", capabilities.lock.supportedLockValues({"locked", "unlocked", "unlatched", "not fully locked"}, {visibility = {displayed = false}}))
682+
)
683+
test.socket.capability:__expect_send(
684+
mock_nuki_smart_lock_ultra:generate_test_message("main", capabilities.lock.supportedLockCommands({"lock", "unlock", "unlatch"}, {visibility = {displayed = false}}))
685+
)
686+
mock_nuki_smart_lock_ultra:expect_metadata_update({ profile = "lock-modular-embedded-unlatch", optional_component_capabilities = {{"main", {"battery"}}}})
687+
mock_nuki_smart_lock_ultra:expect_metadata_update({ provisioning_state = "PROVISIONED" })
688+
end,
689+
{
690+
test_init = function()
691+
test.disable_startup_messages()
692+
test.mock_device.add_test_device(mock_nuki_smart_lock_ultra)
693+
mock_nuki_smart_lock_ultra:set_field(profiling_data.BATTERY_SUPPORT, battery_support.BATTERY_PERCENTAGE, {persist = true}) -- assume this has been set previously
694+
end,
695+
min_api_version = 17
696+
}
697+
)
698+
626699
test.run_registered_tests()

0 commit comments

Comments
 (0)