Failure using name instead of IP address

Posted on
Wed Dec 23, 2020 4:38 pm
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Failure using name instead of IP address

I'm using the Roku plug-in to control a TV I have. If I use the IP address of the TV, all is fine. However, if I use the mDNS name 75TCLRokuTV.home (verified resolvable on my server running Indigo), I get errors:

Code: Select all
   Roku Network Remote Error       An error occurred executing the GET/PUT request (Device: 646486706): Invalid URL u'http://:8060/query/device-info': No host supplied
Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Roku Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkRESTfulDevice.py", line 256, in concurrentCommandProcessingThread
    responseObj = requests.get(fullGetUrl, auth=authenticationParam, headers=customHeaders, verify=False)
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 71, in get
    return request('get', url, params=params, **kwargs)
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 463, in request
    prep = self.prepare_request(req)
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 396, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/models.py", line 295, in prepare
    self.prepare_url(url, params)
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/models.py", line 358, in prepare_url
    raise InvalidURL("Invalid URL %r: No host supplied" % url)
InvalidURL: Invalid URL u'http://:8060/query/device-info': No host supplied


Curious as to why the mDNS name doesn't work.

Posted on
Wed Dec 23, 2020 9:55 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Failure using name instead of IP address

Curious as to why the mDNS name doesn't work.

Did you manually enter the hostname or select it from the list of Found Devices?

The plugin uses mDNS for discovery of Roku devices, which it presents in the list of Found Devices when you edit the device details. However, I believe the proper way is that it uses mDNS for the discovery process and then once it is discovered it uses the address (typically IP) that the discovery packet provides. If you entered the address directly and not selected from the list of discovered devices, the plugin may be treating that as a hostname and not resolving it first.

Behind the scenes, it is doing a simple HTTP(s) request in the format of:
http://[entered name or resolved IP]:[port]/query/device-info

You can try calling that directly in a browser -- I think it may work, and test it both with IP and your name.

Adam

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests