Skip to content

media_player.firetv - Adding support for https.#8022

Merged
balloob merged 2 commits into
home-assistant:devfrom
coolcow:patch-1
Jun 16, 2017
Merged

media_player.firetv - Adding support for https.#8022
balloob merged 2 commits into
home-assistant:devfrom
coolcow:patch-1

Conversation

@coolcow
Copy link
Copy Markdown
Contributor

@coolcow coolcow commented Jun 13, 2017

This change allows to access a firetv-server instance that runs over https (behind reverse proxy for exemple).
Default stays http, but if ssl: true is set in the configuration the connection goes over https.

Full configuration exemple:

media_player firetv:
  platform: firetv
  host: firetv-server.domain.com
  port: 443
  ssl: true
  device: firetv
  name: FireTV

Successfully tested.

This change allows to access a firetv-server instance that runs over https (via a reverse proxy for exemple).
Default stays http, but if `ssl: true` is set in the configuration the connection goes over https.

Successfully tested.
@homeassistant
Copy link
Copy Markdown
Contributor

Hi @coolcow,

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!

try:
requests.get(DEVICE_ACTION_URL.format(
self.host, self.port, self.device_id, action_id), timeout=10)
self.proto, self.host, self.port, self.device_id, action_id), timeout=10)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (89 > 79 characters)

response = requests.get(
DEVICE_STATE_URL.format(
self.host, self.port, self.device_id), timeout=10).json()
self.proto, self.host, self.port, self.device_id), timeout=10).json()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (89 > 79 characters)


try:
response = requests.get(DEVICE_LIST_URL.format(host, port)).json()
response = requests.get(DEVICE_LIST_URL.format(proto, host, port)).json()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (81 > 79 characters)

from homeassistant.const import (
STATE_IDLE, STATE_OFF, STATE_PAUSED, STATE_PLAYING, STATE_STANDBY,
STATE_UNKNOWN, CONF_HOST, CONF_PORT, CONF_NAME, CONF_DEVICE, CONF_DEVICES)
STATE_UNKNOWN, CONF_HOST, CONF_PORT, CONF_SSL, CONF_NAME, CONF_DEVICE, CONF_DEVICES)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (88 > 79 characters)

@happyleavesaoc
Copy link
Copy Markdown
Contributor

Looks good once lint errors are fixed!

@coolcow
Copy link
Copy Markdown
Contributor Author

coolcow commented Jun 15, 2017

I have set up a proper developement environment now. Lint errors are fixed.

@balloob balloob merged commit 8af6bac into home-assistant:dev Jun 16, 2017
@balloob balloob mentioned this pull request Jun 16, 2017
@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.

6 participants