Connection refused by router. Telnet enabled?
Traceback (most recent call last):
File â/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/thomson.pyâ, line 93, in get_thomson_data
telnet = telnetlib.Telnet(self.host)
File â/usr/local/lib/python3.6/telnetlib.pyâ, line 218, in init
self.open(host, port, timeout)
File â/usr/local/lib/python3.6/telnetlib.pyâ, line 234, in open
self.sock = socket.create_connection((host, port), timeout)
File â/usr/local/lib/python3.6/socket.pyâ, line 724, in create_connection
raise err
File â/usr/local/lib/python3.6/socket.pyâ, line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
As a technical noob I do not know whether Telnet should be set up in HA och on my router. Checked the router for any Telnet settings and found none.
I really cannot find anything about enabling Telnet on my Thomson. And do not understand how Nmap relates to it.
I set up a port forwarding rule from port 23 to 23 (which is labelled Telnet) but that didnât do the trick. Can you help?
You better hope telnet is not running on your router, because it is very insecure. Telnet is very old fashioned and, well, insecure. You have opened an insecure service to the world at large.
But even if you are crazy enough to want to run telnet over the internet, simply opening the port does not start telnet. It allows someone out there to access telnet on your router if telnet is already running.
Remove that port forward.
Then tell us this: what makes you think your router even has telnet capabilities.
I assumed it was standard, and since HA was asking for it, that it was a matter of enabling it.
And then, since I also saw the port existed in the port forwarding and it was labelled Telnet, I guessed it had that capability too.
Oh damn! I didnât even know there were alternative integrations as device_trackers! Perfect, thanks. I have set up Nmap now and it detected the new entities. Now Iâm struggling a bit how to use Nmap as device_tracker, since the documentation uses a router as example.
Go to Settings > Devices & Services > Integrations.
Find the Nmap integration, click on âx enttiesâ to see what you have (I have 5 in total).
There you can click on a tracked device, and on the âSettingsâ tab of the pop-up you can change the names to something you would recognise e.g âChaos Control Phone Nmapâ (assuming itâs a phone you are tracking). I would also change the entity_id at this point e.g. device_tracker.chaos_control_phone_nmap.
Now go to Settings > People. Click on the person which you want to connect the device to. A pop-up should appear with a dropdown âPick device to trackâ. Select your Nmap device.
Thank you very much! I just figured it on my own, but it was just what you said. Just did it. It turns out it was much easier than the device_tracker route in the yaml.
Tiny question. Why is it that Nmap recognizes some things as devices and others as entities? For example, my router and my smart heating system are detected as devices. However my phones and laptops donât, they only get an entity. I thought it would be because devices are connected through another integration (they are), but then my phone also is integrated through the app and still not recognized as device.