A couple of days ago I noticed that I am getting these errors:
return [protocol.responses.get(query_for_ip[ip]) for ip in ips_to_lookup]
KeyError: IPv4Address('192.168.1.6')
The peculiar thing is that 192.168.1.6 is not in DHCP’s range, and I have never (knowingly) allocated it to any device
I am running Home Assistant OS 7.6 with Core 2022.4.6 on a Raspberry Pi 4, with Mosquitto, Rhasspy, ESPhome, node-RED, node-RED Companion, and LocalTuya add-ons.
In HASSIO > Supervisor > System the Core log shows the following error repeating every hour
KeyError: IPv4Address('192.168.1.6')
2022-04-26 15:32:29 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 306, in async_discover
for host in await self._discover_hosts.async_discover():
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 166, in async_discover
hostnames = await self.async_get_hostnames(sys_network_data)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 201, in async_get_hostnames
results = await async_query_for_ptrs(nameserver, ips_to_lookup)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 101, in async_query_for_ptrs
return await async_query_for_ptr_with_proto(protocol, ips_to_lookup)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 131, in async_query_for_ptr_with_proto
return [protocol.responses.get(query_for_ip[ip]) for ip in ips_to_lookup]
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 131, in <listcomp>
return [protocol.responses.get(query_for_ip[ip]) for ip in ips_to_lookup]
KeyError: IPv4Address('192.168.1.6')
2022-04-26 16:32:29 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/dhcp/__init__.py", line 306, in async_discover
for host in await self._discover_hosts.async_discover():
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 166, in async_discover
hostnames = await self.async_get_hostnames(sys_network_data)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 201, in async_get_hostnames
results = await async_query_for_ptrs(nameserver, ips_to_lookup)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 101, in async_query_for_ptrs
return await async_query_for_ptr_with_proto(protocol, ips_to_lookup)
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 131, in async_query_for_ptr_with_proto
return [protocol.responses.get(query_for_ip[ip]) for ip in ips_to_lookup]
File "/usr/local/lib/python3.9/site-packages/aiodiscover/discovery.py", line 131, in <listcomp>
return [protocol.responses.get(query_for_ip[ip]) for ip in ips_to_lookup]
KeyError: IPv4Address('192.168.1.6')
Any suggestions on how to find out what device / integration is causing these messages ?