Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Problem & Fix Pairing TV #10

Open
pvangorp opened this issue Aug 7, 2017 · 2 comments
Open

Problem & Fix Pairing TV #10

pvangorp opened this issue Aug 7, 2017 · 2 comments

Comments

@pvangorp
Copy link

pvangorp commented Aug 7, 2017

I've got an 55UH850V with LGwebOS 05.30.02 and when I added the component to Hass.io he couldn't connect to the TV, because I didn't get a pair request. So I installed Python on my desktop Windows 10 PC and installed pylgtv. It gave the same issue. When I changed webos_client.py by adding the following code to the bottom off the class WebOsClient
self.load_key_file()
self.register()
self.save_key_file()
Now it gives a pair request and creates the local key file. I don't know if this is the way to fix it but it works for me. Can you commit a fix so it will be fixed in Hass.io, because I can't make file changes in Hass.io

@Qlinkwisp
Copy link

Work for me

Thank you pvangorp

@jheiselman
Copy link

Assuming you mean at the end of the init method in WebOSClient. If that's the case, then know a couple of things:

  1. This is a library and as such, interactive commands (i.e. register()) should be called by the actual program code that uses this library. The example in the README.md should probably include that.
  2. save_key_file() is called at the end of the register() method chain and so isn't needed.
  3. If it were to be implemented in the init() method, then it should probably look more like
self.load_key_file()
if not self.is_registered():
  self.register()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants