JuanFi Hotspot: User Login & Logout Script with Telegram Notification
Greetings to the Network & Hotspot Community!
For ISP operators and JuanFi Pisowifi owners using MikroTik RouterOS, monitoring user logins, sales, and active sessions in real-time is vital for smooth daily operations.
In this post, we are sharing an updated and optimized script for **JuanFi Hotspot User Login and Logout tracking**, complete with automated **Telegram Bot Integration**. This script generates real-time alerts directly to your Telegram group or private chat whenever a voucher or user logs in or extends their session.
🌟 Key Features & Improvements
- Real-Time Sales Alerts: Instantly sends a detailed notification to Telegram upon successful user login or time insertion.
- Dual RouterOS Support: Includes dedicated scripts tailored for both **RouterOS v6** and **RouterOS v7**.
- Compatibility: Tested and fully compatible with **ALL MikroTik Router models** (hAP Lite, hEX, hEX S, RB3011, RB4011, CCR series, etc.).
- Sales Tracking: Automatically updates and calculates daily (`todayincome`) and monthly (`monthlyincome`) revenue totals.
- Session & File Management: Generates and cleans up system scheduler entries and MAC data tracking files seamlessly.
⚙️ Configuration Notes (Important)
1. Telegram Setup:
Set `:local isTelegram 1;` to enable Telegram alerts. Replace `iTBotToken` with your Telegram Bot Token and `iTGrChatID` with your Chat or Group ID.
2. Hotspot Directory (`HSFilePath`):
Depending on your MikroTik hardware model, make sure to set the correct folder path for `:local HSFilePath "hotspot";`:
* For hAP Lite / models with main storage:* Use "hotspot"
* For hEX, hEX S, or models with flash directory:* Use "flash/hotspot"
📜 Script for MikroTik RouterOS v7
🔒 Hidden content — react ❤️ Love to this post to unlock it.
📜 Script for MikroTik RouterOS v6
🔒 Hidden content — react ❤️ Love to this post to unlock it.
Community Feedback & Support
Feel free to test the script on your setup and leave your thoughts, questions, or updates in the thread below!
Feel free to test the script on your setup and leave your thoughts, questions, or updates in the thread below!
🔒 Reacting to unlock this content is limited to selected member ranks and roles with bypass permission.
