Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform Systemmonitor does not generate unique IDs #133985

Closed
ve6rah opened this issue Dec 25, 2024 · 9 comments · Fixed by #134139
Closed

Platform Systemmonitor does not generate unique IDs #133985

ve6rah opened this issue Dec 25, 2024 · 9 comments · Fixed by #134139

Comments

@ve6rah
Copy link

ve6rah commented Dec 25, 2024

The problem

Error in logs stating that systemmonitor does not generater unique IDs

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Systemmonitor

Link to integration documentation on our website

https://www.home-assistant.io/integrations/systemmonitor/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:773
integration: Sensor (documentation, issues)
First occurred: 22:11:22 (2 occurrences)
Last logged: 22:11:22

Platform systemmonitor does not generate unique IDs. ID disk_use_percent_media_lyre already exists - ignoring sensor.disk_use_percent_media_lyre
Platform systemmonitor does not generate unique IDs. ID disk_use_percent_media_frigate already exists - ignoring sensor.disk_use_percent_media_frigate

Additional information

I found a related (identical?) bug from last year "System Monitor Does Not Generate Unique IDs #108085" however it stated it was resolved in 2024.1.4 so this must be something different?

@home-assistant
Copy link

Hey there @gjohansson-ST, mind taking a look at this issue as it has been labeled with an integration (systemmonitor) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of systemmonitor can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign systemmonitor Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


systemmonitor documentation
systemmonitor source
(message by IssueLinks)

@gjohansson-ST
Copy link
Member

Can you run df -h in a terminal window in HA to list all your mountpoints so I can see them here?

@ve6rah
Copy link
Author

ve6rah commented Dec 27, 2024

I'm not entirely sure how this relates to the lack of unique IDs generated by the integration, but here's the list:

Filesystem                Size      Used Available Use% Mounted on
overlay                 234.0G     51.2G    173.2G  23% /
/dev/sda8               234.0G     51.2G    173.2G  23% /share
/dev/sda8               234.0G     51.2G    173.2G  23% /homeassistant
devtmpfs                  7.8G         0      7.8G   0% /dev
tmpfs                     7.8G         0      7.8G   0% /dev/shm
/dev/sda8               234.0G     51.2G    173.2G  23% /addons
/dev/sda8               234.0G     51.2G    173.2G  23% /addon_configs
/dev/sda8               234.0G     51.2G    173.2G  23% /data
/dev/sda8               234.0G     51.2G    173.2G  23% /backup
/dev/sda8               234.0G     51.2G    173.2G  23% /media
//172.30.32.1/LYRE        7.2T      1.4T      5.8T  20% /media/LYRE
//172.30.32.1/FRIGATE
                          1.3T    217.0G      1.1T  16% /media/FRIGATE
/dev/sda8               234.0G     51.2G    173.2G  23% /ssl
/dev/sda8               234.0G     51.2G    173.2G  23% /etc/hosts
tmpfs                     3.1G      2.0M      3.1G   0% /run/dbus
/dev/sda8               234.0G     51.2G    173.2G  23% /run/audio
/dev/sda8               234.0G     51.2G    173.2G  23% /etc/asound.conf
/dev/sda8               234.0G     51.2G    173.2G  23% /etc/resolv.conf
/dev/sda8               234.0G     51.2G    173.2G  23% /etc/hostname
tmpfs                     7.8G         0      7.8G   0% /dev/shm
/dev/sda8               234.0G     51.2G    173.2G  23% /var/log/journal
/dev/sda8               234.0G     51.2G    173.2G  23% /etc/pulse/client.conf
tmpfs                     3.1G      2.0M      3.1G   0% /run/log/journal
tmpfs                     7.8G         0      7.8G   0% /proc/asound
tmpfs                     7.8G         0      7.8G   0% /proc/acpi
devtmpfs                  7.8G         0      7.8G   0% /proc/kcore
devtmpfs                  7.8G         0      7.8G   0% /proc/keys
devtmpfs                  7.8G         0      7.8G   0% /proc/timer_list
tmpfs                     7.8G         0      7.8G   0% /proc/scsi
tmpfs                     7.8G         0      7.8G   0% /sys/firmware
//172.30.32.1/FRIGATE
                          1.3T    217.0G      1.1T  16% /media/frigate
//172.30.32.1/Lyre        7.2T      1.4T      5.8T  20% /media/Lyre

@gjohansson-ST
Copy link
Member

It lists the two paths twice which seems to be the problem.

No idea why it would do that but apparently it does so need to fix it so it doesn't try to load the same one twice.

@ve6rah
Copy link
Author

ve6rah commented Dec 27, 2024

Well, I killed 2 of the mount points, and the error is gone now. However I still think that there's a problem with Systemmonitor not creating unique ids

@gjohansson-ST
Copy link
Member

No. The problem is duplication of unique ids. Not that it's absent.

@ve6rah
Copy link
Author

ve6rah commented Dec 27, 2024

Then the IDs that systemmonitor are generating are not unique. perhaps they need to be case sensitive?

@gjohansson-ST
Copy link
Member

The unique ids are slugs of the paths so they will be always lowercase (hence why it's in your case creating duplicated).
I fix that in the integration so that we don't add the same path twice (regardless case).

But why you had two mounts for the two paths I don't know, but it at least created the issue so we can now fix it.

@ve6rah
Copy link
Author

ve6rah commented Dec 27, 2024

The reason I had 2 mounts for the same paths was because of the way different addons work. The SambaNAS add-on (which is the only way I've found to mount USB drives) auto-mounts all upercase mount points, but the frigate add-on insists on only using lowercase for it's path, I couldn't get the 2 to play nice, so I manually mounted the second set (lowercase) in addition to the automatic mount points.
I've changed now to symbolic links instead of second mounts and it seems to be working ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants