I asked Codex to fix the TV. He connected to him over the network and did it
Main chat
A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.
The kid wanted cartoons. The TV showed a black screen — the sound went, the subtitles went, there was no picture. A particular series in Evie, a particular TV, is played stably. A classic problem for technical support, which they still do not solve.
Instead of calling the service center, I opened Codex and wrote, "Take care of the TV.".
Then something happened that I didn't expect.
Task: Black screen in Evie
TV - Hyundai H-LED55BU7003 on YandexOS. Symptom: when playing one of the series of Evie - there is a sound, the image is black. The other series are working. Other apps are working. Rebooting doesn't help.
The first thought is to go through ADB and see the logs. The standard path for Android devices. It turned out that ADB is closed on this TV: there is a service menu, but there is no ADB Mode item. Bluetooth does not allow access to the system. USB is just charging and flash drives. There is no direct access to the logs.
Codex listened and said, ‘Wait a minute, your port is open in 1961.’.
What Codex found: The TV's secret port
The agent independently scanned the local network and found that the TV was listening to wss://192.168.0.113:1961. It's not ADB. This is Yandex Glagol, an internal WebSocket protocol through which the Yandex ecosystem communicates with its devices.
It works through:
- Yandex Station When Controlling a TV
- Home Assistant Integration with HACS
- Node-RED automation
Nowhere in the official documentation is this protocol really described. Codex found it in the AlexxIT/YandexStation source on GitHub.
TLS certificate: O=Yandex, CN=localhost
HTTP 426: Upgrade Required
WebSocket 101: Switching Protocols
First message: ping server ping
The port is open. Connection established. All you need is a token.
How to access: OAuth without hacking
Codex explained the authorization scheme and wrote what to do:
- Receive Yandex OAuth-token from the account to which the TV is attached through the official OAuth Yandex.
- Through the Yandex API. Quasar get a list of devices and find the TV.
- Request a Glagol device-token for a specific device.
- Connect to WebSocket and start sending commands.
I didn’t put the token anywhere in the chat – Codex created the .secrets/ folder himself, asked to put the file there, and read from the file system locally.
# Codex написал этот скрипт самостоятельно
import asyncio, aiohttp, json, pathlib, ssl, websockets
TOKEN = pathlib.Path(".secrets/yandex_token").read_text().strip()
async def get_device_token(oauth_token, device_id):
headers = {"Authorization": f"OAuth {oauth_token}"}
async with aiohttp.ClientSession() as session:
async with session.get(
"https://quasar.yandex.net/glagol/device_list",
headers=headers
) as r:
devices = await r.json()
async with session.get(
f"https://quasar.yandex.net/glagol/token?device_id={device_id}",
headers=headers
) as r:
return (await r.json())["token"]
A few seconds after launch:
OAuth token accepted
Yandex API responded: found device cea2fdaaca88b3e30579
Model: yandex tv mt9632 cv
Glagol device-token received
Connected to wss://192.168.0.113:1961
✓ softwareVersion: 3.306. 12.
✓ appState: en.ivi.client - Evie installed
Codex hooked up to the TV.
Real-time diagnostics
The next step is to remove the state of the TV at the moment of the problem. I ran that episode in Evie and wrote to the agent, ‘Run.’.
Codex began shooting getState every 30 seconds from the TV and recording it in diagnostics/ivi-black-screen-state.json:
{
"status": "SUCCESS",
"state": {
"aliceState": "IDLE",
"playing": false,
"volume": 18
},
"playerState": {},
"watchedVideoState": null,
"appState": "base64encoded..."
}
Key find: playing: false - TV informs the Yandex layer that there is no playback, although the sound is coming. This means that the video decoder is frozen, but the audio decoder continues to work. Evie doesn’t give the playback-state out – that is, the app itself believes that something is being played and the system layer doesn’t see it.
It's not a setup problem. This is the incompatibility of a specific video sequence codec with a decoder in YandexOS 3.306.12.
What ended up fixing cartoons
Knowing the exact reason, Codex offered three working options:
**1. Clear Evie's data (not the cache, but the data). **This resets the DRM client’s authorization and forces Evey to re-negotiate the session with the server. In some cases, this changes the behavior of the decoder at the next playback.
2. Forced to restart Evie via Glagol. Codex wrote the command sendAction to exit the application and restart - the TV accepted it.
3. Switch video quality. Through playerState, the agent determined that the series was running in 4K HDR. Decrease to 1080p changes the decoder used.
After the forced reboot of Evie via Glagol and reducing the quality from 4K HDR to 1080p, the cartoons turned on. The problem was only played in 4K on this particular series due to the behavior of the HDR decoder in YandexOS.
Why this is important for Vibcoders
This case is not about TV. It’s about how a modern AI agent behaves when given a real task without an obvious solution.
What Codex did on its own:
- I scanned the network and found an open port
- Found the right protocol in open-source repositories on GitHub
- Wrote a working WebSocket client from scratch
- Organized the safe keeping of secrets
- Takes real-time diagnostic data
- Proposed and applied a working solution
It's not an auto-addition code. This is the agent who took the task, came up with the approach, wrote the tools, and came to the answer.
**Glagol is a management protocol, not debugging. Without ADB, you cannot get logcat, system logs or get into the file system. If the decoder had simply dyed up without any outside signals, this approach would not have worked. We’re lucky that playing: false, when sounded, has enough diagnostic information.
Technical outcome
| Что использовали | Зачем |
|---|---|
wss://[tv_ip]:1961 |
Yandex Glagol WebSocket — единственный открытый интерфейс |
| Яндекс OAuth | Авторизация без взлома, через официальный API |
quasar.yandex.net/glagol/token |
Device token для телевизора |
getState команда |
Снять playerState / appState в реальном времени |
sendAction команда |
Принудительный перезапуск Иви |
| Python + websockets + aiohttp | Скрипт, который Codex написал с нуля |
The entire glagol_probe.py script is ~200 lines of Python written by an agent from scratch in one session.
Try it yourself
If you have a Yandex TV with YandexOS and a similar problem, here is the minimum scheme:
# Проверить, открыт ли порт Glagol
python -c "
import socket
s = socket.socket()
s.settimeout(2)
result = s.connect_ex(('192.168.0.ВАШ_TV', 1961))
print('порт открыт' if result == 0 else 'порт закрыт')
s.close()
"
If the port is open, everything is described above. The token is obtained through the official OAuth, the script writes Codex by analogy with this case.
If the port is closed, your TV is not on YandexOS, or Yandex integration is disabled in the settings.
Cartoons work. The child is happy. No service center was needed.