WD EX4100 NAS SNMP Sensors

ex4100

I spent a while figuring out some SNMP sensors for my NAS, so to save anyone else the trouble here they are:

- platform: snmp
  name: 'NAS System Temperature'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.7.0
  community: 'public'
  version: '2c'
  unit_of_measurement: '°C'
  value_template: "{{ value.split(' ')[0].split(':')[1] }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Disk 1 Temperature'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.10.1.5.1
  community: 'public'
  version: '2c'
  unit_of_measurement: '°C'
  value_template: "{{ value.split(':')[1] }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Disk 2 Temperature'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.10.1.5.2
  community: 'public'
  version: '2c'
  unit_of_measurement: '°C'
  value_template: "{{ value.split(':')[1] }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Disk 3 Temperature'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.10.1.5.3
  community: 'public'
  version: '2c'
  unit_of_measurement: '°C'
  value_template: "{{ value.split(':')[1] }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Disk 4 Temperature'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.10.1.5.4
  community: 'public'
  version: '2c'
  unit_of_measurement: '°C'
  value_template: "{{ value.split(':')[1] }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Fan Status'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.8.0
  community: 'public'
  version: '2c'
  value_template: "{{ value }}"
  scan_interval: 60

- platform: snmp
  name: 'NAS Size'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.9.1.5.1
  community: 'public'
  version: '2c'
  value_template: "{{ value.replace('T','') }}"
  unit_of_measurement: 'TB'
  scan_interval: 300

- platform: snmp
  name: 'NAS Free Space'
  host: 10.1.1.10
  baseoid: 1.3.6.1.4.1.5127.1.1.1.6.1.9.1.6.1
  community: 'public'
  version: '2c'
  value_template: "{{ value.replace('T','') }}"
  unit_of_measurement: 'TB'
  scan_interval: 300

- platform: template
  sensors:
    nas_free_pct:
      friendly_name: 'Free Space'
      value_template:  "{{ ( 100 * states('sensor.nas_free_space')|float / states('sensor.nas_size')|float )|round(1) }}"
      unit_of_measurement: '%'

Lovelace:

type: entities
entities:
  - entity: sensor.nas_free_pct
  - entity: binary_sensor.nas_fan
    name: Fan
  - entity: sensor.nas_system_temperature
    name: System Temperature
  - entity: sensor.nas_disk_1_temperature
    name: Disk 1 Temperature
  - entity: sensor.nas_disk_2_temperature
    name: Disk 2 Temperature
  - entity: sensor.nas_disk_3_temperature
    name: Disk 3 Temperature
  - entity: sensor.nas_disk_4_temperature
    name: Disk 4 Temperature
title: WD EX4100 NAS
show_header_toggle: false
state_color: true

In the web interface there is a system report that shows the raid and volume health. I have yet to find an OID for these but will post it if I do.

Great work!!!

For reference, my WD EX2 Ultra has these oids:

mycloudex2ultraAgentVer.0 = STRING: 1.00
mycloudex2ultraSoftwareVersion.0 = STRING: 5.24.108 (5.24.108.0826.2022)
mycloudex2ultraHostName.0 = STRING: MyCloudEX2Ultra
mycloudex2ultraFTPServer.0 = STRING: 0
mycloudex2ultraNetType.0 = STRING: 0
mycloudex2ultraTemperature.0 = STRING: Centigrade:58 	Fahrenheit:136
mycloudex2ultraFanStatus.0 = STRING: fan0: stop
mycloudex2ultraVolumeNum.1 = INTEGER: 1
mycloudex2ultraVolumeName.1 = STRING: Volume_1
mycloudex2ultraVolumeFsType.1 = STRING: ext4
mycloudex2ultraVolumeRaidLevel.1 = STRING: raid1
mycloudex2ultraVolumeSize.1 = STRING: 3.6T
mycloudex2ultraVolumeFreeSpace.1 = STRING: 897.5G
mycloudex2ultraDiskNum.1 = INTEGER: 1
mycloudex2ultraDiskNum.2 = INTEGER: 2
mycloudex2ultraDiskVendor.1 = STRING: WD
mycloudex2ultraDiskVendor.2 = STRING: WD
mycloudex2ultraDiskModel.1 = STRING: WDC WD40EFAX-68JH4N0
mycloudex2ultraDiskModel.2 = STRING: WDC WD40EFAX-68JH4N0
mycloudex2ultraDiskSerialNumber.1 = STRING: WD-WX22D207KTR3
mycloudex2ultraDiskSerialNumber.2 = STRING: WD-WX32D20154YZ
mycloudex2ultraDiskTemperature.1 = STRING: Centigrade:47
mycloudex2ultraDiskTemperature.2 = STRING: Centigrade:46
mycloudex2ultraDiskCapacity.1 = STRING: 4000 GB.
mycloudex2ultraDiskCapacity.2 = STRING: 4000 GB.

You can download the MIB file from the admin interface, and get the values with snmpwalk -c public -m <mib-file> <ip> wd. Add -On to get the numeric OIDs

2 posts were split to a new topic: Installing Home Assistant on WD my could EX2Ultra

How did you figure out the snmp sensors for your HD? I have an older WD My Book World Edition that I would love to access that way! Thanks!

There is an opinion in the UI to download a MIB file (where you enable SNMP). You can load that file in a SNMP walker tool