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

bug: OMV System Health Monitoring: Invalid temperature value #2319

Open
JureFabjan opened this issue Feb 13, 2025 · 5 comments · May be fixed by #2322
Open

bug: OMV System Health Monitoring: Invalid temperature value #2319

JureFabjan opened this issue Feb 13, 2025 · 5 comments · May be fixed by #2322
Assignees
Labels
bug Something isn't working

Comments

@JureFabjan
Copy link

Describe the bug

I am running Homarr on my NAS with OpenMediaVault installed. I have installed openmediavault-cputemp 7.0.2 and am trying to get data to show on System Health Monitoring. There I get "Failed to fetch health status" and the logs tell me that the temperature has an invalid value. I tried to uncheck the variables that are being fetched in the widget customization, with no result.

Steps to reproduce

Add openmediavault-cputemp 7.0.2 to the OMV, add OMV integration to Homarr and add the System Health Monitoring widget to the board.

Impact

I am unaware of a workaround. I have tried the fixes to CPU temperature bug available on GitHub repos and elsewhere, but these did not resolve the issue.

Additional information

2025-02-13T13:24:58.772Z error Failed to run integration job integration=jidn8wr697vrxlz0tn9fc2z9 inputHash='W3t9XQ==' error=Error: Invalid temperature value
at Object.transform (/app/apps/tasks/tasks.cjs:458798:17)
at ZodEffects._parse (/app/apps/tasks/tasks.cjs:23688:35)
at _ZodObject._parse (/app/apps/tasks/tasks.cjs:22465:33)
at _ZodObject._parseSync (/app/apps/tasks/tasks.cjs:20835:29)
at /app/apps/tasks/tasks.cjs:22385:27
at Array.map ()
at _ZodArray._parse (/app/apps/tasks/tasks.cjs:22384:38)
at _ZodObject._parse (/app/apps/tasks/tasks.cjs:22465:33)
at _ZodObject._parseSync (/app/apps/tasks/tasks.cjs:20835:29)
at _ZodObject.safeParse (/app/apps/tasks/tasks.cjs:20865:29)

Version

1.5.0

Installation method

Docker Run

Browser

Firefox

@Meierschlumpf
Copy link
Member

This issue is similar to #2145 that was fixed in #2247, but it seems like there is another temperature for smart, see the following code:

// Schema for SMART information
export const smartSchema = z.object({
  response: z.array(
    z.object({
      devicename: z.string(),
      temperature: z.union([z.string(), z.number()]).transform((val) => {
        // Convert string to number if necessary
        const temp = typeof val === "string" ? parseFloat(val) : val;
        if (isNaN(temp)) {
          throw new Error("Invalid temperature value");
        }
        return temp;
      }),
      overallstatus: z.string(),
    }),
  ),
});

This code has probably also to be adjusted to allow undefined

@manuel-rw manuel-rw self-assigned this Feb 13, 2025
@manuel-rw manuel-rw moved this from Todo to In Progress in Homarr prioritized backlog Feb 13, 2025
@manuel-rw manuel-rw linked a pull request Feb 13, 2025 that will close this issue
4 tasks
@manuel-rw
Copy link
Member

Can you please check whether we solved this issue in the test image https://github.com/homarr-labs/homarr/pkgs/container/homarr/356023907?tag=fix-omv-invalid-temperature-when-not-available ?
Please don't forget to backup your instance first and restore your previous image, since this is only a temporary testing image and will be deleted later on.

@JureFabjan
Copy link
Author

The image works. It shows 0C for the temperature for the drives, but it does read the temperature of the CPU. The other values are correct.

@manuel-rw
Copy link
Member

manuel-rw commented Feb 15, 2025

I assume you also don't see any temp in OMV? Homarr simply crashed because OMV didn't return any temperature for them.
If this is correct, I will merge the PR and the fix will be available in the next deployment.

@JureFabjan
Copy link
Author

I am still trying to understand why this happens. OMV tells me the temperatures for the drives. I am running a main NVME drive and some HDDs in RAID for storage. But Homarr reports temperatures for the two partitions instead of the drives themselves. I am not sure if this is a problem of what data Homarr tries to fetch or what OMV is returning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants