Receive Sms Notification from Telegram When Mikrotik Wifi Signal Level Is Distorted
Follow the signal levels in the Mikrotik AP to which our customers are connected.
in such cases, we can check the signal level and send information SMS to us via telegram.
For this process, we can define the following code as a 3-5 minute task to the scheduler.
You can reach our article about creating telebotID
and TeleChatID
from the link below.
http://techsoftcenter.com/how-to-create-a-telegram-bot-id-chat-id/ for telebotID and TeleChatID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | :local TELEBOTID xxxxxx :local TELECHATID xxxxxx :local level -65; :local sub1 ([/system identity get name]); :local signal; :local radio; :foreach i in=[ /int wir reg find] do={ :set signal [int wir reg get $i signal-strength]; :set signal [ :pick $signal 0 [:find $signal "dBm"]] :set radio [/interface wireless registration-table get $i radio-name] :if ($signal < $seviye) do={ /tool fetch url="https://api.telegram.org/$TELEBOTID/sendMessage\?chat_id=$TELECHATID&text=$sub1 $ radio subscriber signal is broken. Signal value $ signal " } } |
Keeping the name of your Mikrotik device in / system identity section will keep the device’s name information coming to you correctly.
I hope it has been a useful article.