bkbilly / lnxlink

🖥 Effortlessly manage your Linux machine using MQTT.

Home Page:https://bkbilly.gitbook.io/lnxlink

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discovered entities with a name that starts with the device name (HA 2023.8.0)

pacjo opened this issue · comments

commented

What type of installation are you running?

Desktop

Which Linux OS are you using?

KDE neon 5.27

Which version of LNXLink has the issue?

2023.8.0, 2023.7.1 (probably more)

Describe the problem

After updating to HA 2023.8.0 in the settings page there's a new warning. Transcript below.

# Discovered entities with a name that starts with the device name
This stops working in version 2024.2.0. Please address before upgrading.

Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped of the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue.

List of affected entities:
- sensor.kamilpc_disk_dev_sda3
- sensor.kamilpc_disk_dev_sdb1
- text.kamilpc_send_keys
- binary_sensor.kamilpc_microphone_used
- sensor.kamilpc_disk_dev_nvme0n1p1
- sensor.kamilpc_disk_dev_nvme0n1p2
- binary_sensor.kamilpc_system_updates
- sensor.kamilpc_memory_usage
- sensor.kamilpc_media_info
- button.kamilpc_suspend
- switch.kamilpc_screen_onoff
- text.kamilpc_bash_command
- binary_sensor.kamilpc_camera_used
- button.kamilpc_restart
- sensor.kamilpc_gpu_amd_0
- update.kamilpc_update
- switch.kamilpc_keep_alive
- camera.kamilpc_webcam
- switch.kamilpc_webcam
- sensor.kamilpc_disk_dev_sda4
- sensor.kamilpc_cpu_usage
- button.kamilpc_shutdown

Warning - 03/08/2023

I have no idea what's going on here. Other integrations work fine, but in my setup only lnxlink uses the mqtt integration, so I have no way to check which one is to blame.

Additional context

Relevant topic in HA community: https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099

Configuration

mqtt:
  prefix: lnxlink
  clientId: desktop
  statsPrefix: monitor/stats
  server: <IP>
  port: <PORT>
  auth:
    user: <username>
    pass: <password>
  discovery:
    enabled: true
  lwt:
    enabled: true
    qos: 1
    retain: true
    connectMsg: 'ON'
    disconnectMsg: 'OFF'
update_interval: 5
modules:
- gpu
- bash
#- battery
#- boot_select
#- brightness
- camera_used
- cpu
- disk_usage
#- idle
- keep_alive
- media
- memory
- microphone_used
#- network_download
#- network_upload
- notify
#- nvidia_gpu
#- required_restart
- restart
- screen_onoff
#- screenshot
- send_keys
- shutdown
- suspend
- sys_updates
- update
- webcam
- xdg_open

Logs

i don't think it's relevant, but here you go. There's a lot of stuff so I only included the part after the last update:

sie 04 15:02:07 desktop lnxlink[1304]: Traceback (most recent call last):
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connection.py", line 200, in _new_conn
sie 04 15:02:07 desktop lnxlink[1304]:     sock = connection.create_connection(
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 60, in create_connection
sie 04 15:02:07 desktop lnxlink[1304]:     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
sie 04 15:02:07 desktop lnxlink[1304]:   File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
sie 04 15:02:07 desktop lnxlink[1304]:     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
sie 04 15:02:07 desktop lnxlink[1304]: socket.gaierror: [Errno -2] Name or service not known
sie 04 15:02:07 desktop lnxlink[1304]: The above exception was the direct cause of the following exception:
sie 04 15:02:07 desktop lnxlink[1304]: Traceback (most recent call last):
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen
sie 04 15:02:07 desktop lnxlink[1304]:     response = self._make_request(
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
sie 04 15:02:07 desktop lnxlink[1304]:     raise new_e
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
sie 04 15:02:07 desktop lnxlink[1304]:     self._validate_conn(conn)
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
sie 04 15:02:07 desktop lnxlink[1304]:     conn.connect()
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connection.py", line 604, in connect
sie 04 15:02:07 desktop lnxlink[1304]:     self.sock = sock = self._new_conn()
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connection.py", line 207, in _new_conn
sie 04 15:02:07 desktop lnxlink[1304]:     raise NameResolutionError(self.host, self, e) from e
sie 04 15:02:07 desktop lnxlink[1304]: urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7fb6ac529360>: Failed to resolve 'api.github.com' ([Errno -2] Name or service not known)
sie 04 15:02:07 desktop lnxlink[1304]: The above exception was the direct cause of the following exception:
sie 04 15:02:07 desktop lnxlink[1304]: Traceback (most recent call last):
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
sie 04 15:02:07 desktop lnxlink[1304]:     resp = conn.urlopen(
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen
sie 04 15:02:07 desktop lnxlink[1304]:     retries = retries.increment(
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
sie 04 15:02:07 desktop lnxlink[1304]:     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
sie 04 15:02:07 desktop lnxlink[1304]: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/bkbilly/lnxlink/releases/latest (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fb6ac529360>: Failed to resolve 'api.github.com' ([Errno -2] Name or service not known)"))
sie 04 15:02:07 desktop lnxlink[1304]: During handling of the above exception, another exception occurred:
sie 04 15:02:07 desktop lnxlink[1304]: Traceback (most recent call last):
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/lnxlink/modules/update.py", line 44, in _latest_version
sie 04 15:02:07 desktop lnxlink[1304]:     resp = requests.get(url=url).json()
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/api.py", line 73, in get
sie 04 15:02:07 desktop lnxlink[1304]:     return request("get", url, params=params, **kwargs)
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
sie 04 15:02:07 desktop lnxlink[1304]:     return session.request(method=method, url=url, **kwargs)
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
sie 04 15:02:07 desktop lnxlink[1304]:     resp = self.send(prep, **send_kwargs)
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
sie 04 15:02:07 desktop lnxlink[1304]:     r = adapter.send(request, **kwargs)
sie 04 15:02:07 desktop lnxlink[1304]:   File "/home/pacjo/.local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
sie 04 15:02:07 desktop lnxlink[1304]:     raise ConnectionError(e, request=request)
sie 04 15:02:07 desktop lnxlink[1304]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/bkbilly/lnxlink/releases/latest (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fb6ac529360>: Failed to resolve 'api.github.com' ([Errno -2] Name or service not known)"))

This is just a warning and it only shows once.
It affects most mqtt integrations on Home Assistant which need to be updated.
It won't be a problem for the next 6 months.

commented

It won't be a problem for the next 6 months.

So I can just safely ignore this, but this has to be fixed before 2024.2.0?

Yes, that's right.

Fixed on LNXlink version 2023.9.0.
The warnings will not appear anymore.