Telegram Bot v2.0.0

I am working on the Telegram Bot app, to make it ready for the new Homey and up2date on Homey SDK3.

There are some changes that might be ‘breaking’:

The Homey speech output functionality will be removed (thus, command ‘/say’ will no longer work)

There will be no longer a ‘shared’ bot (the @athomhomey_bot Telegram bot). The app will require you to set up your own custom bot, which was optional before.
People using the shared bot can already set up a custom bot in the current app to prevent breaking the app in your setup. Please do so, delete your connected users afterwards and re-register them.
This is a more secure way, everybody has their own Telegram Bot of which the credentials are saved on your Homey, which means nobody can abuse the bot.

The new version will be released in the coming days.

2 Likes

Hi Jordan, since the last update, the following code doen not work anymore.
What has changed for this to not work.
Great app by the way, use a lot for logging.

async function sendMessage(message) {
let appId = “org.telegram.api.bot”;
let telegram = await Homey.apps.getApp({ id: appId });
let settings = await Homey.apps.getAppSettings({ id: appId });
let chatId = settings.chat_ids[0].chat_id;
return await telegram.apiGet(“/send_message/”, { to: chatId, text: message });
}

sorry for the misspelled name Jorden.

i use this javascript code in homeyscript

Can you try with /send_message instead of /send_message/ (last slash removed)?

If that doesn’t work, I will dive into it.

tried it, does not work.