@troy
I try to use ping / ICMP intergration on HA 2021.7.4 but I get this error on log:
Logger: homeassistant.setup
Source: components/ping/__init__.py:30
First occurred: 11:12:26 (1 occurrences)
Last logged: 11:12:26
Error during setup of component ping
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 88, in __init__
self._sock = self._create_socket(
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 466, in _create_socket
return socket.socket(
File "/usr/local/lib/python3.8/socket.py", line 231, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 1] Operation not permitted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/ping/__init__.py", line 27, in _can_use_icmp_lib_with_privilege
icmp_ping("127.0.0.1", count=0, timeout=0, privileged=True)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/ping.py", line 141, in ping
with _Socket(source, privileged) as sock:
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 97, in __init__
raise SocketPermissionError
icmplib.exceptions.SocketPermissionError: Root privileges are required to create the socket
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 88, in __init__
self._sock = self._create_socket(
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 466, in _create_socket
return socket.socket(
File "/usr/local/lib/python3.8/socket.py", line 231, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 43] Protocol not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/setup.py", line 249, in _async_setup_component
result = await task
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/ping/__init__.py", line 19, in async_setup
PING_PRIVS: await hass.async_add_executor_job(_can_use_icmp_lib_with_privilege),
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/ping/__init__.py", line 30, in _can_use_icmp_lib_with_privilege
icmp_ping("127.0.0.1", count=0, timeout=0, privileged=False)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/ping.py", line 141, in ping
with _Socket(source, privileged) as sock:
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/icmplib/sockets.py", line 102, in __init__
raise ICMPSocketError(str(err))
icmplib.exceptions.ICMPSocketError: [Errno 43] Protocol not supported
and I add this lines on configuration.yalm
binary_sensor:
- platform: ping
host: MacBookAir
scan_interval: 600
Any idea to fix this ?
Thanks