Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route to host #188

Open
MiniEggz opened this issue Jul 10, 2021 · 4 comments
Open

No route to host #188

MiniEggz opened this issue Jul 10, 2021 · 4 comments

Comments

@MiniEggz
Copy link

I'm not sure why but I get this message when trying to turn a light on or go through lights. I wrote a CLI program to control my lights and it worked perfectly but I'm now getting these error messages when trying to do anything.

Traceback (most recent call last): File "/home/owen/git_projects/phue_lights/hcontroller.py", line 452, in <module> start_CLI() File "/home/owen/git_projects/phue_lights/hcontroller.py", line 441, in start_CLI execute(split(command)) File "/home/owen/git_projects/phue_lights/hcontroller.py", line 398, in execute turn(args) File "/home/owen/git_projects/phue_lights/hcontroller.py", line 146, in turn b.set_light(str(light_name), 'on', is_on) File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 882, in set_light converted_light = self.get_light_id_by_name(light) File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 755, in get_light_id_by_name lights = self.get_light() File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 834, in get_light return self.request('GET', '/api/' + self.username + '/lights/') File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 650, in request connection.request(mode, address) File "/usr/lib/python3.9/http/client.py", line 1253, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1299, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1248, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1008, in _send_output self.send(msg) File "/usr/lib/python3.9/http/client.py", line 948, in send self.connect() File "/usr/lib/python3.9/http/client.py", line 919, in connect self.sock = self._create_connection( File "/usr/lib/python3.9/socket.py", line 843, in create_connection raise err File "/usr/lib/python3.9/socket.py", line 831, in create_connection sock.connect(sa) OSError: [Errno 113] No route to host

@natcl
Copy link
Member

natcl commented Jul 10, 2021 via email

@MiniEggz
Copy link
Author

No route to host means the script can’t reach your bridge. Did something change on your network ? The IP address of the bridge ?

-- lecaude.com studioimaginaire.com
Le 10 juill. 2021 à 13:12, Owen Cook @.***> a écrit :  I'm not sure why but I get this message when trying to turn a light on or go through lights. I wrote a CLI program to control my lights and it worked perfectly but I'm now getting these error messages when trying to do anything. Traceback (most recent call last): File "/home/owen/git_projects/phue_lights/hcontroller.py", line 452, in start_CLI() File "/home/owen/git_projects/phue_lights/hcontroller.py", line 441, in start_CLI execute(split(command)) File "/home/owen/git_projects/phue_lights/hcontroller.py", line 398, in execute turn(args) File "/home/owen/git_projects/phue_lights/hcontroller.py", line 146, in turn b.set_light(str(light_name), 'on', is_on) File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 882, in set_light converted_light = self.get_light_id_by_name(light) File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 755, in get_light_id_by_name lights = self.get_light() File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 834, in get_light return self.request('GET', '/api/' + self.username + '/lights/') File "/home/owen/.local/lib/python3.9/site-packages/phue.py", line 650, in request connection.request(mode, address) File "/usr/lib/python3.9/http/client.py", line 1253, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1299, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1248, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.9/http/client.py", line 1008, in _send_output self.send(msg) File "/usr/lib/python3.9/http/client.py", line 948, in send self.connect() File "/usr/lib/python3.9/http/client.py", line 919, in connect self.sock = self._create_connection( File "/usr/lib/python3.9/socket.py", line 843, in create_connection raise err File "/usr/lib/python3.9/socket.py", line 831, in create_connection sock.connect(sa) OSError: [Errno 113] No route to host — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks for the reply. I thought that might be the problem. Nothing has changed on the network though. It seems to be able to create a connection as b.connect() is working.

@natcl
Copy link
Member

natcl commented Jul 10, 2021 via email

@MiniEggz
Copy link
Author

Are you able to ping the IP address of the bridge ?

-- lecaude.com studioimaginaire.com
Le 10 juill. 2021 à 16:03, Owen Cook @.***> a écrit :  Ah I thought that might be the problem. Nothing has changed on the network though. It seems to be able to create a connection as b.connect() is working. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

It seems the IP has just changed so everything is working again with the new IP. Now I am wondering why b.connect() still worked with the old IP address and didn't throw an error as it does with all other IP addresses. The old IP still pings, but definitely is not a bridge as there is only one on the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants