Reenvía a Telegram las notificaciones que el núcleo de Convive emite (nuevos gastos, tareas asignadas, recordatorios, etc.).
Token y chat_id se gestionan desde la propia app, sin tocar archivos
de entorno. Cada hogar tiene su propio bot privado y cada usuario su
propio chat_id.
convive/module-telegram-notifications
(O desde la UI de Convive en /settings/modules → Marketplace → Instalar.)
- Abre un chat con @BotFather.
- Manda
/newboty sigue los pasos: nombre yusername(debe acabar enbot). - BotFather te dará un token del estilo
123456:AA…ZZ.
En la app: Telegram (menú lateral) → "Token del bot" → pegar y guardar. Solo el dueño del hogar puede tocarlo.
Pulsa "Verificar bot" para que Convive llame a la Bot API y te diga nombre + username del bot.
- Abre un chat con tu bot recién creado y manda
/start. El bot no responderá nada (es esperado: este módulo solo envía). - Para saber tu chat_id, escribe a @userinfobot.
Te devolverá tu
id(un número entero). - Vuelve a Convive: Telegram → Tu chat_id → pegar y guardar.
- Pulsa "Probar" — recibirás un mensaje del bot inmediatamente.
A partir de ese momento, cualquier notificación dirigida a ti llegará también por Telegram.
Todos bajo /api/m/telegram-notifications (y /api/telegram legacy).
| Método | Ruta | Descripción |
|---|---|---|
| GET | /settings |
Token del hogar y estado |
| PUT | /settings |
Guardar/actualizar token (owner) |
| DELETE | /settings |
Borrar el token (owner) |
| GET | /bot-info |
getMe para verificar el token |
| GET | /me |
Tu chat_id |
| PUT | /me |
Guardar/actualizar tu chat_id |
| DELETE | /me |
Desvincular tu Telegram |
| POST | /test |
Enviar un mensaje de prueba a tu chat |
telegram_settings(household_id PK, bot_token, enabled, updated_at)telegram_links(id, household_id, user_id, chat_id, enabled, …)
- El token vive en la BD de Convive del LXC. Nunca sale de tu LAN
salvo cuando se llama a
api.telegram.orgpara enviar un mensaje. - Si desinstalas el módulo, las tablas se conservan; reinstalarlo no pierde el token ni los chat_ids.
- Para borrar también los datos:
DROP TABLE telegram_settings; DROP TABLE telegram_links;.
TELEGRAM_API_BASE— sustituye el host por defecto. Útil para tests con un servidor mock (http://localhost:9000).
MIT