Integración domótica Panasonic Viera, gratuita y de código abierto

Panasonic Viera TVs on the local network: power, volume, mute, keys, source, apps.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Control your Panasonic Viera TVs from Gladys, on your local network, without any cloud: power, volume, mute, remote keys, source (TV, HDMI 1 to 4) and application launch. The integration uses the UPnP/SOAP network remote control of the TV (port 55000), the one Panasonic's "TV Remote" app uses.
Unofficial integration, not affiliated with Panasonic. This first milestone was written and tested against a simulated TV: it has never been tested on a real TV. Your feedback is welcome.
Prepare the TV
- In the TV menus: Network > TV Remote App Settings (the name varies with the year), enable TV Remote (network remote control).
- To turn the TV on from Gladys, also enable, depending on the model, Powered On by Apps and/or Wake-on-LAN.
- Give the TV a fixed IP address in your router (reserved DHCP lease).
Add a TV
- By its address: type the IP address in "IP addresses of the TVs" (several addresses separated by commas) and save.
- By the search: use Find the TVs. Gladys searches the network (SSDP) for the integration; a TV that is off, or a network blocking multicast, may not answer: type the address then.
The TV appears in the integration's Discovery tab: create it.
Pairing (models from about 2018 on)
Recent TVs (FZ, GZ, HZ, JZ series and later) encrypt their remote control and ask for a PIN once:
- Turn the TV on.
- In the integration configuration, use Start pairing with the TV's IP address. The TV shows a PIN (4 to 8 digits, usually 4).
- Within 5 minutes, use Finish pairing with that PIN.
The integration then keeps the keys given by the TV in its own data folder
(/data); they are never sent to Gladys nor written to the logs. They stay
there when the device is deleted from Gladys (a "forget a TV" action is
planned). If the TV is reset and explicitly refuses these keys (or refuses the
session three times, minutes apart, while on), the integration status says
so: pair again. The keys are still tried again every 30 minutes, in case the
refusal was passing. Older TVs need no pairing.
Before pairing, volume and mute already work; keys, power and applications do not.
What you get
| Feature | Detail |
|---|---|
| Power | State read from the TV; command with the power key |
| Volume | 0 to 100, read and set |
| Mute | Button: each press toggles the mute read from the TV |
| Buttons | Volume +/-, channel +/-, last view, arrows, OK, back, exit, menu, option, info, guide, input, play, pause, stop, rewind, fast forward, skip back/forward, record |
| Source | Dropdown: TV, HDMI 1 to 4 |
| Application | Dropdown: Netflix, YouTube, Prime Video, web browser… and the applications the TV lists (after an "Update" of the device in Discovery) |
| Remote key | Dropdown of every remote key (digits, colours, subtitles…), handy in scenes |
Source and application are not read back from the TV: the dropdowns command, they do not show the state.
Turning the TV on
The power key toggles: the integration reads the state from the TV just before acting (1.5 s at most) and sends nothing when the TV already is in the wanted state. "On" means "the TV answers volume requests"; "off" means "nothing answers": the connection is refused or never accepted. When the TV answers something unexpected, or accepts the connection and then says nothing, the state is unknown: nothing is published (Gladys keeps showing the last known state) and no power key is sent.
- TV in network standby ("Powered On by Apps" enabled): the power key is enough.
- TV in deep standby (it answers nothing at all): Wake-on-LAN is
needed. Gladys sends the packet for the integration, to the MAC seen by the
search, or the one typed in "MAC addresses for Wake-on-LAN"
(
192.168.1.40=a8:13:74:12:34:56). With a known MAC, "turn on" always sends the packet; if the TV still answers on its network port, the power key is sent first. The command is confirmed to Gladys at once, then the integration waits up to 20 seconds for the TV in the background, sending the packet again every 2.5 seconds, never a power key (it could turn off a TV that is booting). If a TV does not wake up, try the broadcast address of your network in "Wake-on-LAN broadcast address".
Known limits, in both directions (to be checked on real models):
- a TV in standby that still answers volume requests shows as on: "turn on" then sends nothing (but Wake-on-LAN, when the MAC is known);
- a TV that is on but does not answer volume requests shows as off: "turn on" would then send the power key and turn it off.
Workaround in both cases: the "Remote key" dropdown, value Power, sends the power key as is, without reading the state.
Settings
- Refresh interval: how often power, volume and mute are read, 5 to 300 seconds (10 by default).
- Check the TVs: state, pairing and Wake-on-LAN of every known TV.
Limits
- Local network only, port 55000 open between Gladys and the TV.
- Gladys voice notifications do not go through the TV.
- The direct HDMI keys and the application list depend on the model.
- Never tested on a real TV so far.
Credits
Logic ported to JavaScript from panasonic-viera by Florian Holzapfel (MIT license). Panasonic and Viera are trademarks of Panasonic Holdings Corporation, used only to name the compatible products.
Parámetros de configuración
Estos son los parámetros que Panasonic Viera te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Your Panasonic Viera TVs, on your local network | section | No | Power, volume, mute, remote keys, source and applications, through the UPnP/SOAP remote control of the TV (port 55000), without any cloud. On the TV, allow the network remote control (Network > TV Remote App Settings). Give each TV a fixed IP address in your router, then type the addresses below, or use "Find the TVs". The TVs then appear in the Discovery tab. Models from 2018 on ask for a pairing: see the Pairing section. Unofficial integration, not affiliated with Panasonic. |
| IP addresses of the TVs | string | No | Separated by commas, for example 192.168.1.40, 192.168.1.41. TVs found by the search are kept without being typed here. |
| MAC addresses for Wake-on-LAN (optional) | string | No | To turn on a TV in deep standby: IP=MAC pairs separated by commas, for example 192.168.1.40=a8:13:74:12:34:56. The search fills the MAC in by itself when Gladys sees it. Wake-on-LAN must be enabled in the TV's network settings. |
| Wake-on-LAN broadcast address (optional) | string | No | Only if a TV does not wake up: the broadcast address of your network, for example 192.168.1.255. Empty: 255.255.255.255. |
| Refresh interval (s) | number | No | How often power, volume and mute are read, in seconds. |
| Pairing (models from 2018 on) | section | No | Recent TVs encrypt their remote control and ask for a PIN once. Turn the TV on, press "Start pairing" with its IP address: the TV shows a PIN (4 to 8 digits). Type it in "Finish pairing" within 5 minutes. The keys the TV gives are kept by the integration only, in its data folder (they stay there after a device is deleted). Older TVs need no pairing. Volume and mute work even before pairing. |
Cómo instalar Panasonic Viera en Gladys
- En Gladys, abre Integraciones: Panasonic Viera aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/lm1lc3n7/gladys-panasonic-viera:0.1.2), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-panasonic-viera.
Panasonic Viera requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Sobre las integraciones externas
Panasonic Viera es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene LM1LC3N7, no el equipo principal de Gladys.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación