Use one communication line for each Telegram bot. Each line holds its own bot configuration and operates independently. The driver does not start merely because it is installed or configured globally; it starts when a communication line uses it.
Configure Multiple Telegram Bots
| Requirement | Configuration decision |
|---|---|
| Multiple bots on one server | Create a separate communication line for every bot. |
| Different bot tokens | Assign the corresponding token within each bot's line configuration. |
| Independent operation | Troubleshoot and review logs per communication line. |
Do not combine multiple bot tokens on one line. After changing the configuration, transfer it and restart the applicable services, then verify that every Telegram line runs.
Resolve a Missing CompCode.txt File
A missing [Comm]\[Log]\CompCode.txt file can mean the Telegram driver has not started. A plugin begins operating after it is added to the configuration, but a driver begins operating only when a communication line uses it. Different applications generate different registration codes, so a code produced by another plugin does not establish the Telegram driver's code.
- Configure the Telegram driver on a communication line.
- Add the Telegram statistics log to that line so the line starts and produces diagnostic output.
- Transfer the configuration and restart the applicable services.
- Inspect the Server and Telegram line logs, then check whether
CompCode.txtwas created.
Diagnose Duplicate Telegram Messages
If the automation log records one Notif command but recipients receive two messages, inspect the Communicator line log. The captured case showed three send attempts, each reporting that the configured HttpClient.Timeout of elapsed, while two messages still arrived. This supports a retry-related duplicate: Telegram may accept a request even when the client times out before receiving confirmation.
Increase the configured request timeout and repeat a controlled test. Confirm that one Notif command produces one send attempt and one received message. The evidence does not establish a universally correct timeout value, so select it from measured network response times and verify the result in the line log.
Correct a Stale Subscription Name
The message Subscription named Notifications is absent indicates that the command references a subscription name that is unavailable in the target Telegram device configuration. This differs from a transport failure: manually formed commands can still work on each line while an automatically generated command uses an obsolete name.
- Identify the target device ID in the Communicator line log.
- Compare the subscription name referenced by the automatic command with the subscriptions configured for that device.
- Update the command or subscription configuration so the names match, then transfer the configuration and restart the applicable services.
- Trigger one test notification and verify the device ID, subscription name, send-attempt count, and delivery count.
FAQ
How do I run multiple Telegram bots on one Rapid SCADA server?
Create a separate communication line for each bot and assign its corresponding token. The lines operate independently.
Why is Rapid SCADA CompCode.txt missing for the Telegram driver?
The driver may not have started. Use it on a communication line, add the Telegram statistics log to that line, transfer the configuration, restart the applicable services, and inspect the Server and line logs.
Why does one Notif command send two Telegram messages?
Check the Communicator line log for retries. In the captured case, a 0.1-second HTTP timeout caused repeated send attempts even though Telegram delivered messages; increase the timeout and verify one attempt and one delivery.