Skip to content

Commit

Permalink
feat(commands): added SCREEN_MUTE undocumented command (thanks @DPSto…
Browse files Browse the repository at this point in the history
…kesNZ, closes #19)
  • Loading branch information
vgavro committed Jan 5, 2025
1 parent 2e0c27e commit ad8f35f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It allows you to control a variety of different sources (TV, Monitor) through th

[MDC Protocol specification - v15.0 2020-11-06](https://vgavro.github.io/samsung-mdc/MDC-Protocol.pdf)

* Implemented *82* commands
* Implemented *83* commands
* Easy to extend using simple declarative API - see [samsung_mdc/commands.py](https://github.com/vgavro/samsung-mdc/blob/master/samsung_mdc/commands.py)
* Detailed [CLI](#usage) help and parameters validation
* Run commands async on numerous targets (using asyncio)
Expand Down Expand Up @@ -171,6 +171,7 @@ Options:
* [auto_source_switch](#auto_source_switch) `[AUTO_SOURCE_SWITCH_STATE]`
* [auto_source](#auto_source) `[PRIMARY_SOURCE_RECOVERY PRIMARY_SOURCE SECONDARY_SOURCE]`
* [panel](#panel) `[PANEL_STATE]`
* [screen_mute](#screen_mute) `[SCREEN_MUTE_STATUS]`
* [script](#script) `[OPTIONS] SCRIPT_FILE`
* [raw](#raw) `[OPTIONS] COMMAND [DATA]`

Expand Down Expand Up @@ -1072,6 +1073,13 @@ Usage: samsung-mdc [OPTIONS] TARGET panel [PANEL_STATE]
Data:
PANEL_STATE ON | OFF
```
#### screen_mute<a id="screen_mute"></a>
```
Usage: samsung-mdc [OPTIONS] TARGET screen_mute [SCREEN_MUTE_STATUS]
Data:
SCREEN_MUTE_STATUS ON | OFF
```
#### script<a id="script"></a>
```
Usage: samsung-mdc [OPTIONS] TARGET script [OPTIONS] SCRIPT_FILE
Expand Down
14 changes: 14 additions & 0 deletions samsung_mdc/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,20 @@ class PANEL_STATE(IntEnum):
DATA = [PANEL_STATE]


class SCREEN_MUTE(Command):
# Undocumented (as of Ver. 15 2020-11-06)
# see https://github.com/vgavro/samsung-mdc/issues/19
CMD = 0xFE
SUBCMD = 0x51
GET, SET = True, True

class SCREEN_MUTE_STATUS(IntEnum):
ON = 0x00
OFF = 0xFF

DATA = [SCREEN_MUTE_STATUS]


class STATUS(Command):
"""
Get the device various state like power, volume, sound mute, input source,
Expand Down
2 changes: 1 addition & 1 deletion samsung_mdc/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.14.3'
__version__ = '1.15.0'

0 comments on commit ad8f35f

Please sign in to comment.