How to control a solid state relay, using the ATC led on RB951-2N.
Purpose: to reboot other equipment remote.
Electrical diagram not included, if you need it you will figure it out ![]()
code:
Make disablet dummy bridge interface
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes
disabled=yes forward-delay=15s max-message-age=20s mtu=1500 name=Dummy
priority=0x8000 protocol-mode=none transmit-hold-count=6
Set system leds on interface Dummy
/system leds
set 0 disabled=no interface=Dummy leds=user-led type=interface-status
Make a script, important to set a delay, otherwise the ATC led will not com on after reboot !
/system script
add name=ACTon policy=
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api
source=":delay 10\r
\n/system leds enable numbers=0"
Make a schedule that runs at startup, to turn ATC on again
/system scheduler
add disabled=no interval=0s name=schedule1 on-event=ACTon policy=
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api
start-time=startup
code end:
The ATC led will turn on (solid) 10sec after reboot/start-up, and solid state relay will also turn on.
When you need to reboot the equipment attached to the solid state relay, just login to the RB951 using winbox.
Go to system / LEDs and do the trick by disable / enable the ACT led, give a few sec in-between ![]()
You can expand the functionality further by using more scripts and with the use of Netwatch.
Its even possible to control the scripts by SMS.
Have fun ![]()