Dal1980 Posted May 7, 2020 Posted May 7, 2020 (edited) hi guys, I've followed the right steps to setup Telegram but this has never worked for me for some reason. I can't get the test notice to work. Fyi: I've also looked in token and made sure that's the correct token too. I can't think/find out what else to try. Strangely when I try: https://api.telegram.org/bot8********:**********************************s/getMe in the browser, I get back {"ok":true,"result":{"id":8******,"is_bot":true,"first_name":"******Bot","username":"********Bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false}} The ID is different to that of the one I requested using the @my_id_bot within the app. I've also tried this one in my chatid file making sure it had a dash '-' at the start. I've also made sure all lines are clean with no spaces etc within these files/entries. I've even tried turning my keyboard up-side-down and spinning around on my chair 3 times... yep, at that stage now Edited May 10, 2020 by Dal1980 Context Quote
T0a Posted May 10, 2020 Posted May 10, 2020 (edited) Hi @Dal1980 take a look at the following three things: Get Channel-ID (This is how I got mine. This was the only way for me to get the correct channel ID) https://github.com/limetech/webgui/pull/512(i.e. change ID from user id to group id in file /boot/config/plugins/dynamix/telegram/chatid ; mine is -100XXXXXXXXX) My Unraid Telegram notification settings contain the telegram bot token though This is how I got Telegram notifications working. Edited May 10, 2020 by T0a 1 Quote
Dal1980 Posted May 10, 2020 Author Posted May 10, 2020 (edited) Thanks T0a Unfortunately the Get Channel ID method didn't work as it just revealed the @botname instead of an id. I've since tried to just delete this all and start again but now Telegram just seems all screwed up as I get "Username @my_bot_id not found" when I try to get the bot ID. Edited May 10, 2020 by Dal1980 Quote
Dal1980 Posted June 11, 2020 Author Posted June 11, 2020 I thought I'd bump this one last time before it end up in the boneyard (there was recent activity on another post so hoping someone has an answer *cough* 😛) Just asked BotFather to show my /mybots again and the response was Here is the token for bot unRAIDBOT @Z*******Bot: 1*******02:A******-******-*******************Q Just tried https://api.telegram.org/bot1*******02:A******-******-*******************Q/getUpdates and got back the following response: {"ok":true,"result":[]} Simply amazing stuff (obviously everything that is a * is blanked out data and not actual data) I'm not sure what I'm supposed to hide and what I can safely show so it may have been excessive to hide my bot chat name or whatever that @Z***... name was for my bot (been around in so many circles I'm confused with the whole thing to be honest) Quote
josch Posted July 25, 2020 Posted July 25, 2020 Hi @Dal1980, got this working just today. Here are the steps I took: 1.) create Telegram bot in the BotFather chat 2.) configure the relevant Bot access token via the Unraid web UI 3.) in the BotFather chat type: /mybots 4.) this will show a list of all your bots 5.) click on the button for the relevant bot (it says something like @botname) 6.) this should open the relevant chat in Telegram 7.) click the Test button in the Unraid UI 8.) set the "Available notifications" and "Notification entity" as required Hope this works for you as well. 1 Quote
tmor2 Posted January 13, 2021 Posted January 13, 2021 On 7/25/2020 at 11:51 AM, josch said: Hi @Dal1980, got this working just today. Here are the steps I took: 1.) create Telegram bot in the BotFather chat 2.) configure the relevant Bot access token via the Unraid web UI 3.) in the BotFather chat type: /mybots 4.) this will show a list of all your bots 5.) click on the button for the relevant bot (it says something like @botname) 6.) this should open the relevant chat in Telegram 7.) click the Test button in the Unraid UI 8.) set the "Available notifications" and "Notification entity" as required Hope this works for you as well. Ditto, with one note for step 7.) When you click "Test", you may not get the test notification in Telegram. However, when the server starts generating notifications such as "Warning" and "Alerts" (e.g. Warning, your UNRAID temperature is over 50C), then these are correctly pushed to Telegram! The point is, when "Test" does not work, leave the service "on" in UNRAID->settings->Notifications, and wait for an actual working notification by UNRAID, such as "Warning,...your array is getting hot" or similar. When I tried "Slack" (a far more complicated set up because of how Slack works), "test" message was immediately pushed to Slack. Same happened with "Pushover" service. I concluded that there must be something wrong with Telegram "Test" function, likely on UNRAID side (because real-life notifications DID get pushed immediately to Telegram, while "test" did not). Quote
LOOPMDS Posted March 17, 2021 Posted March 17, 2021 (edited) i think you are missing a step. my Guide: 1.) Telegram App: open chat "BotFather" 2.) Telegram App: write /newbot 3.) Telegram App: name Bot 4.) Telegram App: name username for the Bot 5.) Telegram App: now you should recieve a long text mssage in "BotFather" with access token. 6.) UNRAID: paste access token into Settings -> Notification -> Telegram -> access token field 7.) Telegram App: click on top link in chat that looks like t.me/<botname> 8.) Telegram App: click start in the new chat. and write /start to start the Bot. 9.) UNRAID: click the Test button in the Unraid UI 10.) UNRAID: set the "Available notifications" and "Notification entity" as required Edited March 17, 2021 by LOOPMDS few more changes needed to better clarify guide 4 1 Quote
prune Posted April 13, 2021 Posted April 13, 2021 (edited) Hi, Looks like there is a missing step and a missing field in the Unraid UI in order to fully configure the Telegram agent. I think we need to put the telegram chatid somewhere. When you read the /boot/config/plugins/dynamix/notifications/agents/Telegram.sh script, you see that it references a /boot/config/plugins/dynamix/telegram/chatid file containing the chatid number. But in the Unraid telegram agent configuration UI, there is no chatid field (I'm using 6.9.2) In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Then clicked the test button in the Telegram agent configuration page and it worked. How to retrieve chatid : How to obtain Telegram chat_id for a specific user? - Stack Overflow How to retrieve token : https://core.telegram.org/bots#generating-an-authorization-token Edited April 13, 2021 by prune added link to chatid and token retrieval howto 4 5 Quote
MadJoe74 Posted July 18, 2021 Posted July 18, 2021 (edited) i have these problems on different telegrammbots i use... my solution that works for me is: after entering the chat in the telegramm client, i sent theses commands: 1.) /start 2.) /get_messages_stats after these two commands i receive the testmessage from unraid Edited July 18, 2021 by MadJoe74 5 Quote
KingDing Posted May 27, 2022 Posted May 27, 2022 On 4/14/2021 at 12:20 AM, prune said: Hi, Looks like there is a missing step and a missing field in the Unraid UI in order to fully configure the Telegram agent. I think we need to put the telegram chatid somewhere. When you read the /boot/config/plugins/dynamix/notifications/agents/Telegram.sh script, you see that it references a /boot/config/plugins/dynamix/telegram/chatid file containing the chatid number. But in the Unraid telegram agent configuration UI, there is no chatid field (I'm using 6.9.2) In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Then clicked the test button in the Telegram agent configuration page and it worked. How to retrieve chatid : How to obtain Telegram chat_id for a specific user? - Stack Overflow How to retrieve token : https://core.telegram.org/bots#generating-an-authorization-token This is the one. Wish I had seen this before Quote In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Quote
Casadream_1 Posted June 2, 2022 Posted June 2, 2022 On 4/14/2021 at 1:20 AM, prune said: Hi, Looks like there is a missing step and a missing field in the Unraid UI in order to fully configure the Telegram agent. I think we need to put the telegram chatid somewhere. When you read the /boot/config/plugins/dynamix/notifications/agents/Telegram.sh script, you see that it references a /boot/config/plugins/dynamix/telegram/chatid file containing the chatid number. But in the Unraid telegram agent configuration UI, there is no chatid field (I'm using 6.9.2) In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Then clicked the test button in the Telegram agent configuration page and it worked. How to retrieve chatid : How to obtain Telegram chat_id for a specific user? - Stack Overflow How to retrieve token : https://core.telegram.org/bots#generating-an-authorization-token Many thanks for this ! How Lime fix the problem ? Quote
Georg2U Posted July 26, 2022 Posted July 26, 2022 Yes this is the solution I was looking for. Would be great if Lime add a field with chatid. Thx Quote
sergiup Posted August 4, 2022 Posted August 4, 2022 On 7/18/2021 at 9:41 AM, MadJoe74 said: i have these problems on different telegrammbots i use... my solution that works for me is: after entering the chat in the telegramm client, i sent theses commands: 1.) /start 2.) /get_messages_stats after these two commands i receive the testmessage from unraid Oh jeez, thank you for this! I was going to go through the whole chatid thing, but this worked absolutely fine. Thank you! 2 Quote
tmchow Posted November 19, 2022 Posted November 19, 2022 On 4/13/2021 at 4:20 PM, prune said: Hi, Looks like there is a missing step and a missing field in the Unraid UI in order to fully configure the Telegram agent. I think we need to put the telegram chatid somewhere. When you read the /boot/config/plugins/dynamix/notifications/agents/Telegram.sh script, you see that it references a /boot/config/plugins/dynamix/telegram/chatid file containing the chatid number. But in the Unraid telegram agent configuration UI, there is no chatid field (I'm using 6.9.2) In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Then clicked the test button in the Telegram agent configuration page and it worked. How to retrieve chatid : How to obtain Telegram chat_id for a specific user? - Stack Overflow How to retrieve token : https://core.telegram.org/bots#generating-an-authorization-token Genius thank you! It's Nov 2022 and this still is required. Quote
purcilas Posted January 21, 2023 Posted January 21, 2023 Just wanted to share I ran into this same problem but adding the chatid manually did not make sense to me as the telegram.sh script has logic to grab the chatid automatically. What fixed the issue for me was running these two commands below on the Telegram bot itself and trying the TEST message again. I even removed the chatid file I had created manually and tried it again and the script populated the file. 1.) /start 2.) /get_messages_stats 1 1 Quote
Marc_G2 Posted July 16, 2023 Posted July 16, 2023 (edited) I had to generate a new bot since I didn't realize none of my Telegram history would carry over after getting a new phone. If changing to a different bot, you have to manually delete the chatid file (located at flash\config\plugins\dynamix\telegram\chatid) in addition to inputting the new bot token. It won't work if you leave the old file in place. unRAID will automatically generate a new chatid when it sends a message. Edited July 16, 2023 by Marc_G2 1 Quote
BrandoHD Posted August 18, 2023 Posted August 18, 2023 This may help someone because this was the reason it was not working for me. Ensure that the "Agents" are enabled at the top of the notofications page. The defaults is only browser notifications 1 1 Quote
Kitra Posted July 19 Posted July 19 On 4/13/2021 at 7:20 PM, prune said: Hi, Looks like there is a missing step and a missing field in the Unraid UI in order to fully configure the Telegram agent. I think we need to put the telegram chatid somewhere. When you read the /boot/config/plugins/dynamix/notifications/agents/Telegram.sh script, you see that it references a /boot/config/plugins/dynamix/telegram/chatid file containing the chatid number. But in the Unraid telegram agent configuration UI, there is no chatid field (I'm using 6.9.2) In order for the Telegram agent to work, I had to create the file with my bot chatid: echo "MyChatIDnumber" > /boot/config/plugins/dynamix/telegram/chatid (Just replace MyChatIDnumber by your chat ID number including the minus (-) sign if any) Then clicked the test button in the Telegram agent configuration page and it worked. How to retrieve chatid : How to obtain Telegram chat_id for a specific user? - Stack Overflow How to retrieve token : https://core.telegram.org/bots#generating-an-authorization-token I have done all of this, but the test notification is still not going into the chat. Im not sure what's missing, but its frustrating / annoying that UnRaid as NOT fixed this in the settings to simplify it after 4 years. Quote
papa Posted July 22 Posted July 22 On 7/20/2024 at 6:16 AM, Kitra said: I have done all of this, but the test notification is still not going into the chat. Im not sure what's missing, but its frustrating / annoying that UnRaid as NOT fixed this in the settings to simplify it after 4 years. I completely agree with you. It seems the Unraid team is focusing on changes that confuse users. In version 6.12.10, which I’m currently using, the Telegram.sh script has been updated. There's no need to add a minus sign anymore. Simply enter the chat ID numbers in the /boot/config/plugins/dynamix/telegram/chatid file—no spaces, no minus sign, just the numbers. That’s all you need to do. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.