LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.56k stars 68 forks source link

Bug: CPU usage percentage between HA and Windows don't match #368

Open SpartaTom opened 11 months ago

SpartaTom commented 11 months ago

Describe the bug The CPU usage percentage in Home Assistant doesn't match the CPU usage the windows taskmanager performance tab. Home assistant gives me a value of 1-4%. Windows performance tells me it floats between 15-50%

To Reproduce

  1. I've add the 'cpuload' sensor with a refresh time of 5 seconds
  2. I've added a gauge card using the sensor now available in HA
  3. pressed CTRL+SHIFT+ESC and then went to the performance tab
  4. compare the numberic values.

Expected behavior I would expect the values to match. At least more closely due to the 5 second refresh time.

Screenshots CPUscreenshot

Misc info (please complete the following information):

Please check what's applicable (multiple answers possible):

Additional context MQTT broker is the mosquitto broker. Multiple other sensors do match.

amadeo-alex commented 10 months ago

Possible duplicate of https://github.com/LAB02-Research/HASS.Agent.Staging/pull/16 as I cannot replicate this on build with https://github.com/LAB02-Research/HASS.Agent.Staging/pull/16

amadeo-alex commented 10 months ago

If you can, please check the unofficial build release and try to replicate the issue https://github.com/amadeo-alex/HASS.Agent

xStellarZ commented 6 months ago

@SpartaTom @amadeo-alex were there any further findings on this? I have the exact same issue, as does a friend of mine.

amadeo-alex commented 6 months ago

Does it happen on the original or the fork (https://github.com/hass-agent)?

xStellarZ commented 6 months ago

Does it happen on the original or the fork (https://github.com/hass-agent)?

Happens on both

jrsjax commented 3 months ago

I've recently installed hass.agent, and have the same issue. However, I had previously noticed that a HomeSeer script I have to monitor the same PC is showing the same values as I now see in hass.agent. Both hass.agent and the HS script show CPU usage values that are consistently about 1/6 of what Windows task manager shows. Coincidentally, it is a 6-core i7-8700 CPU. Related?

HASS.agent Sensor: sensor

HomeSeer: hscpu

Windows Task Manager: taskmgr

OGTK423 commented 1 week ago

I'm on the fork and I am seeing the same thing - HASS.Agent reporting CPU usage between 1-4% percent while Windows shows 20-25%.