Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasing Main to Beta #1576

Merged
merged 22 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
566f85d
Add AiDot Matter Color Temperature Light for Certification
chenpeixiang May 31, 2024
1760771
Update drivers/SmartThings/matter-switch/fingerprints.yml
lelandblue May 31, 2024
b50e387
HCS5008 - Remove AudioNotification Capability for samsung-audio driver
satyajitanand Jul 1, 2024
f963c5c
new-device-Eve-MTR-Thermo
lelandblue Jul 15, 2024
16816fb
Merge branch 'main' into new-device-eve-thermo
lelandblue Jul 16, 2024
d93ddb0
Add datastore:commit() calls around API key operations
dljsjr Jul 26, 2024
45a86dd
[HCS-5080] Add hub drivers for TV, Fridge, Soundbar
nathankooistra Aug 5, 2024
1851f9d
Merge pull request #1559 from SmartThingsCommunity/hcs-5080
nathankooistra Aug 7, 2024
5d8e9af
Merge pull request #1553 from SmartThingsCommunity/feat/philips-hue-u…
dljsjr Aug 7, 2024
7eaeae2
Add profile for the IKEA air purifier (#1542)
nickolas-deboom Aug 7, 2024
999f405
Merge branch 'main' into main
lelandblue Aug 8, 2024
c1b3507
Merge pull request #1411 from chenpeixiang/main
lelandblue Aug 8, 2024
ba1d00f
Merge pull request #1520 from SmartThingsCommunity/new-device-eve-thermo
lelandblue Aug 8, 2024
1e7e09e
[HCS-5080] Change hardwareType used for hub fingerprints
nathankooistra Aug 8, 2024
dc2d4c7
Merge pull request #1566 from SmartThingsCommunity/hcs-5080-hardwareT…
nathankooistra Aug 8, 2024
33f7376
Create a series of optional profiles for room ac (#1554)
hcarter-775 Aug 8, 2024
d55a9a2
Merge branch 'main' into Samsung_AudioNotification_HCS5008
lelandblue Aug 9, 2024
0b92605
Merge pull request #1490 from SmartThingsCommunity/Samsung_AudioNotif…
lelandblue Aug 9, 2024
8cb2981
Enable native handlers for drivers that can use them
cjswedes Jul 31, 2024
4774ab8
Merge pull request #1567 from SmartThingsCommunity/feature/enable-nat…
cjswedes Aug 12, 2024
62586a1
Matter Button: Add profile for 5-button devices
tpmanley Aug 12, 2024
9b18d70
Merge pull request #1573 from SmartThingsCommunity/feature/5-button
tpmanley Aug 12, 2024
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
4 changes: 4 additions & 0 deletions drivers/SmartThings/hub/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: 'hub'
packageKey: 'hub'
description: "SmartThings driver for Hub devices"
vendorSupportInformation: "https://support.smartthings.com"
17 changes: 17 additions & 0 deletions drivers/SmartThings/hub/fingerprints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
hub:
- id: "tv-hub"
deviceLabel: SmartThings Hub
hardwareType: SAMSUNG_VD_TV_HUB
deviceProfileName: tv-hub
- id: "soundbar-hub"
deviceLabel: SmartThings Hub
hardwareType: SAMSUNG_SOUNDBAR_TIZEN_OPEN_HUB
deviceProfileName: soundbar-hub
- id: "refrigerator-hub"
deviceLabel: SmartThings Hub
hardwareType: SAMSUNG_DA_REFRIGERATOR_HUB
deviceProfileName: refrigerator-hub
hubThing:
- id: "hub-thing"
deviceLabel: SmartThings Hub
deviceProfileName: hub-thing
13 changes: 13 additions & 0 deletions drivers/SmartThings/hub/profiles/hub-thing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: hub-thing
components:
- id: main
label: main
capabilities:
- id: bridge
version: 1
ephemeral: false
categories:
- name: Hub
categoryType: manufacturer
metadata:
ocfDeviceType: x.com.st.d.hub
17 changes: 17 additions & 0 deletions drivers/SmartThings/hub/profiles/refrigerator-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: refrigerator-hub
components:
- id: main
label: main
capabilities:
- id: bridge
version: 1
ephemeral: false
categories:
- name: Hub
categoryType: manufacturer
config:
icons:
- badge:
- iconUrl: badge://refrigerator
metadata:
ocfDeviceType: x.com.st.d.hub
17 changes: 17 additions & 0 deletions drivers/SmartThings/hub/profiles/soundbar-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: soundbar-hub
components:
- id: main
label: main
capabilities:
- id: bridge
version: 1
ephemeral: false
categories:
- name: Hub
categoryType: manufacturer
config:
icons:
- badge:
- iconUrl: badge://soundbar
metadata:
ocfDeviceType: x.com.st.d.hub
17 changes: 17 additions & 0 deletions drivers/SmartThings/hub/profiles/tv-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: tv-hub
components:
- id: main
label: main
capabilities:
- id: bridge
version: 1
ephemeral: false
categories:
- name: Hub
categoryType: manufacturer
config:
icons:
- badge:
- iconUrl: badge://tv
metadata:
ocfDeviceType: x.com.st.d.hub
Empty file.
38 changes: 38 additions & 0 deletions drivers/SmartThings/matter-button/profiles/5-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 5-button-battery
components:
- id: main
capabilities:
- id: button
version: 1
- id: battery
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: RemoteController
- id: button2
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button3
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button4
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button5
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
36 changes: 36 additions & 0 deletions drivers/SmartThings/matter-button/profiles/5-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 5-button
components:
- id: main
capabilities:
- id: button
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: RemoteController
- id: button2
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button3
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button4
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
- id: button5
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
2 changes: 1 addition & 1 deletion drivers/SmartThings/matter-button/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local START_BUTTON_PRESS = "__start_button_press"
local TIMEOUT_THRESHOLD = 10 --arbitrary timeout
local HELD_THRESHOLD = 1
-- this is the number of buttons for which we have a static profile already made
local STATIC_PROFILE_SUPPORTED = {2, 4, 6, 8}
local STATIC_PROFILE_SUPPORTED = {2, 4, 5, 6, 8}

local COMPONENT_TO_ENDPOINT_MAP = "__component_to_endpoint_map"
local DEFERRED_CONFIGURE = "__DEFERRED_CONFIGURE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,9 @@ local mock_device = test.mock_device.build_test_matter_device(
clusters = {
{
cluster_id = clusters.Switch.ID,
feature_map = clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH | clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH_LONG_PRESS,
cluster_type = "SERVER"
},
},
},
{
endpoint_id = 5,
clusters = {
{
cluster_id = clusters.Switch.ID,
feature_map = clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH | clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH_MULTI_PRESS,
cluster_type = "SERVER"
},
},
},
{
endpoint_id = 6,
clusters = {
{
cluster_id = clusters.Switch.ID,
feature_map = clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH | clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH_MULTI_PRESS,
feature_map = clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH
| clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH_LONG_PRESS
| clusters.Switch.types.SwitchFeature.MOMENTARY_SWITCH_MULTI_PRESS,
cluster_type = "SERVER"
},
},
Expand Down Expand Up @@ -124,29 +106,9 @@ local function test_init()
parent_device_id = mock_device.id,
parent_assigned_child_key = "04"
})
test.socket.capability:__expect_send(mock_children[4]:generate_test_message("main", capabilities.button.supportedButtonValues({"pushed", "held"}, {visibility = {displayed = false}})))
test.socket.matter:__expect_send({mock_device.id, clusters.Switch.attributes.MultiPressMax:read(mock_device, 4)})
test.socket.capability:__expect_send(mock_children[4]:generate_test_message("main", button_attr.pushed({state_change = false})))

mock_device:expect_device_create({
type = "EDGE_CHILD",
label = "Matter Button 4",
profile = "button",
parent_device_id = mock_device.id,
parent_assigned_child_key = "05"
})
test.socket.matter:__expect_send({mock_device.id, clusters.Switch.attributes.MultiPressMax:read(mock_device, 5)})
test.socket.capability:__expect_send(mock_children[5]:generate_test_message("main", button_attr.pushed({state_change = false})))

mock_device:expect_device_create({
type = "EDGE_CHILD",
label = "Matter Button 5",
profile = "button",
parent_device_id = mock_device.id,
parent_assigned_child_key = "06"
})
test.socket.matter:__expect_send({mock_device.id, clusters.Switch.attributes.MultiPressMax:read(mock_device, 6)})
test.socket.capability:__expect_send(mock_children[6]:generate_test_message("main", button_attr.pushed({state_change = false})))

end

test.set_test_init_function(test_init)
Expand Down Expand Up @@ -242,27 +204,6 @@ test.register_message_test(
}
)

test.register_message_test(
"Receiving a max press attribute of 2 should emit correct event", {
{
channel = "matter",
direction = "receive",
message = {
mock_device.id,
clusters.Switch.attributes.MultiPressMax:build_test_report_data(
mock_device, 6, 2
)
},
},
{
channel = "capability",
direction = "send",
message = mock_children[6]:generate_test_message("main",
capabilities.button.supportedButtonValues({"pushed", "double"}, {visibility = {displayed = false}}))
},
}
)

test.register_message_test(
"Receiving a max press attribute of 3 should emit correct event", {
{
Expand All @@ -271,15 +212,15 @@ test.register_message_test(
message = {
mock_device.id,
clusters.Switch.attributes.MultiPressMax:build_test_report_data(
mock_device, 5, 3
mock_device, 4, 3
)
},
},
{
channel = "capability",
direction = "send",
message = mock_children[5]:generate_test_message("main",
capabilities.button.supportedButtonValues({"pushed", "double", "pushed_3x"}, {visibility = {displayed = false}}))
message = mock_children[4]:generate_test_message("main",
capabilities.button.supportedButtonValues({"pushed", "double", "held", "pushed_3x"}, {visibility = {displayed = false}}))
},
}
)
Expand Down Expand Up @@ -313,7 +254,7 @@ test.register_message_test(
message = {
mock_device.id,
clusters.Switch.events.InitialPress:build_test_event_report(
mock_device, 5, {new_position = 1}
mock_device, 4, {new_position = 1}
)
}
},
Expand All @@ -323,14 +264,14 @@ test.register_message_test(
message = {
mock_device.id,
clusters.Switch.events.MultiPressComplete:build_test_event_report(
mock_device, 5, {new_position = 1, total_number_of_presses_counted = 2, previous_position = 0}
mock_device, 4, {new_position = 1, total_number_of_presses_counted = 2, previous_position = 0}
)
}
},
{
channel = "capability",
direction = "send",
message = mock_children[5]:generate_test_message("main", button_attr.double({state_change = true}))
message = mock_children[4]:generate_test_message("main", button_attr.double({state_change = true}))
},

}
Expand All @@ -344,7 +285,7 @@ test.register_message_test(
message = {
mock_device.id,
clusters.Switch.events.InitialPress:build_test_event_report(
mock_device, 6, {new_position = 1}
mock_device, 4, {new_position = 1}
)
}
},
Expand All @@ -354,14 +295,14 @@ test.register_message_test(
message = {
mock_device.id,
clusters.Switch.events.MultiPressComplete:build_test_event_report(
mock_device, 6, {new_position = 1, total_number_of_presses_counted = 4, previous_position = 0}
mock_device, 4, {new_position = 1, total_number_of_presses_counted = 4, previous_position = 0}
)
}
},
{
channel = "capability",
direction = "send",
message = mock_children[6]:generate_test_message("main", button_attr.pushed_4x({state_change = true}))
message = mock_children[4]:generate_test_message("main", button_attr.pushed_4x({state_change = true}))
},

}
Expand Down
5 changes: 5 additions & 0 deletions drivers/SmartThings/matter-switch/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ matterManufacturer:
vendorId: 0x1168
productId: 0x03F3
deviceProfileName: light-color-level-1800K-6500K
- id: "Linkind/Smart/Light/Bulb/A19/CCT"
deviceLabel: Smart Light Bulb A19 CCT
vendorId: 0x1168
productId: 0x03f9
deviceProfileName: light-level-colorTemperature-2700K-6500K
- id: "4456/1013"
deviceLabel: Matter Smart Light Bulb A21 RGBTW 1600lm
vendorId: 0x1168
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: light-level-colorTemperature-2700K-6500K
components:
- id: main
capabilities:
- id: switch
version: 1
- id: switchLevel
version: 1
config:
values:
- key: "level.value"
range: [1, 100]
- id: colorTemperature
version: 1
config:
values:
- key: "colorTemperature.value"
range: [ 2700, 6500 ]
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: Light
Loading
Loading