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

added set_audio_output() and updated readme #43

Merged
merged 6 commits into from
Nov 7, 2020

Conversation

Felix-Pi
Copy link
Contributor

@Felix-Pi Felix-Pi commented Nov 6, 2020

No description provided.

@coveralls
Copy link

coveralls commented Nov 6, 2020

Coverage Status

Coverage decreased (-0.9%) to 84.161% when pulling f6264fb on Felix-Pi:update_controls into e6d134b on supersaiyanmode:master.

@supersaiyanmode
Copy link
Owner

Hi there, Thanks so much for this PR!

I have a few questions:

  1. Is there a "get_audio_output()" equivalent API?
  2. Can we subscribe to it?

Additionally, as for the actual code changes, I was wondering turning those string into an enum? We don't want to the users to pass in the actual payload string. The best option is to introduce a simple class in pywebstv.models, and use it like ApplicationControl or SourceControl.

@Felix-Pi
Copy link
Contributor Author

Felix-Pi commented Nov 6, 2020

Hi, thanks for your quick reply and your input!

I’ve added get_audio_output() which can be subscribed to.
As far as I know there is no endpoint like 'listAudioSources‘, so I implemented a method list_audio_output_sources() to mimic that and return a list of instances from AudioOutputSource.
set_audio_output(..) now accepts an instance of AudioOutputSource.

pywebostv/controls.py Show resolved Hide resolved
pywebostv/controls.py Show resolved Hide resolved
pywebostv/controls.py Show resolved Hide resolved
pywebostv/model.py Outdated Show resolved Hide resolved
@alliefitter
Copy link

@supersaiyanmode Whoa! There's a bunch of stuff in here that isn't implement in this project. I'll try to implement and test all of this stuff this week and put in a PR. Do you still not have access to a WebOS TV to test stuff yourself? Man, I should have thought about looking at Home Bridge stuff.

…adme and removed unnecessary method from AudioOutputSource
@supersaiyanmode
Copy link
Owner

@supersaiyanmode Whoa! There's a bunch of stuff in here that isn't implement in this project. I'll try to implement and test all of this stuff this week and put in a PR. Do you still not have access to a WebOS TV to test stuff yourself? Man, I should have thought about looking at Home Bridge stuff.

Totally! It is disappointing that LG refuses to release any sort of documentation. We have to go hunt for other uses in the wild, come back and implement it.

I have access to the TV, but the wireless receiver is non-functional for some reason. If I must test for some reason, it's via a 10ft long ethernet cable 😝.

pywebostv/controls.py Show resolved Hide resolved
pywebostv/controls.py Show resolved Hide resolved
Copy link
Owner

@supersaiyanmode supersaiyanmode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall. Thanks so much for this PR! Just a tiny round of super minor requests :)

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Srivatsan Iyer <supersaiyanmode@users.noreply.github.com>
@Felix-Pi
Copy link
Contributor Author

Felix-Pi commented Nov 7, 2020

Looking good overall. Thanks so much for this PR! Just a tiny round of super minor requests :)

Thank you for your time and advise :)

@supersaiyanmode supersaiyanmode merged commit fb0b826 into supersaiyanmode:master Nov 7, 2020
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

Successfully merging this pull request may close these issues.

None yet

4 participants