Alarm temperature to start the Fan on RB493G

Hi
Here is a script to start the fan on a RB493G. Hope it helps some one.

#Alarm temperature to start Fan on RB493G set se tempalarm to desired temp "tempalarm 48" = 48°C
:global tempalarm 48
:global hightemp
:global lowtemp
:global temperature [/system health get temperature]
:local message ("Temperature is $temperature °C")
:if ([:len $lowtemp] < 1) do={:set lowtemp 0; :set hightemp 45}
:log info message=" $message °C "
:if ($temperature > $tempalarm) do={/system health set fan-mode=auto}
:if ($temperature < $tempalarm) do={/system health set fan-mode=manual}

Bigfoot