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

Matter-Switch: Integrate matter-button driver #1423

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6d98b5c
Matter-Switch: Integrate matter-button driver
nickolas-deboom Jun 7, 2024
abd0226
fixup: bring unit tests over from matter-button
nickolas-deboom Jun 10, 2024
b2bd775
fixup
nickolas-deboom Jun 13, 2024
070abbe
fixup: test case changes
nickolas-deboom Jun 24, 2024
126bc8e
fixup: Support child device creation and update test cases
nickolas-deboom Jun 24, 2024
1f0d608
fixup: Support generic child device creation
nickolas-deboom Jun 25, 2024
06f7131
fixup: fix test case issue and child device creation
nickolas-deboom Jun 26, 2024
9fb82a5
fixup: Remove unused variable
nickolas-deboom Jun 26, 2024
65e7dec
fixup: Subscribe to attributes after init
nickolas-deboom Jun 26, 2024
9fb5a00
fixup: support attributes for child devices
nickolas-deboom Jun 27, 2024
c44837f
fixup: Remove fingerprints from button driver
nickolas-deboom Jul 8, 2024
563470c
Adding MCD support for buttons
nickolas-deboom Jul 12, 2024
064d575
fixup: Add MCD support for buttons and fix test cases
nickolas-deboom Jul 15, 2024
845f61c
Merge branch 'main' into integrate-matter-switch-and-matter-button
nickolas-deboom Jul 15, 2024
071c4e7
fixup: fix luacheck issue
nickolas-deboom Jul 15, 2024
cf75fba
Merge branch 'integrate-matter-switch-and-matter-button' of github.co…
nickolas-deboom Jul 15, 2024
909cbcc
fixup: fix test case subscription issue
nickolas-deboom Jul 15, 2024
836e63a
fixup: create new profiles and update tests
nickolas-deboom Jul 16, 2024
f7cceb3
fixup: fix issue for multi press buttons
nickolas-deboom Jul 17, 2024
c9a2356
fixup: fix unit tests broken by last commit
nickolas-deboom Jul 19, 2024
1d88fa7
fixup: Add a comment indicating that the button driver is deprecated
nickolas-deboom Jul 23, 2024
06d17e0
Merge branch 'main' into integrate-matter-switch-and-matter-button
nickolas-deboom Jul 23, 2024
217b899
Update button driver deprecation comment
nickolas-deboom Jul 23, 2024
36a696d
fixup: Address review feedback
nickolas-deboom Jul 26, 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
13 changes: 0 additions & 13 deletions drivers/SmartThings/matter-button/fingerprints.yml

This file was deleted.

5 changes: 5 additions & 0 deletions drivers/SmartThings/matter-button/src/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- As of July 2024, the matter-button driver has been deprecated in favor of being integrated into the matter-switch
-- driver. All functionality and test cases present in this driver were carried over into matter-switch. Note that this
-- won't affect devices using the button driver unless they are re-onboarded, in which case they would onboard to the
-- switch driver, as all button fingerprints were removed from this driver and moved to the switch driver.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add additionally here that we are no longer accepting bug fixes, feature enhancements such as fingerprint adds to this driver.

Something along those lines to make it really clear - there are no planned changes to folks who might be reading this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the comment as suggested!

local capabilities = require "st.capabilities"
local log = require "log"
local clusters = require "st.matter.generated.zap_clusters"
Expand Down
11 changes: 11 additions & 0 deletions drivers/SmartThings/matter-switch/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,12 @@ matterManufacturer:
vendorId: 0x139C
productId: 0xAB01
deviceProfileName: switch-binary
#TUO
- id: "5150/1"
deviceLabel: "TUO Smart Button"
vendorId: 0x141E
productId: 0x0001
deviceProfileName: "button-battery"


#Bridge devices need manufacturer specific fingerprints until
Expand Down Expand Up @@ -2280,6 +2286,11 @@ matterGeneric:
deviceTypes:
- id: 0x010B # Dimmable Plug-in Unit
deviceProfileName: plug-level
- id: "button"
deviceLabel: Matter Button
deviceTypes:
- id: 0x000F
deviceProfileName: button-battery # err on the side of buttons having batteries, it'll get fixed in the driver

matterThing:
- id: SmartThings/MatterThing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 2-button-battery-switch
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: switch
capabilities:
- id: switch
version: 1
categories:
- name: Switch
20 changes: 20 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/2-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 2-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
18 changes: 18 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/2-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 2-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
26 changes: 26 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/3-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 3-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
24 changes: 24 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/3-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 3-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
32 changes: 32 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/4-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 4-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
30 changes: 30 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/4-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 4-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
38 changes: 38 additions & 0 deletions drivers/SmartThings/matter-switch/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-switch/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
44 changes: 44 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/6-button-battery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 6-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
- id: button6
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
42 changes: 42 additions & 0 deletions drivers/SmartThings/matter-switch/profiles/6-button.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 6-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
- id: button6
capabilities:
- id: button
version: 1
categories:
- name: RemoteController
Loading
Loading