stv 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stv-0.2.0/.gitignore +6 -0
- stv-0.2.0/LICENSE +21 -0
- stv-0.2.0/PKG-INFO +220 -0
- stv-0.2.0/README.md +184 -0
- stv-0.2.0/docs/i18n/README.de.md +84 -0
- stv-0.2.0/docs/i18n/README.es.md +172 -0
- stv-0.2.0/docs/i18n/README.fr.md +55 -0
- stv-0.2.0/docs/i18n/README.ja.md +172 -0
- stv-0.2.0/docs/i18n/README.ko.md +172 -0
- stv-0.2.0/docs/i18n/README.pt-br.md +84 -0
- stv-0.2.0/docs/i18n/README.zh.md +172 -0
- stv-0.2.0/install-skills.sh +27 -0
- stv-0.2.0/pyproject.toml +46 -0
- stv-0.2.0/skills/tv-netflix/SKILL.md +90 -0
- stv-0.2.0/skills/tv-shared/SKILL.md +73 -0
- stv-0.2.0/skills/tv-spotify/SKILL.md +54 -0
- stv-0.2.0/skills/tv-workflow/SKILL.md +95 -0
- stv-0.2.0/skills/tv-youtube/SKILL.md +64 -0
- stv-0.2.0/src/smartest_tv/__init__.py +1 -0
- stv-0.2.0/src/smartest_tv/__main__.py +5 -0
- stv-0.2.0/src/smartest_tv/apps.py +91 -0
- stv-0.2.0/src/smartest_tv/cli.py +331 -0
- stv-0.2.0/src/smartest_tv/config.py +74 -0
- stv-0.2.0/src/smartest_tv/discovery.py +58 -0
- stv-0.2.0/src/smartest_tv/drivers/__init__.py +11 -0
- stv-0.2.0/src/smartest_tv/drivers/android.py +210 -0
- stv-0.2.0/src/smartest_tv/drivers/base.py +183 -0
- stv-0.2.0/src/smartest_tv/drivers/lg.py +236 -0
- stv-0.2.0/src/smartest_tv/drivers/roku.py +569 -0
- stv-0.2.0/src/smartest_tv/drivers/samsung.py +180 -0
- stv-0.2.0/src/smartest_tv/server.py +264 -0
- stv-0.2.0/src/smartest_tv/setup.py +235 -0
stv-0.2.0/.gitignore
ADDED
stv-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yunsu Kim
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
stv-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stv
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Talk to your TV. Control any smart TV with natural language.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Hybirdss/smartest-tv
|
|
6
|
+
Project-URL: Repository, https://github.com/Hybirdss/smartest-tv
|
|
7
|
+
Author: Yunsu Kim
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: ai-agent,android-tv,cli,deep-link,fire-tv,lg,mcp,netflix,roku,samsung,smart-tv,spotify,tv,youtube
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Home Automation
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Requires-Dist: click>=8.0.0
|
|
18
|
+
Requires-Dist: tomli>=2.0.0; python_version < '3.11'
|
|
19
|
+
Provides-Extra: all
|
|
20
|
+
Requires-Dist: adb-shell>=0.4.0; extra == 'all'
|
|
21
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'all'
|
|
22
|
+
Requires-Dist: bscpylgtv>=0.5.0; extra == 'all'
|
|
23
|
+
Requires-Dist: fastmcp>=2.0.0; extra == 'all'
|
|
24
|
+
Requires-Dist: samsungtvws[encrypted]>=3.0.0; extra == 'all'
|
|
25
|
+
Provides-Extra: android
|
|
26
|
+
Requires-Dist: adb-shell>=0.4.0; extra == 'android'
|
|
27
|
+
Provides-Extra: lg
|
|
28
|
+
Requires-Dist: bscpylgtv>=0.5.0; extra == 'lg'
|
|
29
|
+
Provides-Extra: mcp
|
|
30
|
+
Requires-Dist: fastmcp>=2.0.0; extra == 'mcp'
|
|
31
|
+
Provides-Extra: roku
|
|
32
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'roku'
|
|
33
|
+
Provides-Extra: samsung
|
|
34
|
+
Requires-Dist: samsungtvws[encrypted]>=3.0.0; extra == 'samsung'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# stv
|
|
38
|
+
|
|
39
|
+
[English](README.md) | [한국어](docs/i18n/README.ko.md) | [中文](docs/i18n/README.zh.md) | [日本語](docs/i18n/README.ja.md) | [Español](docs/i18n/README.es.md) | [Deutsch](docs/i18n/README.de.md) | [Português](docs/i18n/README.pt-br.md) | [Français](docs/i18n/README.fr.md)
|
|
40
|
+
|
|
41
|
+
**Talk to your TV. It listens.**
|
|
42
|
+
|
|
43
|
+
A CLI and agent skills for controlling smart TVs with natural language. Deep links into Netflix, YouTube, Spotify — say what you want to watch and it plays. No developer mode. No API keys. No cursed env vars. Just `stv setup` and go.
|
|
44
|
+
|
|
45
|
+
> "Play Frieren season 2 episode 8"
|
|
46
|
+
>
|
|
47
|
+
> *Netflix opens. Episode starts playing.*
|
|
48
|
+
|
|
49
|
+
Works with **LG** (tested), **Samsung**, **Android TV / Fire TV**, and **Roku** (community testing).
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install stv
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
That's it. No extras needed for LG — the default install covers it.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install "stv[samsung]" # Samsung Tizen
|
|
61
|
+
pip install "stv[android]" # Android TV / Fire TV
|
|
62
|
+
pip install "stv[all]" # Everything
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Zero-config Setup
|
|
66
|
+
|
|
67
|
+
Run this once and you're done:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
stv setup
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
It auto-discovers your TV on the network, detects the platform (LG? Samsung? Roku?), pairs automatically — no developer mode required, no IP hunting — and writes everything to `~/.config/smartest-tv/config.toml`. After that, every `stv` command just works.
|
|
74
|
+
|
|
75
|
+
If something looks wrong, `stv doctor` will tell you exactly what's up.
|
|
76
|
+
|
|
77
|
+
## CLI
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
stv status # What's on, volume, mute state
|
|
81
|
+
stv launch netflix 82656797 # Deep link to specific content
|
|
82
|
+
stv launch youtube dQw4w9WgXcQ # Play a YouTube video
|
|
83
|
+
stv launch spotify spotify:album:x # Play on Spotify
|
|
84
|
+
stv volume 25 # Set volume
|
|
85
|
+
stv mute # Toggle mute
|
|
86
|
+
stv apps --format json # List apps (structured output)
|
|
87
|
+
stv notify "Dinner's ready" # Toast notification on screen
|
|
88
|
+
stv off # Goodnight
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Every command supports `--format json` — designed for scripts and AI agents.
|
|
92
|
+
|
|
93
|
+
## Agent Skills
|
|
94
|
+
|
|
95
|
+
stv ships five skills that teach AI assistants how to control your TV intelligently. Install them into Claude Code:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Auto-install all skills
|
|
99
|
+
cd smartest-tv && ./install-skills.sh
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Then just talk to Claude:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
You: Play Frieren season 2 episode 8 on Netflix
|
|
106
|
+
You: Put on Baby Shark for the kids
|
|
107
|
+
You: Ye's new album on Spotify
|
|
108
|
+
You: Screen off, play my jazz playlist
|
|
109
|
+
You: Good night
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The skills handle the hard part — finding Netflix episode IDs, searching YouTube via yt-dlp, resolving Spotify URIs — and call `stv` to control your TV.
|
|
113
|
+
|
|
114
|
+
### Skills
|
|
115
|
+
|
|
116
|
+
| Skill | What it does |
|
|
117
|
+
|-------|-------------|
|
|
118
|
+
| `tv-shared` | CLI reference, auth, config, common patterns |
|
|
119
|
+
| `tv-netflix` | Episode ID lookup via Playwright scraping |
|
|
120
|
+
| `tv-youtube` | Video search via yt-dlp, format resolution |
|
|
121
|
+
| `tv-spotify` | Album/track/playlist URI resolution |
|
|
122
|
+
| `tv-workflow` | Composite actions: movie night, kids mode, sleep timer |
|
|
123
|
+
|
|
124
|
+
## Deep Linking
|
|
125
|
+
|
|
126
|
+
This is what makes stv different from everything else. Other tools open Netflix. stv plays *Frieren episode 36*.
|
|
127
|
+
|
|
128
|
+
The same content ID works across every TV platform:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
stv launch netflix 82656797 # LG, Samsung, Roku, Android TV
|
|
132
|
+
stv launch youtube dQw4w9WgXcQ # Same
|
|
133
|
+
stv launch spotify spotify:album:5poA9SAx0Xiz1cd17f # Same
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Each driver translates the ID into the platform's native deep link format under the hood:
|
|
137
|
+
|
|
138
|
+
| TV | How it sends the deep link |
|
|
139
|
+
|----|---------------------------|
|
|
140
|
+
| LG webOS | SSAP WebSocket: contentId (Netflix DIAL) / params.contentTarget (YouTube) |
|
|
141
|
+
| Samsung | WebSocket: `run_app(id, "DEEP_LINK", meta_tag)` |
|
|
142
|
+
| Android / Fire TV | ADB: `am start -d 'netflix://title/{id}'` |
|
|
143
|
+
| Roku | HTTP: `POST /launch/{ch}?contentId={id}` |
|
|
144
|
+
|
|
145
|
+
You never think about any of this. The driver handles it.
|
|
146
|
+
|
|
147
|
+
## Platforms
|
|
148
|
+
|
|
149
|
+
| Platform | Driver | Connection | Status |
|
|
150
|
+
|----------|--------|-----------|--------|
|
|
151
|
+
| LG webOS | [bscpylgtv](https://github.com/chros73/bscpylgtv) | WebSocket :3001 | **Tested** |
|
|
152
|
+
| Samsung Tizen | [samsungtvws](https://github.com/xchwarze/samsung-tv-ws-api) | WebSocket :8002 | Community testing |
|
|
153
|
+
| Android / Fire TV | [adb-shell](https://github.com/JeffLIrion/adb-shell) | ADB TCP :5555 | Community testing |
|
|
154
|
+
| Roku | HTTP ECP | REST :8060 | Community testing |
|
|
155
|
+
|
|
156
|
+
LG is the primary tested platform. Samsung, Android TV, and Roku should work — no developer mode required on any of them — but real-world reports are welcome.
|
|
157
|
+
|
|
158
|
+
## Configuration
|
|
159
|
+
|
|
160
|
+
Config lives at `~/.config/smartest-tv/config.toml`. After `stv setup`, it looks something like:
|
|
161
|
+
|
|
162
|
+
```toml
|
|
163
|
+
[tv]
|
|
164
|
+
platform = "lg"
|
|
165
|
+
ip = "192.168.1.100"
|
|
166
|
+
mac = "AA:BB:CC:DD:EE:FF" # optional, for Wake-on-LAN
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
On first connection, the TV shows a pairing prompt. Accept once — the key is saved and never asked again.
|
|
170
|
+
|
|
171
|
+
## Real World
|
|
172
|
+
|
|
173
|
+
**It's 2am.** You're in bed. You tell Claude: "Play where I left off on Frieren." The living room TV turns on, Netflix opens, the episode starts. You never touched the remote. You barely opened your eyes.
|
|
174
|
+
|
|
175
|
+
**Saturday morning.** "Put on Cocomelon for the baby." YouTube finds it, TV plays it. You keep making breakfast. Coffee's getting cold anyway.
|
|
176
|
+
|
|
177
|
+
**Friends are over.** "Game mode, HDMI 2, volume down." One sentence, three changes, done before anyone noticed you did it.
|
|
178
|
+
|
|
179
|
+
**Cooking dinner.** "Screen off, play my jazz playlist." Screen goes dark, music flows through the speakers. You didn't need to pause, navigate, or squint at a menu.
|
|
180
|
+
|
|
181
|
+
**Falling asleep.** "Sleep timer 45 minutes." The TV turns itself off. You don't.
|
|
182
|
+
|
|
183
|
+
## MCP Server
|
|
184
|
+
|
|
185
|
+
For Claude Desktop, Cursor, or other MCP clients — this is optional, the CLI is the primary interface:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"mcpServers": {
|
|
190
|
+
"tv": {
|
|
191
|
+
"command": "uvx",
|
|
192
|
+
"args": ["stv"]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
18 tools available: `tv_on`, `tv_off`, `tv_launch`, `tv_close`, `tv_volume`, `tv_set_volume`, `tv_mute`, `tv_play`, `tv_pause`, `tv_stop`, `tv_status`, `tv_info`, `tv_notify`, `tv_apps`, `tv_volume_up`, `tv_volume_down`, `tv_screen_on`, `tv_screen_off`.
|
|
199
|
+
|
|
200
|
+
Config is read from `~/.config/smartest-tv/config.toml` automatically — no env vars needed.
|
|
201
|
+
|
|
202
|
+
## Architecture
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
You (natural language)
|
|
206
|
+
→ AI + Skills (finds content ID via yt-dlp / Playwright / web search)
|
|
207
|
+
→ stv CLI (formats and dispatches)
|
|
208
|
+
→ Driver (WebSocket / ADB / HTTP)
|
|
209
|
+
→ TV
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Contributing
|
|
213
|
+
|
|
214
|
+
**Drivers** for Samsung, Android TV, and Roku are the highest-leverage contribution. The [driver interface](src/smartest_tv/drivers/base.py) is defined — implement `TVDriver` for your platform and open a PR.
|
|
215
|
+
|
|
216
|
+
**Skills** for new streaming services (Disney+, Hulu, Prime Video) are welcome too.
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT
|
stv-0.2.0/README.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# stv
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [한국어](docs/i18n/README.ko.md) | [中文](docs/i18n/README.zh.md) | [日本語](docs/i18n/README.ja.md) | [Español](docs/i18n/README.es.md) | [Deutsch](docs/i18n/README.de.md) | [Português](docs/i18n/README.pt-br.md) | [Français](docs/i18n/README.fr.md)
|
|
4
|
+
|
|
5
|
+
**Talk to your TV. It listens.**
|
|
6
|
+
|
|
7
|
+
A CLI and agent skills for controlling smart TVs with natural language. Deep links into Netflix, YouTube, Spotify — say what you want to watch and it plays. No developer mode. No API keys. No cursed env vars. Just `stv setup` and go.
|
|
8
|
+
|
|
9
|
+
> "Play Frieren season 2 episode 8"
|
|
10
|
+
>
|
|
11
|
+
> *Netflix opens. Episode starts playing.*
|
|
12
|
+
|
|
13
|
+
Works with **LG** (tested), **Samsung**, **Android TV / Fire TV**, and **Roku** (community testing).
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install stv
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
That's it. No extras needed for LG — the default install covers it.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install "stv[samsung]" # Samsung Tizen
|
|
25
|
+
pip install "stv[android]" # Android TV / Fire TV
|
|
26
|
+
pip install "stv[all]" # Everything
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Zero-config Setup
|
|
30
|
+
|
|
31
|
+
Run this once and you're done:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
stv setup
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
It auto-discovers your TV on the network, detects the platform (LG? Samsung? Roku?), pairs automatically — no developer mode required, no IP hunting — and writes everything to `~/.config/smartest-tv/config.toml`. After that, every `stv` command just works.
|
|
38
|
+
|
|
39
|
+
If something looks wrong, `stv doctor` will tell you exactly what's up.
|
|
40
|
+
|
|
41
|
+
## CLI
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
stv status # What's on, volume, mute state
|
|
45
|
+
stv launch netflix 82656797 # Deep link to specific content
|
|
46
|
+
stv launch youtube dQw4w9WgXcQ # Play a YouTube video
|
|
47
|
+
stv launch spotify spotify:album:x # Play on Spotify
|
|
48
|
+
stv volume 25 # Set volume
|
|
49
|
+
stv mute # Toggle mute
|
|
50
|
+
stv apps --format json # List apps (structured output)
|
|
51
|
+
stv notify "Dinner's ready" # Toast notification on screen
|
|
52
|
+
stv off # Goodnight
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Every command supports `--format json` — designed for scripts and AI agents.
|
|
56
|
+
|
|
57
|
+
## Agent Skills
|
|
58
|
+
|
|
59
|
+
stv ships five skills that teach AI assistants how to control your TV intelligently. Install them into Claude Code:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Auto-install all skills
|
|
63
|
+
cd smartest-tv && ./install-skills.sh
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then just talk to Claude:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
You: Play Frieren season 2 episode 8 on Netflix
|
|
70
|
+
You: Put on Baby Shark for the kids
|
|
71
|
+
You: Ye's new album on Spotify
|
|
72
|
+
You: Screen off, play my jazz playlist
|
|
73
|
+
You: Good night
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The skills handle the hard part — finding Netflix episode IDs, searching YouTube via yt-dlp, resolving Spotify URIs — and call `stv` to control your TV.
|
|
77
|
+
|
|
78
|
+
### Skills
|
|
79
|
+
|
|
80
|
+
| Skill | What it does |
|
|
81
|
+
|-------|-------------|
|
|
82
|
+
| `tv-shared` | CLI reference, auth, config, common patterns |
|
|
83
|
+
| `tv-netflix` | Episode ID lookup via Playwright scraping |
|
|
84
|
+
| `tv-youtube` | Video search via yt-dlp, format resolution |
|
|
85
|
+
| `tv-spotify` | Album/track/playlist URI resolution |
|
|
86
|
+
| `tv-workflow` | Composite actions: movie night, kids mode, sleep timer |
|
|
87
|
+
|
|
88
|
+
## Deep Linking
|
|
89
|
+
|
|
90
|
+
This is what makes stv different from everything else. Other tools open Netflix. stv plays *Frieren episode 36*.
|
|
91
|
+
|
|
92
|
+
The same content ID works across every TV platform:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
stv launch netflix 82656797 # LG, Samsung, Roku, Android TV
|
|
96
|
+
stv launch youtube dQw4w9WgXcQ # Same
|
|
97
|
+
stv launch spotify spotify:album:5poA9SAx0Xiz1cd17f # Same
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Each driver translates the ID into the platform's native deep link format under the hood:
|
|
101
|
+
|
|
102
|
+
| TV | How it sends the deep link |
|
|
103
|
+
|----|---------------------------|
|
|
104
|
+
| LG webOS | SSAP WebSocket: contentId (Netflix DIAL) / params.contentTarget (YouTube) |
|
|
105
|
+
| Samsung | WebSocket: `run_app(id, "DEEP_LINK", meta_tag)` |
|
|
106
|
+
| Android / Fire TV | ADB: `am start -d 'netflix://title/{id}'` |
|
|
107
|
+
| Roku | HTTP: `POST /launch/{ch}?contentId={id}` |
|
|
108
|
+
|
|
109
|
+
You never think about any of this. The driver handles it.
|
|
110
|
+
|
|
111
|
+
## Platforms
|
|
112
|
+
|
|
113
|
+
| Platform | Driver | Connection | Status |
|
|
114
|
+
|----------|--------|-----------|--------|
|
|
115
|
+
| LG webOS | [bscpylgtv](https://github.com/chros73/bscpylgtv) | WebSocket :3001 | **Tested** |
|
|
116
|
+
| Samsung Tizen | [samsungtvws](https://github.com/xchwarze/samsung-tv-ws-api) | WebSocket :8002 | Community testing |
|
|
117
|
+
| Android / Fire TV | [adb-shell](https://github.com/JeffLIrion/adb-shell) | ADB TCP :5555 | Community testing |
|
|
118
|
+
| Roku | HTTP ECP | REST :8060 | Community testing |
|
|
119
|
+
|
|
120
|
+
LG is the primary tested platform. Samsung, Android TV, and Roku should work — no developer mode required on any of them — but real-world reports are welcome.
|
|
121
|
+
|
|
122
|
+
## Configuration
|
|
123
|
+
|
|
124
|
+
Config lives at `~/.config/smartest-tv/config.toml`. After `stv setup`, it looks something like:
|
|
125
|
+
|
|
126
|
+
```toml
|
|
127
|
+
[tv]
|
|
128
|
+
platform = "lg"
|
|
129
|
+
ip = "192.168.1.100"
|
|
130
|
+
mac = "AA:BB:CC:DD:EE:FF" # optional, for Wake-on-LAN
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
On first connection, the TV shows a pairing prompt. Accept once — the key is saved and never asked again.
|
|
134
|
+
|
|
135
|
+
## Real World
|
|
136
|
+
|
|
137
|
+
**It's 2am.** You're in bed. You tell Claude: "Play where I left off on Frieren." The living room TV turns on, Netflix opens, the episode starts. You never touched the remote. You barely opened your eyes.
|
|
138
|
+
|
|
139
|
+
**Saturday morning.** "Put on Cocomelon for the baby." YouTube finds it, TV plays it. You keep making breakfast. Coffee's getting cold anyway.
|
|
140
|
+
|
|
141
|
+
**Friends are over.** "Game mode, HDMI 2, volume down." One sentence, three changes, done before anyone noticed you did it.
|
|
142
|
+
|
|
143
|
+
**Cooking dinner.** "Screen off, play my jazz playlist." Screen goes dark, music flows through the speakers. You didn't need to pause, navigate, or squint at a menu.
|
|
144
|
+
|
|
145
|
+
**Falling asleep.** "Sleep timer 45 minutes." The TV turns itself off. You don't.
|
|
146
|
+
|
|
147
|
+
## MCP Server
|
|
148
|
+
|
|
149
|
+
For Claude Desktop, Cursor, or other MCP clients — this is optional, the CLI is the primary interface:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"mcpServers": {
|
|
154
|
+
"tv": {
|
|
155
|
+
"command": "uvx",
|
|
156
|
+
"args": ["stv"]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
18 tools available: `tv_on`, `tv_off`, `tv_launch`, `tv_close`, `tv_volume`, `tv_set_volume`, `tv_mute`, `tv_play`, `tv_pause`, `tv_stop`, `tv_status`, `tv_info`, `tv_notify`, `tv_apps`, `tv_volume_up`, `tv_volume_down`, `tv_screen_on`, `tv_screen_off`.
|
|
163
|
+
|
|
164
|
+
Config is read from `~/.config/smartest-tv/config.toml` automatically — no env vars needed.
|
|
165
|
+
|
|
166
|
+
## Architecture
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
You (natural language)
|
|
170
|
+
→ AI + Skills (finds content ID via yt-dlp / Playwright / web search)
|
|
171
|
+
→ stv CLI (formats and dispatches)
|
|
172
|
+
→ Driver (WebSocket / ADB / HTTP)
|
|
173
|
+
→ TV
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Contributing
|
|
177
|
+
|
|
178
|
+
**Drivers** for Samsung, Android TV, and Roku are the highest-leverage contribution. The [driver interface](src/smartest_tv/drivers/base.py) is defined — implement `TVDriver` for your platform and open a PR.
|
|
179
|
+
|
|
180
|
+
**Skills** for new streaming services (Disney+, Hulu, Prime Video) are welcome too.
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
MIT
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# smartest-tv
|
|
2
|
+
|
|
3
|
+
[English](../../README.md) | [한국어](README.ko.md) | [中文](README.zh.md) | [日本語](README.ja.md) | [Español](README.es.md) | **Deutsch** | [Português](README.pt-br.md) | [Français](README.fr.md)
|
|
4
|
+
|
|
5
|
+
Sprich mit deinem Fernseher. Er hört zu.
|
|
6
|
+
|
|
7
|
+
CLI und KI-Agenten-Skill zur Steuerung deines Smart TVs per natürlicher Sprache. Deep Links für Netflix, YouTube und Spotify — sag, was du sehen willst, und es läuft.
|
|
8
|
+
|
|
9
|
+
> „Spiel Folge 8 der zweiten Staffel Frieren ab"
|
|
10
|
+
>
|
|
11
|
+
> *Netflix öffnet sich und die Episode beginnt.*
|
|
12
|
+
|
|
13
|
+
Unterstützt **LG**, **Samsung**, **Android TV**, **Fire TV** und **Roku**.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install "smartest-tv[lg]" # LG webOS
|
|
19
|
+
pip install "smartest-tv[samsung]" # Samsung Tizen
|
|
20
|
+
pip install "smartest-tv[android]" # Android TV / Fire TV
|
|
21
|
+
pip install "smartest-tv[all]" # Alles
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## CLI
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export TV_IP=192.168.1.100
|
|
28
|
+
|
|
29
|
+
tv status # Aktueller Status (App, Lautstärke, Stummschaltung)
|
|
30
|
+
tv launch netflix 82656797 # Bestimmten Inhalt auf Netflix abspielen
|
|
31
|
+
tv launch youtube dQw4w9WgXcQ # YouTube-Video abspielen
|
|
32
|
+
tv launch spotify spotify:album:x # Spotify abspielen
|
|
33
|
+
tv volume 25 # Lautstärke einstellen
|
|
34
|
+
tv mute # Stummschaltung umschalten
|
|
35
|
+
tv apps --format json # Liste installierter Apps
|
|
36
|
+
tv notify "Essen ist fertig!" # Benachrichtigung auf dem TV anzeigen
|
|
37
|
+
tv off # TV ausschalten
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Alle Befehle unterstützen `--format json` — strukturierte Ausgabe für KI-Agenten.
|
|
41
|
+
|
|
42
|
+
## KI-Agenten-Skill
|
|
43
|
+
|
|
44
|
+
Skill in Claude Code installieren:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd smartest-tv && ./install-skills.sh
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Dann einfach in natürlicher Sprache mit Claude reden:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Du: Spiel Frieren Staffel 2, Folge 8 auf Netflix
|
|
54
|
+
Du: Mach YouTube für die Kinder an
|
|
55
|
+
Du: Spiel das neue Album von Ye auf Spotify
|
|
56
|
+
Du: Bildschirm aus und Jazz an
|
|
57
|
+
Du: Gute Nacht
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Der Skill übernimmt die komplizierte Arbeit — Netflix-Episoden-IDs suchen, YouTube via yt-dlp durchsuchen, Spotify-URIs auflösen — und ruft dann die `tv` CLI auf, um den Fernseher zu steuern.
|
|
61
|
+
|
|
62
|
+
## Deep Links
|
|
63
|
+
|
|
64
|
+
Das ist das entscheidende Alleinstellungsmerkmal von smartest-tv. Andere Tools öffnen Netflix nur. Wir *spielen Folge 36 von Frieren ab*.
|
|
65
|
+
|
|
66
|
+
Dieselbe Inhalts-ID funktioniert auf allen TV-Plattformen:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
tv launch netflix 82656797 # Egal ob LG, Samsung oder Roku
|
|
70
|
+
tv launch youtube dQw4w9WgXcQ # Genauso
|
|
71
|
+
tv launch spotify spotify:album:x # Genauso
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Praxisbeispiele
|
|
75
|
+
|
|
76
|
+
**Nachts um 2 Uhr.** Im Bett sagst du Claude: „Weiter mit Frieren." Der Fernseher im Wohnzimmer geht an, Netflix öffnet sich, die Episode beginnt. Keine Fernbedienung nötig.
|
|
77
|
+
|
|
78
|
+
**Samstagmorgen.** „Mach Cocomelon für die Kleinen an." Es findet es auf YouTube und spielt es auf dem Fernseher ab. Mach einfach weiter mit dem Frühstück.
|
|
79
|
+
|
|
80
|
+
**Wenn Freunde zu Besuch kommen.** „Gaming-Modus, HDMI 2, Lautstärke runter." Drei Änderungen mit einem Satz.
|
|
81
|
+
|
|
82
|
+
## Lizenz
|
|
83
|
+
|
|
84
|
+
MIT
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# stv
|
|
2
|
+
|
|
3
|
+
[English](../../README.md) | [한국어](README.ko.md) | [中文](README.zh.md) | [日本語](README.ja.md) | **Español** | [Deutsch](README.de.md) | [Português](README.pt-br.md) | [Français](README.fr.md)
|
|
4
|
+
|
|
5
|
+
**Habla con tu tele. Te escucha.**
|
|
6
|
+
|
|
7
|
+
CLI y skills para agentes de IA que controlan tu smart TV en lenguaje natural. Deep links para Netflix, YouTube y Spotify — di lo que quieres ver y empieza a reproducirse. Sin modo desarrollador. Sin API keys. Un `stv setup` y listo.
|
|
8
|
+
|
|
9
|
+
> "Pon el episodio 8 de la temporada 2 de Frieren"
|
|
10
|
+
>
|
|
11
|
+
> *Netflix se abre y el episodio empieza solo.*
|
|
12
|
+
|
|
13
|
+
Compatible con **LG** (probado), **Samsung**, **Android TV / Fire TV** y **Roku** (pruebas de la comunidad).
|
|
14
|
+
|
|
15
|
+
## Instalación
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install stv
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Eso es todo. Para LG no necesitas nada más.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install "stv[samsung]" # Samsung Tizen
|
|
25
|
+
pip install "stv[android]" # Android TV / Fire TV
|
|
26
|
+
pip install "stv[all]" # Todo
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configuración cero
|
|
30
|
+
|
|
31
|
+
Ejecuta esto una sola vez:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
stv setup
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Detecta la tele en la red automáticamente, identifica la plataforma (¿LG? ¿Samsung? ¿Roku?), hace el emparejamiento solo — sin modo desarrollador, sin buscar la IP a mano — y guarda todo en `~/.config/smartest-tv/config.toml`. A partir de ahí, cada comando `stv` funciona sin más.
|
|
38
|
+
|
|
39
|
+
¿Algo no va bien? `stv doctor` te dice exactamente qué está pasando.
|
|
40
|
+
|
|
41
|
+
## CLI
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
stv status # Qué está sonando, volumen, silencio
|
|
45
|
+
stv launch netflix 82656797 # Deep link a contenido específico
|
|
46
|
+
stv launch youtube dQw4w9WgXcQ # Reproduce un vídeo de YouTube
|
|
47
|
+
stv launch spotify spotify:album:x # Reproduce en Spotify
|
|
48
|
+
stv volume 25 # Ajustar volumen
|
|
49
|
+
stv mute # Activar/desactivar silencio
|
|
50
|
+
stv apps --format json # Lista de apps instaladas
|
|
51
|
+
stv notify "¡A comer!" # Notificación en pantalla
|
|
52
|
+
stv off # Apagar la tele
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Todos los comandos admiten `--format json` — salida estructurada para scripts y agentes de IA.
|
|
56
|
+
|
|
57
|
+
## Skills para agentes de IA
|
|
58
|
+
|
|
59
|
+
stv incluye cinco skills que enseñan a los asistentes de IA a controlar tu tele de forma inteligente. Instálalos en Claude Code de una vez:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd smartest-tv && ./install-skills.sh
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Y ya puedes hablar con Claude con total naturalidad:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Tú: Pon el episodio 8 de la temporada 2 de Frieren en Netflix
|
|
69
|
+
Tú: Pon Cocomelon para el niño
|
|
70
|
+
Tú: Pon el nuevo álbum de Ye en Spotify
|
|
71
|
+
Tú: Apaga la pantalla y pon jazz
|
|
72
|
+
Tú: Buenas noches
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Los skills se encargan de lo complicado — buscar el ID del episodio en Netflix, buscar en YouTube con yt-dlp, interpretar URIs de Spotify — y llaman al CLI `stv` para controlar la televisión.
|
|
76
|
+
|
|
77
|
+
### Lista de skills
|
|
78
|
+
|
|
79
|
+
| Skill | Qué hace |
|
|
80
|
+
|-------|----------|
|
|
81
|
+
| `tv-shared` | Referencia CLI, autenticación, configuración, patrones comunes |
|
|
82
|
+
| `tv-netflix` | Búsqueda de IDs de episodios con Playwright |
|
|
83
|
+
| `tv-youtube` | Búsqueda de vídeos con yt-dlp |
|
|
84
|
+
| `tv-spotify` | Resolución de URIs de álbumes, canciones y playlists |
|
|
85
|
+
| `tv-workflow` | Acciones combinadas: modo cine, modo niños, temporizador |
|
|
86
|
+
|
|
87
|
+
## Por qué los deep links cambian todo
|
|
88
|
+
|
|
89
|
+
Otras herramientas solo *abren* Netflix. stv *reproduce el episodio 36 de Frieren*. Esa es la diferencia real.
|
|
90
|
+
|
|
91
|
+
El mismo ID de contenido funciona en todas las plataformas de TV:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
stv launch netflix 82656797 # Igual en LG, Samsung o Roku
|
|
95
|
+
stv launch youtube dQw4w9WgXcQ # Igual
|
|
96
|
+
stv launch spotify spotify:album:5poA9SAx0Xiz1cd17f # Igual
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Cada plataforma tiene su propio formato de deep link, pero el driver lo traduce por ti. Tú no tienes que pensar en eso.
|
|
100
|
+
|
|
101
|
+
## Plataformas
|
|
102
|
+
|
|
103
|
+
| Plataforma | Driver | Conexión | Estado |
|
|
104
|
+
|------------|--------|---------|--------|
|
|
105
|
+
| LG webOS | [bscpylgtv](https://github.com/chros73/bscpylgtv) | WebSocket :3001 | **Probado** |
|
|
106
|
+
| Samsung Tizen | [samsungtvws](https://github.com/xchwarze/samsung-tv-ws-api) | WebSocket :8002 | Pruebas de la comunidad |
|
|
107
|
+
| Android / Fire TV | [adb-shell](https://github.com/JeffLIrion/adb-shell) | ADB TCP :5555 | Pruebas de la comunidad |
|
|
108
|
+
| Roku | HTTP ECP | REST :8060 | Pruebas de la comunidad |
|
|
109
|
+
|
|
110
|
+
LG es la plataforma principal probada. Samsung, Android TV y Roku deberían funcionar — ninguna requiere modo desarrollador — y se agradecen las experiencias reales de la comunidad.
|
|
111
|
+
|
|
112
|
+
## Configuración
|
|
113
|
+
|
|
114
|
+
La configuración se guarda en `~/.config/smartest-tv/config.toml`. Después de `stv setup`, tiene esta pinta:
|
|
115
|
+
|
|
116
|
+
```toml
|
|
117
|
+
[tv]
|
|
118
|
+
platform = "lg"
|
|
119
|
+
ip = "192.168.1.100"
|
|
120
|
+
mac = "AA:BB:CC:DD:EE:FF" # opcional, para Wake-on-LAN
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
En la primera conexión la tele muestra un aviso de emparejamiento. Lo aceptas una vez y la clave se guarda para siempre.
|
|
124
|
+
|
|
125
|
+
## Casos de uso reales
|
|
126
|
+
|
|
127
|
+
**Las 2 de la mañana.** En la cama, le dices a Claude: "Sigue con Frieren donde lo dejé." El televisor del salón se enciende, Netflix se abre y el episodio empieza. Sin buscar el mando. Con los ojos medio cerrados.
|
|
128
|
+
|
|
129
|
+
**Sábado por la mañana.** "Pon Cocomelon para el bebé." Lo encuentra en YouTube y lo pone en la tele. Tú sigues con el desayuno.
|
|
130
|
+
|
|
131
|
+
**Cuando vienen amigos.** "Modo juego, HDMI 2, baja el volumen." Tres cambios en una frase, antes de que nadie note nada.
|
|
132
|
+
|
|
133
|
+
**Cocinando.** "Apaga la pantalla y pon jazz." La pantalla se apaga, la música suena. Sin navegar por menús ni buscar la app.
|
|
134
|
+
|
|
135
|
+
**Antes de dormir.** "Apaga en 45 minutos." La tele se apaga sola. Tú, no.
|
|
136
|
+
|
|
137
|
+
## Servidor MCP
|
|
138
|
+
|
|
139
|
+
Para Claude Desktop, Cursor u otros clientes MCP — esto es opcional, el CLI es la interfaz principal:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"tv": {
|
|
145
|
+
"command": "uvx",
|
|
146
|
+
"args": ["stv"]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
18 herramientas disponibles. La configuración se lee automáticamente de `~/.config/smartest-tv/config.toml`. Sin variables de entorno.
|
|
153
|
+
|
|
154
|
+
## Arquitectura
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Tú (lenguaje natural)
|
|
158
|
+
→ IA + Skills (busca el ID del contenido con yt-dlp / Playwright / búsqueda web)
|
|
159
|
+
→ stv CLI (formatea y envía)
|
|
160
|
+
→ Driver (WebSocket / ADB / HTTP)
|
|
161
|
+
→ TV
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Contribuir
|
|
165
|
+
|
|
166
|
+
Los **drivers** de Samsung, Android TV y Roku son la contribución de mayor impacto. La [interfaz del driver](src/smartest_tv/drivers/base.py) ya está definida — implementa `TVDriver` para tu plataforma y abre una PR.
|
|
167
|
+
|
|
168
|
+
Los **skills** para nuevos servicios de streaming (Disney+, Hulu, Prime Video) también son bienvenidos.
|
|
169
|
+
|
|
170
|
+
## Licencia
|
|
171
|
+
|
|
172
|
+
MIT
|