Community discussions

MikroTik App
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2509
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

SOLVED Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 7:00 am

Hello, I would like a script that turns on the PoE-out if the CPU temperature of the router gets too high. Temperature adjustable.
This by script in schedullar.
Does anyone have an idea?
Hoping that someone can help
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3300
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 5:15 pm

This should get you startet.
I do not have PoE interface, so could not test that.
:if ([/system health get temperature] >= 40) do={
/interface ethernet set ether1 poe-out=forced-on
}
Save this as a script and run it as a schedule job.

To add from cli (10 minute interval and 40 degree as limit)
/system script
add dont-require-permissions=no name=Temperatur-PoE owner=admin policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
    ":if ([/system health get temperature] >= 40) do={\r\
    \n:put \"yes\"\r\
    \n} "

/system scheduler
add interval=10m name=PoE-test on-event=Temperatur-PoE policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=mar/22/2019 start-time=15:30:00
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2509
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 9:52 pm

Hello Jotne, it works like a charm, you are great with scripts.

Thank you verry verry match
 
ksthree
just joined
Posts: 22
Joined: Thu Jul 18, 2019 10:51 pm
Location: Durban, South Africa

Re: SOLVED Switch on PoE-out when the CPU temperature is too high

Wed Nov 20, 2019 7:46 pm

I would add a second script to check if cpu temp is say below 30 to turn off POE.

I take it the POE is powering a FAN?
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: SOLVED Switch on PoE-out when the CPU temperature is too high

Wed Nov 20, 2019 8:19 pm

That was simple...

Who is online

Users browsing this forum: alixviral and 20 guests