I have now figured out how I can get the temperature from my HDD from my Synology DS212.
The values are in the directory
/run/synostorage/disks/sda/
/run/synostorage/disks/sdb/
there are a lot of informations but I only need the temperature and the smart value.
So my script is now:
#!/bin/sh
UPTIME1=$(uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print $4+0 }') # The '+0' makes the AWK column 4 defined as NUMBER
UPTIME2=$(uptime -p | cut -c 4- | tr -d ' ') #Get Uptime in stringformat
TEMP1=$(cat /run/synostorage/disks/sda/temperature) #Disk 1 temp to variabele
TEMP2=$(cat /run/synostorage/disks/sdb/temperature) #Disk 2 temp to variabele
SMART1=$(cat /run/synostorage/disks/sda/smart) #Disk 1 SMART value
SMART2=$(cat /run/synostorage/disks/sdb/smart) #Disk 2 SMART value
DISKUSAGE=$(df | tr -s ' ' $'\t' | grep volume1 | cut -f5)
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/Nas_Disk1_Temp?type=value&valueOrExpression=$TEMP1"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/Nas_Disk2_Temp?type=value&valueOrExpression=$TEMP2"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/SMART1?type=value&valueOrExpression=$SMART1"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/SMART2?type=value&valueOrExpression=$SMART2"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/Nas_Load_5Min?type=value&valueOrExpression=$UPTIME1"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/DISKUSAGE?type=value&valueOrExpression=$DISKUSAGE"
curl --user xxx.xxx -X PATCH "http://192.168.xxx/api/variables/UPTIME1?type=value&valueOrExpression=$UPTIME2"