Cpuspeed and systemmonitor sensors

It seems that cpuspeed and systemmonitor sensors are not working. Anyone else having the same problem?

My configuration:

- platform: cpuspeed
  name: CPU

- platform: systemmonitor
  resources:
    - type: memory_free
    - type: memory_use_percent
    - type: processor_use
    - type: since_last_boot

and the error in the log

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 217, in async_add_entity
    yield from entity.async_device_update(warning=False)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 306, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/cpuspeed.py", line 86, in update
    self._state = round(float(self.info['hz_actual_raw'][0])/10**9, 2)

Working here.

My config (which at first glance doesn’t give me any clues as to why yours isn’t working)…

link removed

my working settings at the moment. Just remove CPUspeed. Didn’t get that to work because I think it overlaps with processor use?

I’d recommend using mine and swapping out with what you have.

sensor:

  - platform: systemmonitor
    resources:
      - type: memory_use_percent
      - type: processor_use
      - type: disk_use_percent
        arg: /
      - type: last_boot

# CPU Temp
  - platform: command_line
    name: CPU Temp
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: '{{ value | multiply(0.001) | round(2)  }}'
4 Likes

Anyone know if it is possible to to use systemmonitor on Intel NUC with Hass.io? Of course I tried it but nothing is reported. Would love to know what impact my add-ons are having on resources.

i have the same question, can we get this to work on a Intel Nuc?

I believe we may have to wait for Hass OS support for the NUC as there is some chatter that the OS may be able to report this information directly back to the GUI without the need for a sensor?

I have this working on my NUC, I pull Memory, CPU, Disk Size, but I cannot get Network up/down to work (using eth0) any ideas?

Great! Can you share your config? Are you running Hassio?

yes, running hassio (followed your instructions to install :wink: config is pretty much as per the component as per here: https://www.home-assistant.io/components/sensor.systemmonitor/

- platform: systemmonitor
  resources:
  - type: processor_use
  - type: disk_use_percent
    arg: "/"
  - type: since_last_boot
  - type: memory_use_percent
  - type: network_in
    arg: eth0
  - type: network_out
    arg: eth0

image

1 Like

is the ifconfig command available in Hass.io commandline?

If so, that will tell you what the interfaces are, its likely eth0 isn’t correct.

yes it is and it confirmed eth0… but the values are still “unavailable” in the UI as per screenshot…

How did you install? Hass.io on top of what OS?

followed these steps: My steps to success for Hass.io on Intel NUC

Brilliant, working now with native Hassio on NUC. Thanks for the heads up. For network (LAN) data, use the following:

  - type: network_in
    arg: enp3s0
  - type: network_out
    arg: enp3s0
1 Like

Hi,

enp3s0 does not work for me either

running ip a i get:

13: eth0@if14: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP

which is why I had eth0 initially, but that alsi did not work…

if you are running a Debian based distribution install the net-tools package then run ifconfig.

core-ssh:~# ifconfig
eth0      Link encap:Ethernet  HWaddr [redacted]
          inet addr:[redacted]  Bcast:0.0.0.0  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5042 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1553 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:609761 (595.4 KiB)  TX bytes:103004 (100.5 KiB)

This should work on your system:

- platform: systemmonitor
  resources: 
  - type: disk_free
    arg: /
  - type: memory_use_percent
  - type: processor_use
  - type: since_last_boot
  - type: network_in
    arg: eth0
  - type: network_out
    arg: eth0
1 Like

yes it Should but it doesen’t… :frowning:

How did you create that System Status card/panel?