core: Transmission URL no longer works

The problem

My transmission integration broke on upgrade to 2023.1 beta.

I have spun up an instance of 2022.12.7 and confirmed the same config entry is working just fine there, I am fairly sure it is due to #83932.

It is throwing the below error, I suspect the new python library is not happy because my hostname includes the http type and full path to the rpc endpoint.

What version of Home Assistant Core has the issue?

core-2023.1.0b3

What was the last working version of Home Assistant Core?

2022.12.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Transmission

Link to integration documentation on our website

https://www.home-assistant.io/integrations/transmission

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-01-03 13:03:02.713 ERROR (MainThread) [homeassistant.components.transmission] can't connect to transmission daemon: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //my.server.url/transmission/rpc:443/transmission/rpc (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f29ed41ebf0>: Failed to establish a new connection: [Errno -3] Try again'))

Additional information

Config Entry:

{
  "entry_id": "bd984518336ef1393b1cc964c45b241d",
  "version": 1,
  "domain": "transmission",
  "title": "Transmission",
  "data": {
    "name": "Transmission",
    "host": "https://my.server.url/transmission/rpc",
    "port": 443,
    "username": "transmission",
    "password": "<<SNIP>>"
  },
  "options": {
    "scan_interval": 120,
    "limit": 10,
    "order": "oldest_first"
  },
  "pref_disable_new_entities": false,
  "pref_disable_polling": false,
  "source": "user",
  "unique_id": null,
  "disabled_by": null
}

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 23 (13 by maintainers)

Most upvoted comments

The linked PR deals with adding SSL, there’s a small bikeshed starting in its comments seemingly pointing at awaiting a final release of https://github.com/trim21/transmission-rpc/releases/tag/v4.0.0-alpha.5 which adds url parsing which would solve both the path & ssl problems but would need extra work in HA core to migrate existing configs to the new format

Yes, with the below config it fails with the above error (400 The plain HTTP request was sent to HTTPS port):

{
  "entry_id": "bd984518336ef1393b1cc964c45b241d",
  "version": 1,
  "domain": "transmission",
  "title": "Transmission",
  "data": {
    "name": "Transmission",
    "host": "my.server.url",
    "port": 443,
    "username": "transmission",
    "password": "<<snip>>"
  },
  "options": {
    "scan_interval": 120,
    "limit": 10,
    "order": "oldest_first"
  },
  "pref_disable_new_entities": false,
  "pref_disable_polling": false,
  "source": "user",
  "unique_id": null,
  "disabled_by": null
}

Thanks for the confirmation. I will submit a PR to handle the protocol.