Nuc System Monitoring Card

Liamstears,
Your card looks incredible and this is exactly what I’m looking for. It doesn’t appear to work in my HA. I’ve done the following steps:

  1. Installed all the cards from HACS
  2. Setup the sensor.yaml for get systemmonitor entities and verified they exist
  3. Copied your intel-nuc.png file into /local/images
  4. Rebooted
  5. Added a card “manual”
  6. Copied your yaml into the manual card and saved

It just shows up as a blank card. Even the NUC icon doesn’t show up. No error messages. Any ideas? Or maybe I’m not looking in the right place for error messages.

One of the entities at the top of the yaml doesn’t exist on your system

Delete them 1 at a time from both the entities and variables section at the top of the card yaml and the card will show when the entity that doesn’t exist is removed

When you know which one it is you can fix it from there

In chrome, hit f12. Error should be in the lower right corner

Thanks, this worked and I figured it out.

Thanks @Hs82H,

I’m a bit further now and installed the script. Only error is with getting the cpuload.
Any idea what could solve this?

root@proxmox:/home/user/proxmox-monitor# /usr/bin/python3 ./proxmox-monitor.py                                                 
Traceback (most recent call last):                                                                                             
  File "./proxmox-monitor.py", line 140, in <module>                                                                           
    cpu_load = check_cpu_load()                                                                                                
  File "./proxmox-monitor.py", line 38, in check_cpu_load                                                                      
    cpu_load = p.split("average:")[1].split(",")[0].replace(' ', '')                                                           
TypeError: a bytes-like object is required, not 'str'                                                                          
root@proxmox:/home/user/proxmox-monitor#

The code in the script:

def check_cpu_load():
                # bash command to get cpu load from uptime command
                p = subprocess.Popen("uptime", shell=True, stdout=subprocess.PIPE).communicate()[0]
                cores = subprocess.Popen("nproc", shell=True, stdout=subprocess.PIPE).communicate()[0]
                cpu_load = p.split("average:")[1].split(",")[0].replace(' ', '')
                cpu_load = float(cpu_load)/int(cores)*100
                cpu_load = round(float(cpu_load), 1)
                return cpu_load

change your strings to bytes, put a b in front of every string e.g. b'average:', b',', etc

I’m getting a strange placement of the CPU utilization. Below is a screenshot of the card and my YAML code. I can not figure out why the CPU Percentage is at a lower height than RAM %. Any ideas?

        - type: horizontal-stack
          cards:
            - type: 'custom:bar-card'
              show_icon: true
              align: split
              columns: 1
              max: 100
              positions:
                icon: inside
                indicator: inside
                name: inside
                value: inside
              unit_of_measurement: '%'
              severity:
                - value: 50
                  color: '#3498db'
                - value: 75
                  color: '#f39c12'
                - value: 100
                  color: '#e45e65'
              style: |
                ha-card { 
                  --paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
                  --ha-card-background: "rgba(0, 0, 0, 0.0)";
                  --ha-card-box-shadow: 'none';
                }
              entity: sensor.memory_use_percent
              name: RAM
              entity_row: true
            - type: 'custom:bar-card'
              show_icon: true
              align: split
              columns: 1
              max: 100
              positions:
                icon: inside
                indicator: inside
                name: inside
                value: inside
              unit_of_measurement: '%'
              severity:
                - value: 50
                  color: '#3498db'
                - value: 75
                  color: '#f39c12'
                - value: 100
                  color: '#e45e65'
              style: |
                ha-card { 
                  --paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
                  --ha-card-background: "rgba(0, 0, 0, 0.0)";
                  --ha-card-box-shadow: 'none';
                }
              entity: sensor.processor_use_percent
              name: CPU

Never mind, I figured it out.

I’m getting closer to implementing this card, just a few areas to work on:

Can’t figure out how to get the image of the server into www to correct line 2.

if you place the file in

config/www/images/myimage.png

then the path you use in lovelace is

/local/images/myimage.png

/config/www maps to /local

2 Likes

I’m confused as to how to get the *.png into that folder. I have the *.png on my windows pc, but HA is running on a raspberry pi 4. I can only access HA using terminal. Not sure how to get the *.png over.

OK, just found the “upload” command at the top of the www/images using file editor.

Install samba share addon and then you can access the folder through File Explorer

I have samba share added on, but having trouble accessing from windows.ScreenHunter 95

is homeassistant your hostname? It may be homeassistant.local, it may be something else. You can also use the IP address \\ipaddress

EDIT: You also need to verify that samba is turned on and running. Look at the addon and make sure it’s started. Also, you’ll need a username and password, they can’t be blank.

I get the same error using the ip address, been working on this a long time. Samba share worked at one time, but then stopped.ScreenHunter 96

Then you don’t have it configured properly, either in windows or in the addon. Verify what I said in the previous post

what’s the best size for the “server” png?

You’re missing the horizontal stack so the image is stretched to it’s largest size. If you add the horizontal stack for the image and the uptime, it’ll make the image smaller.