GithubHelp home page GithubHelp logo

stan69b / homebridge-vieramatic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antoniomeireles/homebridge-vieramatic

0.0 0.0 0.0 1.03 MB

Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)

License: Apache License 2.0

TypeScript 96.71% JavaScript 3.29%

homebridge-vieramatic's Introduction

homebridge-vieramatic - the Homebridge plugin for Panasonic™ Viera™ TVs

verified-by-homebridge License: Apache 2 npm version downloads GitHub last commit

features

  • full support for 2018 and later models

    Pin code and encryption (encapsulated in AES-CBC-128 encryption with HMAC-SHA-256) was added as a requirement for communication with TV models released on and after 2018 which has broken previously existing plugins.

    Please do note that older models are still supported too, as first class citizens.

  • HomeKit TV Accessory
  • Power TV On & Off
  • Input switching
  • Automated TV Apps handling
  • Fully configurable via the Homebridge UI. No more need to manually edit homebridge's config.json nor to run shell commands.

requirements

  • iOS 12.3 or later
  • Homebridge v0.4.50 or later

TV setup

  1. On your TV go to Menu -> Network -> TV Remote App Settings and make sure that the following settings are all turned ON:

    • TV Remote
    • Powered On by Apps
    • Networked Standby
  2. Then, go to Menu -> Network -> Network Status -> Status Details and take note of your TV ip address.

plugin setup

the simple way [recommended]

  1. Get homebridge.

  2. install the homebridge UI, if not using it already.

  3. From your browser, access the homebridge's ui, and jump to the plugins tab.

    there, search for vieramatic, and install it.

  4. Restart homebridge

  5. Go again to the plugins tab, and click on 'settings' from this plugin.

  6. Just follow the instructions and that's it.

  7. If for some reason, things do not progress as expected, it is probably a bug. Please just report it.

the old fashioned way

  1. Get homebridge.

  2. Install this plugin

     $ sudo npm install -g homebridge-vieramatic
  3. run the pre-flight setup script, and take note of the output

     $ viera-pair YOUR_TV_IP_ADDRESS_HERE
  4. Update your homebridge's config.json file per the output of viera-pair in the step above.

  5. Populate the hdmiInputs section according to your input switching list.

    "platforms": [
       {
          "platform": "PanasonicVieraTV",
          "tvs": [
             {
               "friendlyName": "YOUR_TV_NAME_HERE",
               "ipAddress": "YOUR_TV_IP_ADDRESS_HERE",
               "hdmiInputs": [
                 {
                   "id" : "1",
                   "name": "Apple TV"
                 }, {
                   "id" : "2",
                   "name": "VodafoneTV box"
                 },
               ]
             }
          ]
       }
    ]
    • please do note that if have more than one TV you add its config to the tvs array and not as a whole platform duplicate, along the example bellow...

      "tvs": [
        {
          "friendlyName": "YOUR_TV_NAME_HERE",
          "ipAddress": "YOUR_TV_IP_ADDRESS_HERE",
          "hdmiInputs": []
        }, {
          "friendlyName": "YOUR_TV_NAME_HERE",
          "ipAddress": "YOUR_SECOND_TV_IP_ADDRESS_HERE",
          "hdmiInputs": []
        }
      ]
  6. disable the custom volume slider (optional)

    By default each TV will appear on HomeKit with an additional volume slider (of Fan type) in order to provide a visual way to control the volume (in addition to the hardware volume controls)

    In order to disable this feature, for each defined TV, just add

       "customVolumeSlider": false,
  7. [re]start homebridge

tips and tricks

TV naming

If you'd prefer for Vieramatic to automatically detect and consume the name on your TV, then you can remove the tvName field from your config.

Your config.json file will look like this:

"tvs": [
  {
    "ipAddress": "YOUR_TV_IP_ADDRESS_HERE",
    "friendlyName": "OPTIONAL_CUSTOMIZED_TV_NAME_HERE",
    "hdmiInputs": [
      {
        "id" : "1",
        "name": "Apple TV"
      }, {
        "id" : "2",
        "name": "VodafoneTV box"
      }
]

supported TV sets

This plugin should support ALL the TV models supported by Panasonic's own "Panasonic TV Remote TV 3" mobile app (IOS install link and Android install link).

So, if experiencing setup problems, do make sure, in advance, that the TV is discoverable/manageable by the mobile app while connected to the exact same network as your homebridge setup, because if it isn't there's not much that the plugin could do.

some older sets became unreachable from the network either immediately after entering into stand-by, or after a while, and a subset of those sets supports being awaken via 'Wake On Lan'. If your set is one of those, you'll need to specify your TVs MAC address, either via the Homebridge UI's or directly into the TV's definition in homebridge's config.json along:

  "tvs": [
    {
      "ipAddress": "YOUR_TV_IP_ADDRESS_HERE",
       (...)
      "mac": "YOUR_TV_MAC_ADDRESS",
      (...)
     }
   ]

so that the the plugin could turn the TV ON.

Disabling TV app support in very old TV sets

Early Panasonic SmartTVs APis either didn't expose TV apps using the current API or simply lacked that functionality at all. So, in order to support those sets a new options was added in 2.0.16 that allows the plugin's support for TV's apps to be disabled. For each affected TV just add to its' section (in config.json), or (preferable) turn that option ON via homebridge's config UI.

   "disabledAppSupport": true,

input switching - how to get Siri to do it

As far as the author knows, currently, the HomeKit TV integration spec from Apple sadly does not allow to switch inputs with Siri directly (would love to be proven wrong).

The workaround is either to make shortcuts that do the input change and invoke those from Siri, or to create scenes straight in the home app that achieve the same and then invoke them.

regarding containerized homebridge setups

If your homebridge setup is a containerized one please do note that in order for this plugin to fully work you need to also expose to the outside port 8973, otherwise you won't be able to access to endpoint that generates your encryption credentials.

upgrading from pre 2.0.0 releases of this plugin

The upgrade should be transparent, and painless.

The only expected side effect is that you'll need to set again the visibility of your inputs and apps as they 'll get back to the defaults. If you experience other kinds if issues then it is a bug so, please report it with as much context as possible.

contributing

Contributions and suggestions or bug reports are gladly welcomed!

licensing

This is an open source project released under the Apache License 2.0.

acknowledgments

  • George Nick Gorzynski's homebridge-panasonic plugin which served as the base inspiration for this new one.
  • Florian Holzapfel's panasonic-viera python library which documented the new pin code authentication and communication scheme of 2018 and later models.
  • the Homebridge community at large without whom this wouldn't just be possible.

homebridge-vieramatic's People

Contributors

antoniomeireles avatar g30r93g avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.