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

Vizio SmartCast support #8260

Merged
merged 4 commits into from Jul 11, 2017
Merged

Vizio SmartCast support #8260

merged 4 commits into from Jul 11, 2017

Conversation

vkorn
Copy link
Contributor

@vkorn vkorn commented Jun 30, 2017

Description:

Support of newer Vizio TV models (with SmartCast capabilities).

One annoying thing: Vizio serving https without certificate, so lot of warnings will be in the log if loglevel is low. As an option -- proxy requests through nginx.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2906

Example entry for configuration.yaml (if applicable):

media_player: 
  - platform: vizio
    host: 10.0.0.1
    access_token: auth_token

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@homeassistant
Copy link
Contributor

Hi @vkorn,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@mention-bot
Copy link

@vkorn, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers.

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Just some quick comments

host = config.get(CONF_HOST)
if host is None:
_LOGGER.error('No host info')
return False
Copy link
Member

Choose a reason for hiding this comment

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

That's covered by the configuration validation. CONF_HOST will never been None.

token = config.get(CONF_ACCESS_TOKEN)
if token is None:
_LOGGER.error('No token info')
return False
Copy link
Member

Choose a reason for hiding this comment

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

Dito

from homeassistant.helpers import config_validation as cv

REQUIREMENTS = ['git+https://github.com/vkorn/pyvizio.git'
'@master#pyvizio==0.0.1']
Copy link
Member

Choose a reason for hiding this comment

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

Can you publish your module at PyPI?

return False
name = config.get(CONF_NAME)

add_devices([VizioDevice(host, token, name)], True)
Copy link
Member

Choose a reason for hiding this comment

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

Checking that the host is reachable and the token valid before setting up the platform would help that the users don't end up with a non-functional platform in their setup.

@emlove
Copy link
Contributor

emlove commented Jul 9, 2017

It looks like this branch got messed up. Can you clean up the unrelated commits?

@vkorn
Copy link
Contributor Author

vkorn commented Jul 10, 2017

@armills , my bad, re-pushed with force.
@fabaff , please check latest commit, I've removed double checks and introduced 2 new params. If you think that suppressing warnings is not a good idea, I'll remove it. But it's very annoying and spam to log a lot.

@emlove emlove removed their request for review July 11, 2017 20:16
@fabaff fabaff merged commit ef94b5c into home-assistant:dev Jul 11, 2017
@balloob balloob mentioned this pull request Jul 13, 2017
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
* Vizio SmartCast support

* Requested changes
Added new config params

* Vizio SmartCast support

* Requested changes
Added new config params
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants