Skip to content

thanhle01071995/Teltonika-Config-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”§ Teltonika Config Tool

A professional configuration and management tool for Teltonika industrial routers and gateways (TRB140, RUT955, etc.). This tool simplifies device configuration, backup/restore operations, and remote monitoring via SSH connection.

Developed by Gia Huy Engineering - BMS & Automation Solutions

Version Python Platform License

✨ Why this tool?

  • πŸš€ All-in-one: Backup, restore, configure, and monitor in a single app
  • πŸ“Š Excel Export: Pull device configuration to Excel with human-readable values
  • πŸ”„ Batch Config: Push configuration changes from Excel back to device
  • πŸ“± Mobile/SMS Control: Check signal, SIM status, send test SMS
  • πŸ’» SSH Terminal: Execute commands with preset categories

🧭 Quick Navigation

πŸ‘€ For USERS:

I want to... Go to
Install and run the app πŸš€ Installation
See what the app can do ✨ Features
Learn how to use it πŸ“– Usage Guide
Check logs for debugging πŸ“ Logging

πŸ’» For DEVELOPERS new to the project:

I want to... See
Understand project This README (reading now)
Understand code architecture docs/ARCHITECTURE.md
Add new features πŸ”§ Development
Understand Value Mapping docs/VALUE_MAPPING.md
Understand UCI/Modbus docs/UCI_MODBUS_CLIENT.md
UI/UX guidelines docs/UI_DESIGN.md
View changelog CHANGELOG.md
View roadmap ROADMAP.md

πŸ“š Recommended reading flow for new developers:

1. README.md             β†’  Project overview
2. docs/ARCHITECTURE.md  β†’  Code structure & flow
3. Run: python main.py   β†’  Experience the app
4. docs/VALUE_MAPPING.md β†’  Mapping mechanism
5. Read: src/app.py      β†’  Entry point of logic

✨ Features

πŸ”— Connection

  • βœ… SSH connection to device
  • βœ… Cancel pending connection
  • βœ… Auto-reconnect after reboot
  • βœ… Ping Test
  • βœ… Open WebUI in browser

πŸ’Ύ Backup & Restore

  • βœ… Full configuration backup (tar.gz)
  • βœ… Restore from backup file
  • βœ… Reboot device
  • βœ… Factory Reset

πŸ“± Mobile & SMS

  • βœ… Check signal strength (RSRP, RSSI, SINR)
  • βœ… Check SIM status (ICCID, IMSI, Operator)
  • βœ… Restart modem
  • βœ… Toggle mobile connection
  • βœ… Send test SMS

πŸ“‹ Configuration

  • βœ… Pull configuration to TXT file
  • βœ… Pull configuration to Excel (with Value Mapping)
  • βœ… Push configuration from file to device
  • βœ… Compare configuration (file vs device)
  • βœ… Special handling for Modbus Client

πŸ“ Project Structure

TRB140_Config/
β”œβ”€β”€ main.py                  # Entry point
β”œβ”€β”€ config.json              # Value mappings
β”œβ”€β”€ requirements.txt         # Dependencies
β”œβ”€β”€ Export/                  # Output directory
β”œβ”€β”€ logs/                    # Log files
β”‚   β”œβ”€β”€ session_activity.log
β”‚   └── debug_errors.log
└── src/                     # Source code
    β”œβ”€β”€ app.py               # Main Application (GUI)
    β”œβ”€β”€ utils.py             # Logging utilities
    β”œβ”€β”€ services/
    β”‚   β”œβ”€β”€ ssh_manager.py   # SSH connection, AutoReconnect
    β”‚   β”œβ”€β”€ value_mapper.py  # Display ↔ Raw value conversion
    β”‚   └── config_manager.py # Backup, Restore, Pull, Push, Compare
    β”œβ”€β”€ parsers/
    β”‚   └── uci_parser.py    # UCI format parser
    └── ui/
        └── theme.py         # Colors, Fonts, Sizes

πŸš€ Installation

Requirements

  • Python 3.10+
  • Windows 10/11

Install dependencies

pip install -r requirements.txt

Run the application

python main.py

πŸ“– Usage Guide

1. Connect to device

  1. Enter IP Address (default: 192.168.1.205)
  2. Enter Username (default: root)
  3. Enter Password
  4. Click πŸ”— Connect

2. Backup configuration

  1. Connect to device
  2. Click πŸ’Ύ Backup
  3. Backup file will be saved to Export/ directory

3. Pull configuration

  • Pull to TXT: Export all config files to a single text file
  • Pull to Excel: Export config with table format, includes Value Mapping for Modbus

4. Push configuration

  1. Connect to device
  2. Select config file (.txt or .xlsx)
  3. Click πŸ“€ Push
  4. Confirm the operation

5. Compare configuration

  1. Connect to device
  2. Click πŸ” Compare
  3. Select config file to compare
  4. View the generated diff report

βš™οΈ Value Mapping Configuration

The config.json file contains mappings to convert raw values to user-friendly text:

{
    "value_mappings": {
        "modbus_client_alarm_enable": {
            "description": "Alarm On/Off status",
            "mappings": [
                { "raw": "0", "display": "Off" },
                { "raw": "1", "display": "On" }
            ]
        }
    }
}

πŸ“ Logging

  • Activity Log: logs/session_activity.log - Records activities
  • Error Log: logs/debug_errors.log - Records errors

πŸ”§ Development

Adding new features

  1. Create method in src/app.py for UI
  2. Add business logic to src/services/
  3. Update UI in _create_*_section()

Adding new Value Mapping

  1. Open config.json
  2. Add mapping following the format above
  3. Restart the application

πŸ“‹ Common UCI Commands

# View configuration
uci show <config>

# Set value
uci set <config>.<section>.<option>=<value>

# Commit changes
uci commit <config>

# View network status
cat /tmp/sysinfo/model
gsmctl -q  # Signal strength
gsmctl -n  # ICCID
gsmctl -x  # IMSI

πŸ“š Documentation

πŸ“‘ Project Documents

File Description
CHANGELOG.md πŸ“œ Development history & changes
ROADMAP.md πŸ—ΊοΈ Ideas & feature plans

πŸ“– Technical Documentation (in docs/)

File Description
docs/ARCHITECTURE.md πŸ—οΈ System architecture & code structure
docs/VALUE_MAPPING.md πŸ“‹ Detailed Value Mapping guide
docs/UCI_MODBUS_CLIENT.md πŸ”§ UCI fields for Modbus Client
docs/UI_DESIGN.md 🎨 UI/UX design guidelines
docs/REFERENCES.md πŸ”— Reference links & common commands

πŸ”— Official Teltonika Documentation

Document Link
TRB140 Wiki https://wiki.teltonika-networks.com/view/TRB140
Shell Commands https://wiki.teltonika-networks.com/view/Shell_Commands
UCI Commands https://wiki.teltonika-networks.com/view/UCI_command_usage
Gsmctl Commands https://wiki.teltonika-networks.com/view/Gsmctl_commands
Modbus Client https://wiki.teltonika-networks.com/view/Modbus_TCP_Client_configuration_example

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is distributed under the MIT License.

πŸ‘₯ Author

Mr.ThanhRΓ²m

  • Version: 1.0.0-beta
  • Last updated: 13/12/2024

Made with ❀️ for Teltonika device management

About

A configuration and management tool for Teltonika devices (TRB140, RUT955, etc.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages