Community discussions

MikroTik App
 
adolfossl
just joined
Topic Author
Posts: 10
Joined: Mon Feb 05, 2018 11:53 am

Error netwatch runinig script

Sun Dec 12, 2021 9:50 am

Hello everyone and sorry for my english.

I have a raspberry pi powered from the usb port of mikrotik RB951G-2HnD. Sometimes raspberry pi not run correctly and network is down. I have a script inside netwatch tool on mikrotik.

/tool netwatch
add down-script="if (([/system clock get time] > \"06:30:00\") && ([/system clock get time] < \"22:30:00\")) do={[/system routerboard usb power-reset duration=5]}\r\
\n" host=192.168.88.22

Netwach checks the raspberry's ip, if down launch this script (work in console perfectly):
if (([/system clock get time] > "06:30:00") && ([/system clock get time] < "22:30:00")) do={[/system routerboard usb power-reset duration=5]}
The script must check between 6:30 to 22:30 that raspberry is working, if not, reset usb power on mikrotik
Every morning i have to disable an re enable netwatch, not work automatically

Can you help me? Thank you

Who is online

Users browsing this forum: Bing [Bot], VinceKalloe and 88 guests