Is there a way to monitor the HDD SMART data of computers on your LAN?

Hi all, does anyone know of a way of using HA to be a central monitor of HDD smart data for PCs (Windows in my case) on a LAN?

My use case is to be able to monitor and alert for HDD failure early warnings for the PCs in my household. I may buy a NAS in the future so I’d likely want to be able to do the same for that.

(I have a backup option which is to install CrystalDiskInfo on each device and have it send an email in the case of a SMART trigger, but thats not proven to be reliable)

I’m using scripts to publish values to mqtt.

Don’t know, but should be possible on Windows? :thinking:

Easiest way would probably be to install a SMNP service on your machines and then have HA pull that information.
SMNP is a standard, so you do not have to worry about what provider you use and HA (and NodeRed) have that ability available as standard.

BTW. SMNP is actually made for network monitoring, so devices like switches, routers, printers and access points are usually coming with this protocol installed and running with the “public” as a default community name for read-only access to common information.
The information provided is called MIBs and some parts are common for all systems and some parts are vendor specific.
I use iReasoning MIB Browser to look at the information available on the devices.

I do not know if the standard SMNP service in Windows 10 provide all the information needed for your project, but try it out.
If it does not, then other SMNP services from other programmers might have the options you require, since SMNP is just the protocol to make the information available over the network in a standardized way. The information can be anything the programmers choose and some versions might also provide ways for you to add information of your own choice.

Is something hard to parse data in Windows.

I just use for cpu usage.

@echo off

set server=
set user=
set pass=
set topic=windows/pc/cpu_usage
set app=.\bin\mqtt\mosquitto_pub.exe -h %server% -u %user% -P %pass%

rem ### code ###

timeout 5 > nul

set usage=-1

for /f "skip=1" %%p in ('wmic cpu get loadpercentage ^| findstr /r /v "^$"') do (
set usage=%%p
)

echo debug: %usage% %%

%app% -t %topic% -m %usage%

timeout 5

rem ### eof ###

1 Like

Hi,
I know this is an old forum topic but shows up in Google searches :slight_smile:

So here’s what I found for my Linux box (actually my NAS) that is able to publish HDD SMART information over MQTT for easy integration in HomeAssistant: GitHub - eschava/psmqtt: Utility reporting system health and status via MQTT

I’m sharing in case it might be useful to others…

2 Likes