Skip to main content

Library to control Panasonic Viera TVs

Project description

panasonic-viera

Pipeline Status PyPI version

UPDATE (2019-03-28)

Pincode and encryption support has been added for newer TV models circa 2019. For example, the "FZ" Panasonic models. These new models require pincode authentication and communication is now encapsulated in AES-CBC-128 encryption with HMAC-SHA-256. See issue https://github.com/florianholzapfel/panasonic-viera/issues/9

Please note that these new changes have not yet been tested thoroughly, use at your own risk.

Usage

Code

Examples

Request a pin code and get credentials
import panasonic_viera
rc = panasonic_viera.RemoteControl("<HOST>")
# Make the TV display a pairing pin code
rc.request_pin_code()
# Interactively ask the user for the pin code
pin = raw_input("Enter the displayed pin code: ")
# Authorize the pin code with the TV
rc.authorize_pin_code(pincode=pin)
# Display credentials (application ID and encryption key)
print rc.app_id
print rc.enc_key
# We can now start communicating with our TV
# Send EPG key
rc.send_key(panasonic_viera.Keys.epg)
Use saved credentials
import panasonic_viera
rc = panasonic_viera.RemoteControl("<HOST>", app_id="BSkeeKuuwakd9Q==", encryption_key="EarvNQodKYlj5zTEIhZoXQ==")
# We can now start communicating with our TV
# Send EPG key
rc.send_key(panasonic_viera.Keys.epg)
Increase Volume By 1
import panasonic_viera
rc = panasonic_viera.RemoteControl("<HOST>")
volume = rc.get_volume()
rc.set_volume(volume + 1)
Send EPG Key
import panasonic_viera
rc = panasonic_viera.RemoteControl("<HOST>")
rc.send_key(panasonic_viera.Keys.epg)

Command Line

This command line starts a REPL to the TV. Therefore it is mainly used testing purposes and not for automating the TV.

usage: panasonic_viera [-h] [--verbose] host [port]

Remote control a Panasonic Viera TV.

positional arguments:
  host        Address of the Panasonic Viera TV
  port        Port of the Panasonic Viera TV. Defaults to 55000.

optional arguments:
  -h, --help  show this help message and exit
  --verbose   debug output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panasonic_viera-0.4.4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panasonic_viera-0.4.4-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file panasonic_viera-0.4.4.tar.gz.

File metadata

  • Download URL: panasonic_viera-0.4.4.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for panasonic_viera-0.4.4.tar.gz
Algorithm Hash digest
SHA256 3b5158209cd6591044cc28968768f1d7211019edf97936f95f69b9678f27f74b
MD5 be646f94fff19fb3853fe08b7185ccac
BLAKE2b-256 153fb230d081a5aae0615c0dbc27ce6e13a1325ba6172b6a5e5085cd8010563e

See more details on using hashes here.

Provenance

The following attestation bundles were made for panasonic_viera-0.4.4.tar.gz:

Publisher: python-publish.yml on florianholzapfel/panasonic-viera

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file panasonic_viera-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for panasonic_viera-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa2085ff87ac66519d293ce3a79b3e856ce5da07a3aa8ffa87f1d0a210447b1
MD5 e501ceec3d8bbdd690352551966cbe2d
BLAKE2b-256 dc38b0fc994b72dbf92c9c919e4bf4395dae8914dadc5812dcc92cdc0ad69ebe

See more details on using hashes here.

Provenance

The following attestation bundles were made for panasonic_viera-0.4.4-py3-none-any.whl:

Publisher: python-publish.yml on florianholzapfel/panasonic-viera

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page