doubts with telegram

Marcelo Rangel5 years ago

Olha eu vou precisar de sair agora para resolver umas coisas vou te passar meu e-mail qualquer coisa você me manda direto para o e-mail [REMOVED]

Jose B5 years ago

acabei de testar com "-" e mesmo assim não funcionou. mesmas mensagens de erro no traccar.log

Macan5 years ago

Jose did you restart traccar server when you made the change?

Jose B5 years ago

Always

Jose B5 years ago

Thank tou Marcelo for offline supporr. Now Works fine

Kevon Smith4 years ago

Marcelo, can you say what is placed
for [YOUR ACCOUNT SID]
and [YOUR AUTH TOKEN] ?

gmlmaino4 years ago

que sentido tiene solucionar las cosas fuera de linea, y el que siguió todo el hilo se queda sin la respuesta.

Cristian4 years ago

Comparto solo por si alguien llega a este hilo

al configurar la guía de este enlace https://1drv.ms/b/s!AkR5kHuRkUnJgecvZh6TWWQHiQLAXg ó al configurar la opción que aquí se describe vale decir esto:

    <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
    <entry key='sms.http.url'>https://api.telegram.org/bot[Aqui va tu HTTP API de Telegram]/sendMessage?</entry>
    <entry key='sms.http.user'>[YOUR ACCOUNT SID]</entry>  -- No necesitas cambiar nada aquí dejar así 
    <entry key='sms.http.password'>[YOUR AUTH TOKEN]</entry>  -- No necesitas cambiar nada aquí dejar así
    <entry key='sms.http.template'>
        chat_id={phone}&amp;text={message}
    </entry>

El resultado es el mismo, recibirás un mensaje en tu APP Telegram con la notificación, la única diferencia es que para el primer caso necesitas configurar la notificación de tipo notificatorTelegram, o sea así https://ibb.co/ws3SrVB
y para el segundo caso de tipo sms, o sea así https://ibb.co/80TTwcK

Para que funcione con la opción de sms deben en las propiedades de la cuenta colocar en el numero de teléfono el ChatId de Telegram que se obtiene siguiendo los pasos de la primera guía. https://ibb.co/2n74YY1

Si alguien configura las notificaciones de Telegram descritas y tiene traccar version 4.5 en adelante use esta linea en vez de la que aparece en el tutorial

 <entry key='notificator.telegram.chatId'>[chatID Telegram]</entry>

de lo contrario da error.

Espero les sirva. A mi me funcionaron ambos casos.

Saludos

Rafael Amores3 years ago

Hi, where obtain [YOUR ACCOUNT SID] and [YOUR AUTH TOKEN] ?

Castillo3 years ago

@Rafael Amores

In your account: https://www.traccar.org/my-account/

Richard Acosta3 years ago

Great, awesome, and...
¿how does the server know WHERE TO send the SMS/Telegram message? There's no destination whatsoever.
¿Como sabe el servidor A QUIEN enviar el mensaje/SMS? No hay destinatario en ningún lado.

¿Se reciben las notificaciones en el chat que ya empezamos con el BOT de parte suya? Si es así no hay manera entonces de enviarle los mensajes al usuario que tiene el GPS en su vehículo....
Are notifications received on the same chat we already started with the bot, from him? If so, then there's no way to send messages directly to end users who own the vehicle with GPS installed.

No tiene sentido habilitar esta función entonces.
To enable this has no sense at all then.

Cristian3 years ago

Richard Acosta se explica que en la cuenta del usuario donde va el número de teléfono se debe ingresar el chatID de telegram del usuario, solo así el bot envía el mensaje al usuario específico ver imagen https://ibb.co/2n74YY1. Eso se hizo hace un año no se si hay cambios para las nuevas versiones de Traccar, pero yo lo sigo usando y me funciona.

Richard Acosta explains that in the user's account where the phone number goes you must enter the user's telegram chatID, only then the bot sends the message to the specific user see image https://ibb.co/2n74YY1. That was done a year ago, I don't know if there are changes for the new versions of Traccar, but I still use it and it works for me.

LeMrTee3 years ago

Are we able to receive alarm notifications like geofence entry and exit from the telegram integration?? Doesn't look like it works for me even after setting a geofence and adding it to my list of notifications i want to receive.

Castillo3 years ago

@Cristian
@Richard Acosta

It work with an easiest and clean way:

Use this tutorial to get the chatID of your new chat in Telegram:
https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/32572159#32572159

Then, setup notifications in the config file: sudo nano /opt/traccar/conf/traccar.xml

And add or edit the following

<entry key='notificator.types'>web,mail,telegram</entry>
<entry key='notificator.telegram.key'>YOUR_BOT_API_KEY</entry>
<entry key='notificator.telegram.chatId'>CHAT_ID</entry>

With this Traccar will send notification throught web, mail and telegram

Cristian3 years ago

LeMrTee, If it works. Did you assign the geofence to the vehicle?