Synology NAS 2 Factor Authentication MFA

Hi All,

I have a raspberry Pi with Hass.io installed.
I would like to read out my Synology NAS. But I use 2 factor authentication for all my NAS users. For some reason I can’t let Has.io get to work with Synology NAS.

Any Idea how to read out my NAS, for example using SNMP?

thanks in advance.

Kind regards
Robin

Hi all,

I haveimplemented SNMP and the OID for the CPU, Memory Load and the tempature for the Hard drives.
But still not able to read out the used space of the Synology NAS. For some reason itresults in a “OID does not exist”. When I do a SNMPwalk is show my the good values.

Hopefully there is someone that can advise me what to do.

Kind regards
Robin

Can you share code for those?

Hi Mcfrojd,
these are the default Synology OID codes which you can find on the website of Synology:

serial number: .1.3.6.1.4.1.6574.1.5.2.0
DSM version: .1.3.6.1.4.1.6574.1.5.3.0
Update available: .1.3.6.1.4.1.6574.1.5.4.0

HDD 1 temp: .1.3.6.1.4.1.6574.2.1.1.6.0
HHD 2 temp: .1.3.6.1.4.1.6574.2.1.1.6.1

Available Mem: .1.3.6.1.4.1.2021.4.6.0
Mem chache: .1.3.6.1.4.1.2021.4.15.0
Mem buffer: .1.3.6.1.4.1.2021.4.14.0

CPU user: .1.3.6.1.4.1.2021.11.9.0
CPU system: .1.3.6.1.4.1.2021.11.10.0

HDD total space: .1.3.6.1.4.1.6574.3.1.1.5.0
HDD total free space: .1.3.6.1.4.1.6574.3.1.1.4.0

with some math you can calculate different kind of percentages and availabilities:

##########################################

TEMPLATE SYNOLOGY TOTAL HDD

##########################################

  • platform: template
    sensors:
    synology_hdd_totaal:
    friendly_name: “Synology HDD Totaal”
    unit_of_measurement: ‘GB’
    value_template: ‘{{(states(“sensor.synology_hdd_total”) | float /1024/1024/1024) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY FREE SPACE

##########################################

  • platform: template
    sensors:
    synology_hdd_vrije_ruimte:
    friendly_name: “Synology HDD Vrije Ruimte”
    unit_of_measurement: ‘GB’
    value_template: ‘{{(states(“sensor.synology_hdd_free”) | float /1024/1024/1024) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY NAS MEM USAGE

##########################################

  • platform: template
    sensors:
    synology_geheugen_gebruik:
    friendly_name: “Synology Geheugen gebruik”
    unit_of_measurement: ‘%’
    value_template: ‘{{(100-(states.sensor.synology_mem_buffer.state | float + states.sensor.synology_mem_chache.state | float + states.sensor.synology_mem_beschikbaar.state | float) *100/1024000) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY NAS CPU USAGE

##########################################

  • platform: template
    sensors:
    synology_cpu_gebruik:
    friendly_name: “Synology CPU gebruik”
    unit_of_measurement: ‘%’
    value_template: ‘{{(states.sensor.synology_cpu_system.state | float + states.sensor.synology_cpu_user.state | float) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY NAS DISK FREE

##########################################

  • platform: template
    sensors:
    synology_hdd_percentage_vrij:
    friendly_name: “Synology HDD Percentage Vrij”
    unit_of_measurement: ‘%’
    value_template: ‘{{ (states.sensor.synology_hdd_free.state | float / states.sensor.synology_hdd_total.state | float *100) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY NAS DISK USAGE

##########################################

  • platform: template
    sensors:
    synology_hdd_gebruik:
    friendly_name: “Synology HDD Gebruik”
    unit_of_measurement: ‘GB’
    value_template: ‘{{ (states.sensor.synology_hdd_totaal.state | float - states.sensor.synology_hdd_vrije_ruimte.state | float) | round(0) }}’

##########################################

TEMPLATE SYNOLOGY UPDATE AVAILABLE

##########################################

  • platform: template
    sensors:
    synology_dsm_update_status:
    friendly_name: “Synology DSM Update Status”
    value_template: >-
    {% if states.sensor.synology_dsm_update.state == ‘1’ %}
    Update Beschikbaar
    {% else %}
    Geen updates
    {% endif %}
    icon_template: >-
    {% if states.sensor.synology_dsm_update.state == ‘1’ %}
    mdi:autorenew
    {% else %}
    mdi:thumb-up-outline
    {% endif %}