SmartThingsEdgeDrivers icon indicating copy to clipboard operation
SmartThingsEdgeDrivers copied to clipboard

Add checking for optional support of track control commands

Open ctowns opened this issue 3 years ago • 11 comments

The next/prev track control commands are optional in the MediaPlayback cluster. This will check for the commands using the AcceptedCommandList attribute in the MediaPlayback cluster and then switch to an appropriate profile if these commands are supported.

https://smartthings.atlassian.net/browse/CHAD-9933

[nickolas-deboom, 4/15/25]: This PR was re-opened with the following changes: (1) Rebase with latest changes from main (2) Check the RPC version to determine if AcceptedCommandList is supported to address the issue brought up previously in this PR. The RPC version was bumped from 0 to 1 for hubcore version 0.46. (3) Change profiles to use "-no-track-control" rather than "track-control" in order to avoid renaming profiles or removing capabilities from existing profiles that are currently in use by devices in the field. Note that "media-video-speaker.yml" can safely be renamed because there are 0 devices in the field using this profile currently. (4) A few updates and minor formatting cleanup in the test cases

ctowns avatar Nov 23 '22 16:11 ctowns

Invitation URL: https://bestow-regional.api.smartthings.com/invite/kVlnwy3Lej49

github-actions[bot] avatar Nov 23 '22 16:11 github-actions[bot]

Unit Test Results

       1 files  ±0     305 suites  ±0   0s :stopwatch: ±0s 1 379 tests +1  1 364 :heavy_check_mark:  - 14  0 :zzz: ±0  0 :x: ±0  15 :fire: +15  2 437 runs  +1  2 422 :heavy_check_mark:  - 14  0 :zzz: ±0  0 :x: ±0  15 :fire: +15 

For more details on these errors, see this check.

Results for commit 455b1c68. ± Comparison against base commit 71bb1580.

github-actions[bot] avatar Nov 23 '22 16:11 github-actions[bot]

I left some TODO comments in the code just related how to handle the supported capabilities event for the media track control now.

Also note that I changed some of the profile names so that I they would all follow a pattern that I could use for the profile switching logic (based on https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/pull/370). Let me know if there is a preferred method for doing that or if changing profile names once in production is problematic.

ctowns avatar Nov 23 '22 16:11 ctowns

Test Results

       1 files     307 suites   0s :stopwatch: 1 385 tests 1 385 :heavy_check_mark: 0 :zzz: 0 :x: 2 447 runs  2 447 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit 6fa81113.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Dec 16 '22 18:12 github-actions[bot]

With the completion of HCS-3895, this seems to be working for me now. I added the event for the supportedTrackControlCommands to the infoChanged event because in my testing, that seemed to be directly tied to the profile update.

ctowns avatar Dec 16 '22 18:12 ctowns

No duplicate profiles detected.

github-actions[bot] avatar Dec 16 '22 18:12 github-actions[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 31 '23 17:05 CLAassistant

Closing this PR due to time lapsed. If we need to reopen we can.

lelandblue avatar Jul 16 '24 17:07 lelandblue