Hi @diamuxinchange this:I am now trying to run this same script on the latest firmware (7.10.2) and it is not running at all.
Where I have problem?by:Code::local voltage [/system health get voltage]
Code::local voltage [/system health get [find name=voltage] value]
I am also using this same script but I dont use Telegram. I only have a low voltage or high voltage email sent to me if the voltages are above or below the limits set.
I have made the above change but every time the script runs it just emails me with the current board voltage.
I would really appreciate it if you could help me with my script?
This is my current script:
#set lowvoltalarm to desired alarm voltage in tenths of a volt. 125 = 12.5v
:global lowvoltalarm 225
:global highvoltalarm 300
:global highvolt
:global lowvolt
:global starttime
:global hivolttime
:global lovolttime
:global vh
:local thisbox [/system identity get name]
:global voltage [/system health get voltage]
:local thistime [/system clock get time]
:local thisdate [/system clock get date]
:local thishour [:pick $thistime 0 2]
:local emessage ($thisbox . " voltage is: " . [:pick $voltage 0 2] . "." . [:pick $voltage 2 3])
:if ([:len $lowvolt] < 1) do={:set lowvolt 999; :set highvolt 0}
# set your email address in the next line
:if ($voltage <= $lowvoltalarm) do={/tool e-mail send to="email@example.com" subject="$thisbox Voltage Statistics" body=$emessage}
:if ($voltage <= $lowvoltalarm) do={/tool e-mail send to="email@example.com" subject="$thisbox Voltage Statistics" body=$emessage}
:if ($voltage >= $highvoltalarm) do={/tool e-mail send to="email@example.com" subject="$thisbox Voltage Statistics" body=$emessage}
:if ($voltage >= $highvoltalarm) do={/tool e-mail send to="email@example.com" subject="$thisbox Voltage Statistics" body=$emessage}
:if ($voltage > $highvolt) do={:set highvolt $voltage; :set hivolttime ($thistime . " " . $thisdate)}
:if ($voltage < $lowvolt) do={:set lowvolt $voltage; :set lovolttime ($thistime . " " . $thisdate)}
:if ([:len $vh] > 0) do={:set vh ([:toarray $voltage] + $vh)} else={:set vh [:toarray $voltage]}
:if ([:len $starttime] < 1) do={:set starttime ($thistime . " " . $thisdate)}
Statistics: Posted by Trezona — Thu Jun 13, 2024 5:17 pm