Telegram douplicate Notifications v5.3

Abazer Mahgoub2 years ago

welcome everybody
Firstly: I am so happy to participate in troubleshooting this wonderful application and all thanks to its developers.
Today's problem is an old problem that is renewed in v5.3, this time in Telegram notifications only.
If you have an X user, you will get a duplicate X notification.
Note: All users are connected to the same devices.

Anton Tananaev2 years ago

Please provide steps to reproduce the issue starting from a clean server.

Damian2 years ago

I have this problem too:

https://paste.pics/I3E74

Config file: https://pastebin.com/sSNY0r3Z

Latest docker version. In 5.2 i have this problem too.

Anton Tananaev2 years ago

Waiting for the steps to reproduce from a clean server.

Abazer Mahgoub2 years ago

1.  I created a new droplet in digitalocean. 
2.  I installed the latest version exactly as in the following link and with the same information:
https://www.traccar.org/install-digitalocean/
 
3.  I added a new email for the Admin user and then created three new users with Administrator premitions. 
4.  I copied the attached traccar config file to the conf directory. 
5. I restarted the traccar service. 
6.  I added two new devices. 
7.  I added phone number and telegram chat id for the main user. 
8.  I created a new alert (status connected) and i selected all channels. 
9.  I made all users connected to the same devices and the same alert, and also made the devices connected to the alert. 
10.  I turned on the devices and only got douplicated notifications on Telegram

Abazer Mahgoub2 years ago

config file:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

 
    <entry key="config.default">./conf/default.xml</entry>
    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost/traccar?serverTimezone=UTC&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>root</entry>
    <entry key='database.password'>root</entry>
    
    <entry key='web.port'>8082</entry>
    <entry key='notificator.types'>web,mail,sms,traccar,telegram</entry>
    
    <entry key='notificator.traccar.key'>111111111</entry>
    
    <entry key='web.sanitize'>false</entry>
    
    <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
    
    <entry key='sms.http.url'>https://www.traccar.org/sms/</entry>
    <entry key='sms.http.authorization'>1111111</entry>
    <entry key='sms.http.template'>
    {
        "to": "{phone}",
        "message": "{message}"
    }
    </entry>
    
    <entry key='mail.smtp.port'>587</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    <entry key='mail.smtp.host'>smtp.gmail.com</entry>
    <entry key='mail.smtp.from'>myemail@gmail.com</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>myemail@gmail.com</entry>
    <entry key='mail.smtp.password'>11111</entry>
    
    <entry key='notificator.telegram.key'>1111111</entry>
    <entry key='notificator.telegram.chatId'>-111111</entry>
    
    
    <entry key='filter.skipAttributes.enable'>true</entry>
    <entry key='filter.skipAttributes'>ignition,alarm,status,result,event</entry>
    <entry key='event.motion.speedThreshold'>0.45</entry>
    <entry key='filter.distance'>1</entry>
    
    

</properties>
Abazer Mahgoub2 years ago

Sorry .. I found out that this problem is only in the account that created the bot in Telegram, the rest of the accounts do not have a duplicate notification

Anton Tananaev2 years ago

So, do other users have a single notification in different chats? So you're saying a notification is sent to 2 different chats?

Abazer Mahgoub2 years ago

yes. Now each user gets their own notification in different conversations but from the same bot. I deleted the chat id line from the config file then went to each user's telegram and added the bot to a group and got the chat id of each user with the bot and added it to the user's attributes (telegram chat id). The duplicate stopped and everything works fine

Damian2 years ago

Ok, my problem solved.

The problem of duplicate notifications was that "all devices" was checked in notifications and additionally checked the notification in the user profile.