Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe keyfile to /opt/iobroker #52

Closed
jpawlowski opened this issue Oct 26, 2019 · 4 comments
Closed

Safe keyfile to /opt/iobroker #52

jpawlowski opened this issue Oct 26, 2019 · 4 comments

Comments

@jpawlowski
Copy link
Contributor

After pairing with LGTV, the keyfile is currently saved to ~/.lgtv2.
However, it would be better to have this in /opt/iobroker instead because that directory is usually part of regular backups (or with Docker containers, it is usually the one you would have as an external volume outside of the container).

Without this file being part of backup, a restore will be incomplete, requiring to re-pair the device.

@SebastianSchultz
Copy link
Collaborator

Hello,

can you help me with that?
I can't find the place in the code were the keyfile is stored?!

@jpawlowski
Copy link
Contributor Author

The reference point is here:
https://github.com/SebastianSchultz/ioBroker.lgtv/blob/c098a4ef48a20d83df47f637ce61af7fe6102780/lgtv.js#L323

However, i think there must be a separate attribute to control the destination directory.
Didn’t look into the external LGTV library but likely you will find something in there.

@jpawlowski
Copy link
Contributor Author

jpawlowski commented Oct 27, 2019

It seems this behavior is intended by the fork author:

https://www.npmjs.com/package/lgtv2

With v1.4.0 the location and filename of the keyFile is changed, so you likely will have to accept the connection on your TV again after upgrading to 1.4.0.

I believe what you wanna do is to upgrade the dependency to version 1.4.0 and implement to store the key inside of ioBroker itself, avoiding the file system. saveKey and clientKey API options sound like they were specifically implemented for this.

@instalator
Copy link
Contributor

#56

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

No branches or pull requests

3 participants