Files
haos-hacs-integration-media…/custom_components/remote_media_player/strings.json
T
alexei.dolgolyov 97c1784ad4 feat(client): v0.3.0 server compat — WS subprotocol auth, 429 retry, HTTPS, X-Request-ID
Aligns the integration with the four wire-level changes shipped in
media-server v0.3.0/0.3.1 without breaking back-compat with older
server versions or pre-existing config entries.

- WebSocket auth via Sec-WebSocket-Protocol: media-server.token.<T>
  (preferred by server v0.3.0+). The ?token= query is still sent so
  older servers and unauthenticated mode both keep working — aiohttp
  completes the handshake even when the server doesn't echo the
  subprotocol back.
- 429 Too Many Requests surfaced as MediaServerRateLimitError with
  Retry-After parsed; execute_script() sleeps min(retry_after, 30)
  and retries once before falling through to the caller.
- Optional HTTPS/WSS (CONF_USE_SSL) + optional certificate verification
  toggle (CONF_VERIFY_SSL) wired through the config flow, client, and
  WebSocket. Defaults preserve http+verified behaviour, so existing
  config entries are unchanged.
- X-Request-ID header (uuid4 hex) on every HTTP call so HA-side issues
  can be cross-referenced with the server's access/audit logs. The
  format matches the server's ^[A-Za-z0-9._-]{1,128}\$ allow-list so
  the id is preserved verbatim instead of being replaced server-side.

Bumps manifest version to 0.3.3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 11:37:59 +03:00

104 lines
3.6 KiB
JSON

{
"config": {
"step": {
"user": {
"title": "Connect to Media Server",
"description": "Enter the connection details for your Media Server.",
"data": {
"host": "Host",
"port": "Port",
"token": "API Token",
"use_ssl": "Use HTTPS",
"verify_ssl": "Verify TLS certificate",
"name": "Name",
"poll_interval": "Poll Interval"
},
"data_description": {
"host": "Hostname or IP address of the Media Server",
"port": "Port number (default: 8765)",
"token": "API authentication token from the server configuration. Leave blank if the server runs without authentication.",
"use_ssl": "Talk to the server over HTTPS/WSS. The server must be configured with ssl_certfile and ssl_keyfile in config.yaml.",
"verify_ssl": "Verify the server's TLS certificate chain. Turn off only if the server uses a self-signed certificate on a trusted LAN.",
"name": "Display name for this media player",
"poll_interval": "How often to poll for status updates (seconds)"
}
}
},
"error": {
"cannot_connect": "Failed to connect to the Media Server. Please check the host and port.",
"invalid_auth": "Invalid API token. Please check your token.",
"unknown": "An unexpected error occurred."
},
"abort": {
"already_configured": "This Media Server is already configured."
}
},
"options": {
"step": {
"init": {
"title": "Options",
"data": {
"poll_interval": "Poll Interval"
},
"data_description": {
"poll_interval": "How often to poll for status updates (seconds)"
}
}
}
},
"entity": {
"binary_sensor": {
"primary_display": { "name": "Primary display" },
"power_control_supported": { "name": "Power control supported" },
"fullscreen": { "name": "Fullscreen" },
"minimized": { "name": "Minimized" }
},
"sensor": {
"resolution": { "name": "Resolution" },
"foreground_process": { "name": "Foreground process" },
"window_title": { "name": "Window title" },
"pid": { "name": "PID" },
"foreground_monitor": { "name": "Monitor" },
"process_started": { "name": "Process started" }
},
"number": {
"brightness": { "name": "Brightness" },
"contrast": { "name": "Contrast" }
},
"switch": {
"power": { "name": "Power" }
},
"select": {
"input_source": { "name": "Input source" },
"color_preset": { "name": "Color preset" },
"picture_mode": { "name": "Picture mode" }
}
},
"services": {
"execute_script": {
"name": "Execute Script",
"description": "Execute a pre-defined script on one or more Remote Media Player hubs. If no target is selected, the script runs on all configured hubs.",
"fields": {
"script_name": {
"name": "Script Name",
"description": "Name of the script to execute (as defined in server config)"
},
"params": {
"name": "Parameters",
"description": "Optional named parameters to pass to the script (validated against script schema)"
}
}
},
"play_media_file": {
"name": "Play Media File",
"description": "Start playback of a local media file on one or more Remote Media Player hubs. If no target is selected, playback starts on all configured hubs.",
"fields": {
"file_path": {
"name": "File Path",
"description": "Absolute path to the media file on the target hub"
}
}
}
}
}