Skip to content

LEGACY protocol TVs fail with MQTT code 5 (static credentials required, not dynamic) #1

Description

@duduroga

Environment

  • TV: Hisense OLED B5
  • TV firmware: V0000.01.00L.L1021
  • TV protocol version: 2150 (LEGACY)
  • vidaa-control version: 1.1.0
  • OS: Debian 13

Symptom

auth pair fails immediately with MQTT code 5 (not authorized) on LEGACY protocol TVs.

Root cause

In VidaaTV.__init__, when use_dynamic_auth=True and the protocol is detected as
LEGACY, the client generates dynamic LEGACY credentials. But LEGACY TVs require static
credentials (hisenseservice / multimqttservice). The _connect_with_fallback path
also only cycles through dynamic auth methods (MODERN, MIDDLE, LEGACY) and never tries
static credentials as a final fallback.

Fix

Two changes to client.py:

  1. In __init__: when protocol detection returns LEGACY and no saved credentials exist,
    fall through to static credentials instead of generating dynamic LEGACY creds.

  2. In _connect_with_fallback: after exhausting all dynamic auth methods, try static
    credentials as a final attempt.

With this fix applied, pairing and command sending work correctly:

  • TV discovered as "Sala de estar", MAC e4:3b:c9:cb:16:b8, protocol 2150
  • tv --ip 192.168.1.138 key HOME works

Workaround

Manually patch client.py in the installed package as described above.


Additional finding: LEGACY protocol TVs (protocol version 2150) also do not support
PIN-based pairing. The config flow in ha-vidaa-tv unconditionally calls
async_start_pairing() and shows a PIN entry form, but LEGACY TVs ignore the pairing
request entirely and never display a PIN.

Fix: detect LEGACY protocol after async_connect() and skip the pairing step entirely —
create the config entry directly using the static credentials that were already
established during connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions