0.45 Discovery not working - errors

Hi, since updating to 0.45 discovery has stopped working for me. I have the following info in my log, any help gratefully received. Thanks.

The following errors have been logged this session:

2017-05-21 09:30:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/discovery.py", line 119, in scan_devices
    None, _discover, netdisco)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/discovery.py", line 145, in _discover
    netdisco.scan()
  File "/home/homeassistant/.homeassistant/deps/netdisco/discovery.py", line 57, in scan
    self.ssdp.scan()
  File "/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py", line 38, in scan
    self.update()
  File "/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py", line 86, in update
    entry for entry in scan()
  File "/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py", line 270, in scan
    return sorted(entries.values(), key=lambda entry: entry.location)
TypeError: unorderable types: NoneType() < str()

Experiencing the same issue myself. Thought it was my config, so I backed it all up and nuked the card. I’ve got a default configuration - fresh out of the box Pi3. I’ve run the following (i neglected to bookmark the reference page) where the author stated this resolved his issues, but my experience was sadly not the same.

Suggested fix that didn’t work for me :
set time/zone
sudo raspi-config

upgrade homeassistant
sudo systemctl stop [email protected]
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
sudo systemctl start [email protected]

upgrade os
sudo apt-get update
sudo apt-get upgrade

update pi firmware
sudo apt-get install rpi-update
sudo rpi-update

Here’s my error log -

2017-05-21 22:29:33 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/discovery.py”, line 119, in scan_devices
None, _discover, netdisco)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/discovery.py”, line 145, in _discover
netdisco.scan()
File “/home/homeassistant/.homeassistant/deps/netdisco/discovery.py”, line 57, in scan
self.ssdp.scan()
File “/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py”, line 38, in scan
self.update()
File “/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py”, line 86, in update
entry for entry in scan()
File “/home/homeassistant/.homeassistant/deps/netdisco/ssdp.py”, line 270, in scan
return sorted(entries.values(), key=lambda entry: entry.location)
TypeError: unorderable types: NoneType() < str()

It seems like this issue is a popular one around .38 release, I believe I was running .41 before the upgrade, but like I said before, I thought it was me, so I downloaded fresh and started new and discovered the issue still exists. I probably could just go manual with my Sonos and Chromecast products, but as they don’t have static IP addresses, that makes yet more things to remember if my environment changes. I have to say, I love and miss discovery, and its only been 2 days I’ve been banging my head on this one!

Same exact error here, but my wemo switch was still discovered. Not sure…

I also got this with a new installation of Hasbian (with 0.45) - it sort of worked on WiFi though, but fails 100% on wired network. This is on a Raspberry Pi 2.

WiFi seems to discover my Plex server but can’t see Hue - if I add Hue manually to the configuration.yaml then it is able to read the lights from it. I think there’s a networking hiccup somewhere?

Try to install netdisco:
pip3 install netdisco==1.0.0rc3

That solve the problem for my install.

If it’s still not working, try to update to Python 3.5 or 3.6 if you’re using 3.4.

Cross topic: Discovery error since last update

1 Like

Didn’t seem to fix it for me. Though, my setup is working fine. Just trying to make my log look less messy is all