Community discussions

MikroTik App
 
alewandowski
just joined
Topic Author
Posts: 8
Joined: Thu May 27, 2021 11:35 am

Script to poe shedule

Tue Aug 10, 2021 12:02 pm

Hi experts,
I am new to scripts need some help. Is it possible to do something like a sequential PoE activator? I mean, when I power up a device, I don't want all the PoE ports to go up at one time, I need port 1,2,3,4 in like 3-5 sec one after another. Device is mikrotik routerboard PoE lite. Thanks a lot
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Script to poe shedule

Tue Aug 10, 2021 12:06 pm

It is not possible, if the device is restarted, for any reason, with PoE were set on.

It is possible, if the device is restarted, for any reason, with PoE were set off.
 
alewandowski
just joined
Topic Author
Posts: 8
Joined: Thu May 27, 2021 11:35 am

Re: Script to poe shedule

Tue Aug 10, 2021 1:02 pm

Ye, I've reached to a point when I got the script on scheduler-startup
/interface ethernet poe set poe-out=off ether2
/interface ethernet poe set poe-out=off ether3
/interface ethernet poe set poe-out=off ether4
/interface ethernet poe set poe-out=off ether5
delay 4000ms
/interface ethernet poe set poe-out=auto-on ether2
delay 5000ms
/interface ethernet poe set poe-out=auto-on ether3
delay 5000ms
/interface ethernet poe set poe-out=auto-on ether4
delay 5000ms
/interface ethernet poe set poe-out=auto-on ether5
The problem now, it is working, but scripts run after 3 seconds... So i got PoE on the ports at start, then script set it off and restore after dalays... That's totally wrong
As I understand, somehow I need to get PoE off when the router loses power, because it has no startup-config or something. Is there any way to do it?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Script to poe shedule

Tue Aug 10, 2021 1:29 pm

It can be optimized as:
/interface ethernet poe
set [find] poe-out=off
:delay 4s; set ether2 poe-out=auto-on
:delay 5s; set ether3 poe-out=auto-on
:delay 6s; set ether4 poe-out=auto-on
:delay 7s; set ether5 poe-out=auto-on
But this not prevent the poe-on-all-on-start-when-rebooted

Read my post.
 
alewandowski
just joined
Topic Author
Posts: 8
Joined: Thu May 27, 2021 11:35 am

Re: Script to poe shedule

Tue Aug 10, 2021 2:13 pm

Yeah, You're right. I guess I need to find the solution, to somehow inform mikrotik he's going to be reboot soon, so he can turn the PoE off before it. Thanks a lot, you're the best!

Who is online

Users browsing this forum: No registered users and 35 guests