pi@pihome:~/philips_android_tv $ python philips.py --host 10.1.1.66 pair
Starting pairing request
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connection.py", line 140, in _new_conn
conn = connection.create_connection(
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connectionpool.py", line 597, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
conn.connect()
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connection.py", line 149, in _new_conn
raise NewConnectionError(
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb60f36d0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/requests/adapters.py", line 413, in send
resp = conn.urlopen(
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/connectionpool.py", line 648, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "/home/pi/.local/lib/python3.9/site-packages/requests/packages/urllib3/util/retry.py", line 376, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='10.1.1.66', port=1926): Max retries exceeded with url: /6/pair/request (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb60f36d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/philips_android_tv/philips.py", line 140, in <module>
main()
File "/home/pi/philips_android_tv/philips.py", line 90, in main
pair(config)
File "/home/pi/philips_android_tv/philips.py", line 41, in pair
r = requests.post("https://" + config['address'] + ":1926/6/pair/request", json=data, verify=False)
File "/home/pi/.local/lib/python3.9/site-packages/requests/api.py", line 110, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='10.1.1.66', port=1926): Max retries exceeded with url: /6/pair/request (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb60f36d0>: Failed to establish a new connection: [Errno 111] Connection refused'))