Deluge Integration - won't connect with windows PC

Hi,

I am trying to integrate deluge but having trouble. I have the daemon running on the default port on a windows PC. I have manually set deluge:deluge:10 in the auth config file to avoid any credential issues but it still wont connect and i don’t know why.

I don’t even know how to troubleshoot it as there doesn’t seem to be a way to manually connect to the deamon apart fomt he webui which connects fine. I have also made a new windows firewall rule to allow the default port to accept connections.

Any suggestions?

I get the following warning

2019-07-17 23:33:36 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform deluge
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/deluge/switch.py", line 40, in setup_platform
    deluge_api.connect()
  File "/usr/local/lib/python3.7/site-packages/deluge_client/client.py", line 78, in connect
    self._connect()
  File "/usr/local/lib/python3.7/site-packages/deluge_client/client.py", line 92, in _connect
    self._socket.connect((self.host, self.port))
  File "/usr/local/lib/python3.7/ssl.py", line 1150, in connect
    self._real_connect(addr, False)
  File "/usr/local/lib/python3.7/ssl.py", line 1137, in _real_connect
    super().connect(addr)
socket.timeout: timed out
#Switch
  - platform: deluge
    host: 192.168.0.x
    port: 58846
    username: "deluge"
    password: "deluge"

#Sensor
  - platform: deluge
    host: 192.168.0.x
    port: 58846
    username: "deluge"
    password: "deluge"
    monitored_variables:
      - 'current_status'
      - 'download_speed'
      - 'upload_speed'

Is the windows daemon running on that port?

Can you connect to that port via telnet?