doubts with telegram

PawBud2 years ago

I removed this line from the codebase, and added the following lines to traccar.xml

    <entry key='notificator.types'>telegram</entry>
    <entry key='notificator.telegram.key'>BOT_KEY</entry>
    <entry key='notificator.telegram.chatId'>CHAT_ID</entry>
    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>

I got the following result as shown here. The accordion does not show any options whatsoever. Not sure how to fix this tbh.

Anton Tananaev2 years ago

The link is broken.

PawBud2 years ago

Huh, that was a problem from Image DB, this is the working link

Anton Tananaev2 years ago

What if you change that line in the default config? I suspect you're simply changing the wrong configuration file.

PawBud2 years ago

traccar.xml says

<!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->

So I believe I am editing the correct one

Anton Tananaev2 years ago

But which file does your Traccar instance use?

PawBud2 years ago

Ahh, I changed the same line aforementioned to

    <entry key='notificator.types'>web,mail,command,telegram</entry>

as suggested by Anton, and got the result I was looking for as shown here, thanks

PawBud2 years ago

I did not change anything and installed the master branch from GitHub and started editing traccar.xml. Also, I am unsure where I can check which config file my local traccar instance build uses.

Anton Tananaev2 years ago

How are you running your Traccar? What command are you using?

Pawbud alt2 years ago

Ah, I got a "Too Many Requests error" so I made an alt for now. Anyways, here it is:- So, I am running Traccar on MacOS 13.4 using IntelliJ's Idea as recommended in the docs. I followed this tutorial. The exact build config can be seen here. Moreover, to use the Traccar's Mordern UI I am simply using npm start inside the modern directory which is a sub-directory of traccar-web. As for the branch, it's the latest commit as of writing this message, whose commit ID is:- f1de2533c3527aefc6f9eb15277128bb8d8ec3cb

Anton Tananaev2 years ago

On your screenshot I can see that you're using debug.xml configuration file, not traccar.xml. Am I missing something?

Pawbud alt2 years ago

Ahh, so that's what it is, I am supposed to put traccar.xml instead of debug.xml.

Thanks a lot, lemme try and update u.

Pawbud alt2 years ago

Update: That was it, here is the exact build configuration I used. As u can see, the Input file is $FileDir$/traccar.xml since $FileDir$ points to my setup dir, inside which is the traccar.xml file, which I wanna edit and use as the config file. Sorry for the inconvenience Anton, and thanks a lot for your help.