HASS.Agent icon indicating copy to clipboard operation
HASS.Agent copied to clipboard

Bug: Unable to add CPULoad sensor

Open it-fryguy opened this issue 3 years ago • 3 comments

Please make sure your bug isn't already listed on HASS.Agent's issue tracker:

https://lab02research.youtrack.cloud/

There's a list of open bugs & features on the right. On the left you can see what's being worked on, what's planned and what's ready for the next release.

If you're not sure, don't worry, just go ahead and we'll discuss :)


Describe the bug I have been able to add sensors for GPUTemperature, GPULoad, MemoryUsage successfully.

I try to add a CPULoad sensor, when I click "Store and activate sensors" I get an error message: An error occured while saving the sensors, check the logs for more info.

The logs show the following: 2022-07-18 20:58:50.082 -05:00 [FTL] [SENSORSMANAGER] Error while storing: PerformanceCounter not found System.Exception: PerformanceCounter not found at HASS.Agent.Shared.HomeAssistant.Sensors.PerformanceCounterSensor..ctor(String categoryName, String counterName, String instanceName, Nullable1 updateInterval, String name, String id) at HASS.Agent.Shared.HomeAssistant.Sensors.PerfCounterSensors.SingleValue.CpuLoadSensor..ctor(Nullable1 updateInterval, String name, String id) at HASS.Agent.Settings.StoredSensors.ConvertConfiguredToAbstractSingleValue(ConfiguredSensor sensor) at HASS.Agent.Sensors.SensorsManager.StoreAsync(List1 sensors, List1 toBeDeletedSensors)

To Reproduce Steps to reproduce the behavior:

  1. Go to 'local sensors'

  2. Click on 'add new'

  3. Scroll down to 'CPULoad'

  4. Click 'Store sensor'

  5. Click 'Store and activate sensors'

  6. See error

  7. Click 'OK' [2022-07-18] HASS.Agent_20220718.log

  8. Going back to local sensors - no CPULoad sensor was added.

Expected behavior I exptected a CPULoad sensor to be added

Screenshots If applicable, add screenshots to help explain your problem.

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output): image

  • Windows' UI language: English

  • HASS.Agent version: 2022.12.0 ? (2212.0.7.0 installer exe version)

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

  • [x] Installed via installer
  • [ ] Installed manually
  • [x] Problem occurs in HASS.Agent
  • [ ] Problem occurs in Satellite Service

Additional context Add any other context about the problem here.

Logs If possible, please provide the logs of HASS.Agent and - if applicable - the Satellite Service. You can find HASS.Agent's logs by going to the main window, then Configuration -> Logging -> open logs folder. The Satellite Service's logs are in the same window, but the Satellite Service tab -> open service logs folder. If you want, you can mail them to [email protected]

Extended Logging was turned on for the last attempt in this file. [2022-07-18] HASS.Agent_20220718.log

it-fryguy avatar Jul 19 '22 02:07 it-fryguy

What language is your Windows installation?

LAB02-Admin avatar Jul 24 '22 09:07 LAB02-Admin

My windows installation is in English

it-fryguy avatar Jul 24 '22 17:07 it-fryguy

Can you try the latest beta: https://github.com/LAB02-Research/HASS.Agent/releases/download/2022.13.0-beta1/HASS.Agent.Installer.exe

LAB02-Admin avatar Aug 01 '22 12:08 LAB02-Admin

Closing this. If it still doesn't work, you can install OpenHardwareMonitor and add the sensors through wmi:

https://hassagent.readthedocs.io/en/latest/wmi-examples/#fetch-cpu-temp-from-openhardwaremonitor

LAB02-Admin avatar Aug 14 '22 07:08 LAB02-Admin