Western Digital My Cloud

Did somebody try to do this for WD MyBool Live Duo?
I can SSH into the system and the memory stuff works, but e.g. there is no fan_control (well, system has no fan) and also the storage output is different.

The discussion makes we wonder if it would not be possible to install a MQTT client on the MBL, but that probably is prevented by WD for god knows why. Really a pity that there is no component for this until now — probably not enough users.

Can someone help me with this template?
On the snmp i receive from the first HD the value 136G, and 3.8T from the second. So, the problem is, i need to replace both letters, T and G, and on the second HD i need multiply by 1000 to get the equivalent of GBs of the first drive. But i dont know how to do this.
Heres the code:

- platform: snmp
  name: 'Free space 2 NAS disk'
  host: 192.168.68.107
  baseoid: 1.3.6.1.4.1.5127.1.1.1.8.1.9.1.6.2
  community: 'public'
  version: "2c"
  value_template: "{{ value.replace('G','') }}"
  unit_of_measurement: "GB"
  accept_errors: true
  scan_interval: 10

Great job on the sensors functionality guys.
What about buttons to send a coomand to Hibernate the WDmycloudmirror?
And then another button to wake it up, maybe using WOL?

I’ve been using the command line approach for a while now without any problems, but the latest HA release 2023.6 has some breaking changes that require some adjustments to the yaml.

THIS NEEDS TO BE CHANGED BEFORE UPGRADING TO RELEASE 2023.8 !

Take a look at the breaking change concerning command line :
The Command Line integration changes its YAML configuration format from an old-style platform configuration to a more modern integration-style configuration format.

So where it used to be:

sensor:
  # NAS Disk Space Percent Used
  - platform: command_line
    name: DATASTATION_disk_perc_used
    unit_of_measurement: '%'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 5 | sed 's/%//g'
  # NAS Disk Space Used
  - platform: command_line
    name: DATASTATION_disk_space_used
    unit_of_measurement: 'MB'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df -m | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 3
  # NAS Disk Space Free
  - platform: command_line
    name: DATASTATION_disk_space_free
    unit_of_measurement: 'MB'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df -m | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 4
  # NAS Board Temperature
  - platform: command_line
    name: DATASTATION_board_temp
    unit_of_measurement: '°C'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep Current | cut -d' ' -f 4
  # NAS HD0 Temperature
  - platform: command_line
    name: DATASTATION_hd0_temp
    unit_of_measurement: '°C'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep hd0 | cut -d' ' -f 2 | cut -d'=' -f 2
  # NAS HD1 Temperature
  - platform: command_line
    name: DATASTATION_hd1_temp
    unit_of_measurement: '°C'
    command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep hd1 | cut -d' ' -f 2 | cut -d'=' -f 2

… it now needs to be:

command_line:
  # NAS Disk Space Percent Used
  - sensor:
      name: DATASTATION_disk_perc_used
      unit_of_measurement: '%'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 5 | sed 's/%//g'
  # NAS Disk Space Used
  - sensor:
      name: DATASTATION_disk_space_used
      unit_of_measurement: 'MB'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df -m | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 3
  # NAS Disk Space Free
  - sensor:
      name: DATASTATION_disk_space_free
      unit_of_measurement: 'MB'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] df -m | sed -n '/HD_a2/s/ \+/ /gp' | cut -d' ' -f 4
  # NAS Board Temperature
  - sensor:
      name: DATASTATION_board_temp
      unit_of_measurement: '°C'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep Current | cut -d' ' -f 4
  # NAS HD0 Temperature
  - sensor:
      name: DATASTATION_hd0_temp
      unit_of_measurement: '°C'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep hd0 | cut -d' ' -f 2 | cut -d'=' -f 2
  # NAS HD1 Temperature
  - sensor:
      name: DATASTATION_hd1_temp
      unit_of_measurement: '°C'
      command: ssh -i /ssl/wdmycloudhass -oHostKeyAlgorithms=+ssh-dss -o StrictHostKeyChecking=no -q [email protected] fan_control -g 0 | grep hd1 | cut -d' ' -f 2 | cut -d'=' -f 2

Hi everyone,

So I have an old WD mycloud mirror which I am wanting to add into home assistant to monitor its temps and disk health.

I have managed to reverse engineer the web API and create a basic python module that can login and fetch the system data, to then return as a JSON.

I am just in the process of learning how to upload this module to PyPi

If you want to take a look I have it on GitHub and feel free to make a PR or submit an issue for ideas and such.

Cheers!

Edit:

Forgot to say, my NAS does not seem to support SNMP which is why I did this - Also thought it would be a fun little project