Monitor MacMini from HA

Hi

Im looking for a way to monitor my Mac Mini from HA running on a raspberry pi. I want to check my up time, disk usage on all partitions and free disk space.

Can anyone help?

Thx!

One condition might be to have an ssh access to your MAC. Then from that point you may get the information listed in few CLI commands.

1 Like

I have an ssh connection to the Mac, but dont know what to do from here.

You should write command that will respond you the informations. Then you will need to decipher those date to be displayed on HA.
So first step it might need certain shell commands to establish the connection to the MAC, then the responses captured from the SSH session.
All these encapsulated in a script.
I can’t tell how these commands are working, I don’t have a MAC.
Just study how you type these commands in a shell, then they might be replicated in a script.

If you are not familiar to these process, you need a little of learning to get there.

Something like

# Example configuration.yaml entry
sensor:
  - platform: command_line
    command: "ssh mac_address uptime|cut -d ' ' -f 4"
    name: Mac Uptime

You’ll need to set up passwordless login first.

1 Like

Or you can use something like this;

In fact, look through all the system monitoring integrations https://www.home-assistant.io/components/#system-monitor

Thanks!
Finally got the time to play around with it and got the passwordless login set up and running.
But when I run this command, I see the sensor in hassio, but no information shown?
Does you know why? I get the answer “1” when I run it in terminal, so the connection is working…