Community discussions

MikroTik App

Search found 10 matches

by error404
Thu Nov 30, 2023 3:29 pm
Forum: Scripting
Topic: Power outage notification
Replies: 3
Views: 1597

Re: Power outage notification

Hi Community, I would like to setup a notification by telegram bot. When there was a power outage to tell me: 1. Last time seen 2. for how long the unit was powered off For example: Last seen at [Date/time] and the router was off for $hours, $minutes. Actual [date/time]. Something like it, but the ...
by error404
Thu Nov 30, 2023 12:15 pm
Forum: Scripting
Topic: unset log and log-prefix in firewall
Replies: 2
Views: 2295

Re: unset log and log-prefix in firewall

Works on 7.12.1: ip firewall filter set [find comment="drop invalid"] log=no ip firewall filter set [find comment="drop invalid"] log-prefix="" Edit: Didn't read post carefully. "unset" doesn't list log or log-prefix, alas. https://i.ibb.co/XWSq4wk/2023-11-30-...
by error404
Tue Nov 28, 2023 11:06 am
Forum: RouterBOARD hardware
Topic: hap ac2 power consumption 2.4ghz or 5ghz ?
Replies: 1
Views: 1727

hap ac2 power consumption 2.4ghz or 5ghz ?

I live in area vulnerable to power outages, so I use UPS to power my hap ac2. My goal is to minimize Mikrotik's power consumption, even if I'll get 5 more minutes of battery life. When electricity switches off - hap ac2 enables wifi hotspot (tx-power=5), so I'll be able to get some wireless internet...
by error404
Fri Nov 24, 2023 1:48 pm
Forum: Scripting
Topic: Script to update RouterOS after X days of release
Replies: 51
Views: 8788

Re: Script to update RouterOS after X days of release

Here is Telegram output: I also use it for another Telegram informer scripts: Hi, could you please share these scripts? I guess it's better to create a post with all these scripts, but ok: TelegramElectricityNotification script - runs by scheduler every 4 hours (during blackout period every 1 hour,...
by error404
Fri Nov 24, 2023 12:16 pm
Forum: Scripting
Topic: Script to update RouterOS after X days of release
Replies: 51
Views: 8788

Re: Script to update RouterOS after X days of release

You can replace that with :global FuncStatus do={ /system clock :local deviceDate [get date] :local deviceTime [get time] /system resource :local deviceUptime [get uptime] :return "$deviceDate $deviceTime uptime: $deviceUptime" } :put [$FuncStatus] Thanks! Is there any link to read about ...
by error404
Fri Nov 24, 2023 11:39 am
Forum: Scripting
Topic: Script to update RouterOS after X days of release
Replies: 51
Views: 8788

Re: Script to update RouterOS after X days of release

Here is my implementation of update script P.S. If somebody want to see code of functions and telegram script used in this script - reply and I'll show you. Very useful your script, thanks. Could you share your $FuncStatus function? A tip: It is not necessary to end each line of code with " ; ...
by error404
Thu Nov 23, 2023 4:20 pm
Forum: Scripting
Topic: Script to update RouterOS after X days of release
Replies: 51
Views: 8788

Re: Script to update RouterOS after X days of release

Why all that? Suffice just :put [:tonum [:timestamp]] Oops, overengineered by my stupidity, thanks for simplification. Here is my implementation of update script P.S. If somebody want to see code of functions and telegram script used in this script - reply and I'll show you. :local changelog ([/too...
by error404
Tue Nov 14, 2023 6:19 pm
Forum: Scripting
Topic: I did it! Script to compute UNIX time!
Replies: 33
Views: 23927

Re: I did it! Script to compute UNIX time!

Since ROS 7.12 it is much easier to get a unix time.
:local currentTime [:pick [:tonsec [:timestamp]] 0 10];
:log info "$currentTime";

Output:
1699977978

It gives you GMT+0000 time, so you still need some manipulations to adjust it to your time zone.
Hope it would be helpful.
by error404
Tue Nov 14, 2023 6:10 pm
Forum: Scripting
Topic: Script to update RouterOS after X days of release
Replies: 51
Views: 8788

Re: Script to update RouterOS after X days of release

Since ROS 7.12 it is much easier to get a unix time. :local currentTime [:pick [:tonsec [:timestamp]] 0 10]; :local changelog ([/tool fetch "https://upgrade.mikrotik.com//routeros/NEWEST7.stable" as-value output=user] -> "data"); :local changelogTime [:pick $changelog ([:find $ch...
by error404
Sat Oct 21, 2023 2:35 pm
Forum: General
Topic: Dual WAN failover issues
Replies: 1
Views: 642

Dual WAN failover issues

We have 2 remote offices, running ROS 6, each site has 2 ISPs, with simple recursive failover config without routing marks, etc.. Both sites have same ISP as "ISP1", but on second site it is not used as a primary one. The issue we have: "ISP1" is connected to both sites via DHCP ...