Telegram Notification for multiple user account setup confusion

Rodney Yeo11 days ago

I want to create Telegram Notification for multiple user account in TracCar Server as in per user account at user attributes "Telegram Chat ID" right?

Normally we need to create a Bot Token Key for that user "A" and get a Group Chat ID for that user "A".

Since I need to do the same for user "B". But I cannot be using Bot Token Key for user "A".

How it is possible to create Telegram Notification for multiple users but we could only use one Bot Token Key in TracCar.xml ?

Rodney Yeo11 days ago

Suggestion ... At TracCar Server, Settings, Accounts, Users, Edit, Attributes, Telegram Chat ID now exist but how about adding an option for "Telegram Key" too? Instead of Traccar.xml in the Conf folder? Intended for per user account option basis for ease of multiple user management.

Rodney Yeo11 days ago

I notice Email Notification option for per users is working great even on demo.traccar.org shared user server space! Why not for Telegram too by making available of "Users, Attributes" option, make "Telegram Key" option available in next Traccar official software release?

Anton Tananaev10 days ago

Why do you need a bot per user?

Rodney Yeo10 days ago

Sorry I am ignorant as how to setup Telegram Notification for per user account basis using Attributes options.

I followed the tutorial from Traccar Notification as follows ...

https://www.traccar.org/notifications/#telegram
and
https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/38388851#38388851

I need to create Telegram associated number of groups for per user basis to receive notifications in their respective members added in the group.

So how can I achieve this task? From my understanding in Telegram we need one bot to one group for notification.

Or actually there is another approach from your reply which is, You mean I just need one bot but can create multiple Telegram Chat ID to be associated to multiple Telegram Chat Groups? Please give me a hint how to approach this task? Thanks.

Rodney Yeo10 days ago

Yup! It works!

Telegram Notification only need one "Telegram Key" in (conf/taccar.xml) for one Bot and can add many "Telegram Chat ID" in (Users/Attributes) to many Telegram Groups associated to per user Traccar user account which links to per user tracker devices basis.

Thanks alot! You made me think out of the box and the solutions works!

The configuration is at multiple Telegram group we created and add the one bot to the groups!

Rodney Yeo8 days ago

Just to share my successful approach on using multiple Telegram Chat ID for multiple Devices in association of user devices but using only one Admin user profile in TracCar server.

The trick is to make a duplicate clone image of the Primary server and change the Telegram Chat ID for Device A Telegram Notification Group A then configured the desired Device A notification options. Duplicate the above steps for per device to per group requirements for the next clone image.

I end up creating 3 units of Raspberry Pi for 3 of my Tracker Device to Notify to specific 3 Groups of Telegram users.

Problem resolved finally! Another bugs I notice is that once you register a unique Device Identifier into TracCar Server. And if you delete that device ID accidently from the server. You can never add back the same device id again.

Resulting with a logic error that a Duplicate Device Exist even it was registered earlier and deleted but can never add it back again.

I have tested this findings on demo.traccar.org and my private TracCar server with same error produced!

Hope this bugs can be fixed in the future software release.

Thanks for your attention dear creator of TracCar. @nton.

Rodney Yeo8 days ago

Before I forget to achieve the multi server tiering Telegram notification triggering function.

I had to use "Server.Forward" features in traccar.xml. To pass the traffic data in real time from Server A to Srrver B then to Server C respectively.

Rodney Yeo12 hours ago

This thread is now closed since task resolved already ...

https://www.traccar.org/forums/topic/telegram-notification-chat-id-per-device/