tv.samsung.ws
#
Description#
Control a Samsung smart TV with Tizen OS over WiFi/ethernet. It should support any post-2016 Samsung with Tizen OS and enabled websocket-based connection.
Configuration#
tv.samsung.ws:
# [Optional]
# IP address or host name of the smart TV.
# host: # type=Optional[str]
# [Optional]
# Websocket port (default: 8002).
# port: 8002 # type=int
# [Optional]
# Connection timeout in seconds (default: 5, specify 0 or None for no timeout).
# timeout: 5 # type=Optional[int]
# [Optional]
# Name of the remote device (default: platypush).
# name: platypush
# [Optional]
# Path to the token file (default: ``~/.local/share/platypush/samsungtvws/token.txt``)
# token_file: # type=Optional[str]
Dependencies#
pip
pip install samsungtvws
Actions#
Module reference#
- class platypush.plugins.tv.samsung.ws.TvSamsungWsPlugin(host: str | None = None, port: int = 8002, timeout: int | None = 5, name='platypush', token_file: str | None = None, **kwargs)[source]#
Bases:
Plugin
Control a Samsung smart TV with Tizen OS over WiFi/ethernet. It should support any post-2016 Samsung with Tizen OS and enabled websocket-based connection.
- __init__(host: str | None = None, port: int = 8002, timeout: int | None = 5, name='platypush', token_file: str | None = None, **kwargs)[source]#
- Parameters:
host – IP address or host name of the smart TV.
port – Websocket port (default: 8002).
timeout – Connection timeout in seconds (default: 5, specify 0 or None for no timeout).
name – Name of the remote device (default: platypush).
token_file – Path to the token file (default:
~/.local/share/platypush/samsungtvws/token.txt
)
- back(host: str | None = None, port: int | None = None) None [source]#
Send back key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- blue(host: str | None = None, port: int | None = None) None [source]#
Send blue key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- channel(channel: int, host: str | None = None, port: int | None = None) None [source]#
Change to the selected channel.
- Parameters:
channel – Channel index.
host – Default host IP/name override.
port – Default port override.
- channel_down(host: str | None = None, port: int | None = None) None [source]#
Send channel_down key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- channel_up(host: str | None = None, port: int | None = None) None [source]#
Send channel_up key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- close_app(app_id: int | str, host: str | None = None, port: int | None = None) None [source]#
Close an app.
- Parameters:
app_id – App ID.
host – Default host IP/name override.
port – Default port override.
- device_info(host: str | None = None, port: int | None = None) dict [source]#
Return the info of the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- digit(digit: int, host: str | None = None, port: int | None = None) None [source]#
Send a digit key to the device.
- Parameters:
digit – Digit to send.
host – Default host IP/name override.
port – Default port override.
- down(host: str | None = None, port: int | None = None) None [source]#
Send down key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- enter(host: str | None = None, port: int | None = None) None [source]#
Send enter key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- green(host: str | None = None, port: int | None = None) None [source]#
Send green key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- guide(host: str | None = None, port: int | None = None) None [source]#
Send guide key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- home(host: str | None = None, port: int | None = None) None [source]#
Send home key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- info(host: str | None = None, port: int | None = None) None [source]#
Send info key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- install_app(app_id: int | str, host: str | None = None, port: int | None = None) None [source]#
Install an app.
- Parameters:
app_id – App ID.
host – Default host IP/name override.
port – Default port override.
- left(host: str | None = None, port: int | None = None) None [source]#
Send left key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- list_apps(host: str | None = None, port: int | None = None) list [source]#
Get the list of installed apps.
- Parameters:
host – Default host IP/name override.
port – Default port override.
Send menu key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- mute(host: str | None = None, port: int | None = None) None [source]#
Send mute key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- open_browser(url: str, host: str | None = None, port: int | None = None) None [source]#
Open a URL in the browser.
- Parameters:
url – URL to open.
host – Default host IP/name override.
port – Default port override.
- power(host: str | None = None, port: int | None = None) None [source]#
Send power on/off control to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- red(host: str | None = None, port: int | None = None) None [source]#
Send red key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- right(host: str | None = None, port: int | None = None) None [source]#
Send right key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- run_app(app_id: int | str, host: str | None = None, port: int | None = None) None [source]#
Run an app by ID.
- Parameters:
app_id – App ID.
host – Default host IP/name override.
port – Default port override.
- source(host: str | None = None, port: int | None = None) None [source]#
Send source key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- status_app(app_id: int | str, host: str | None = None, port: int | None = None) dict [source]#
Get the status of an app.
- Parameters:
app_id – App ID.
host – Default host IP/name override.
port – Default port override.
- tools(host: str | None = None, port: int | None = None) None [source]#
Send tools key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- up(host: str | None = None, port: int | None = None) None [source]#
Send up key to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.
- volume_down(host: str | None = None, port: int | None = None) None [source]#
Send volume down control to the device.
- Parameters:
host – Default host IP/name override.
port – Default port override.