Telegram Bot Notifications


Recommended Posts

  • 1 month later...
  • 2 months later...
  • 2 months later...
  • 3 weeks later...
  • 4 weeks later...

@limetech, following this up from:

 

 

@Ashe, as you can see from here, the script checks if the `chatid` file does not exist and if it doesn't it asks the Telegram API for the latest bot updates, expecting to find a message from the user in there that would get the chat id to the `chatid` file. I have recently noticed that the timestamp on the files generated by this script updates everytime an update has come through, which is something I would not expect. Will do a revision in the following days.

 

Edited by realies
Link to comment
[mention=18806]Ashe[/mention] , did some bug fixes that can be seen here. Did retest in a clean environment and can't replicate the issue you were having. Feel free to test it yourself (note you also have to remove /boot/config/plugins/dynamix/notifications/agents/Telegram.sh if you do change NotificationAgents.xml).
 
Pretty sure [mention=1]limetech[/mention] will merge the changes for the next release.


Thanks@realies, once released I'll test the upgrade and if not will test on fresh install.


Sent from my iPhone using Tapatalk
Link to comment
  • 2 weeks later...
On 1/25/2019 at 7:02 AM, realies said:

@Ashe , did some bug fixes that can be seen here. Did retest in a clean environment and can't replicate the issue you were having. Feel free to test it yourself (note you also have to remove /boot/config/plugins/dynamix/notifications/agents/Telegram.sh if you do change NotificationAgents.xml).

 

Pretty sure @limetech will merge the changes for the next release.

Yes they have been merged.  Please test and verify correct functionality.

 

Also, we received this on our twitter feed:

 

"I think the Telegram Support in 6.7.0+ is a bit weird. I would prefer to enter a ChatID and Token, instead that it keeps reading the /getUpdates chat IDs"

 

Any merit to this?

Link to comment
Yes they have been merged.  Please test and verify correct functionality.
 
Also, we received this on our twitter feed:
 
"I think the Telegram Support in 6.7.0+ is a bit weird. I would prefer to enter a ChatID and Token, instead that it keeps reading the /getUpdates chat IDs"
 
Any merit to this?

Tested under RC3, same problem as before.

There is no option to add the chatid therefore a chatid file is not created in the config just the tokenid. If I manually create a chatid file it works.


Far easier to have a chatid entry line in my opinion


Sent from my iPhone using Tapatalk
Link to comment
  • 1 month later...
  • 1 month later...
On 2/12/2019 at 9:54 AM, Ashe said:


Tested under RC3, same problem as before.

There is no option to add the chatid therefore a chatid file is not created in the config just the tokenid. If I manually create a chatid file it works.


Far easier to have a chatid entry line in my opinion


Sent from my iPhone using Tapatalk

It's not working for me at all, chatid file is not being created. Do I just create a chatid file in the same directory as the tokenid file, and paste the chatid in there?

 

EDIT: Nevermind, figured out that creating a "chatid" file and just putting it in the same folder as the token file makes this work. 

 

I don't understand why this doesn't have a Chat ID file and when it's populated unraid generates a chatid file and inside it it appends the 9 digit ID. It's not that difficult. 

Edited by exist2resist
FIgured it out.
Link to comment
It's not working for me at all, chatid file is not being created. Do I just create a chatid file in the same directory as the tokenid file, and paste the chatid in there?

Yes, it's as simple as that. Would note after upgrading my main server to 6.7, it worked without chatid


Sent from my iPhone using Tapatalk
Link to comment
1 minute ago, Ashe said:


Yes, it's as simple as that. Would note after upgrading my main server to 6.7, it worked without chatid


Sent from my iPhone using Tapatalk

Yeah figured it out. 

I'm on 6.7 and it wasn't working for me at all. 

I had to create a chatid file and once I did the test was successful. 

Prior to that it went nowhere with just the BOT token.

Link to comment
Yeah figured it out. 
I'm on 6.7 and it wasn't working for me at all. 
I had to create a chatid file and once I did the test was successful. 
Prior to that it went nowhere with just the BOT token.

My test server is still on RC, will update to 6.7 and see whether that works without chatid


Sent from my iPhone using Tapatalk
Link to comment
  • 4 months later...
  • 1 month later...
On 10/12/2019 at 12:14 AM, killeriq said:

Hello guys,

 

Any guide where / how to setup Telegram bot for unraid? I know how to setup BOT , but not sure what to do on unRaid side.

 

thanks

I am having issues as well setting up telegram agent in UnRAID.

 

I can make the same bot work in Radarr and Sonarr where the GUI lets me add the "chatID" in a field. But the Unraid notification agent settings GUI doesn't have this.

I get results in log and no error but nothing pops up on Telegram....

Nov 23 13:18:20 REMOTE ool www[9010]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'enable' 'Telegram.sh'
Nov 23 13:18:23 REMOTE ool www[9010]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'test' 'Telegram.sh'
Nov 23 13:20:27 REMOTE ool www[14897]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'test' 'Telegram.sh'

But setting up in a bot with Radarr docker on same UnRaid server works instantly, what am I missing?

 

Found this in my searching and trying to figure this out is it related - https://github.com/limetech/webgui/pull/512

Edited by BackupAddict
Link to comment

Well I am not sure why but after throwing my hands in the air and leaving it alone for a day, notifications starting coming in on my UnRAID notification bot.

 

Now if I press the test button I get an instant message on telegram bot, yay But odd cause I didn't change anything just took a day to start working.

 

Only thing I can't get sorted is how to get unRAID bot to post in my custom telegram channel I have that all the other bots for various dockers and other stuff post in to keep telegram cleaner. In Radarr docker for instance I can add the chat ID of my Notification channel into a field beside my bots API key and then they post in my unified notification channel instead of each bot posting in their own thread.

Link to comment
Well I am not sure why but after throwing my hands in the air and leaving it alone for a day, notifications starting coming in on my UnRAID notification bot.
 
Now if I press the test button I get an instant message on telegram bot, yay But odd cause I didn't change anything just took a day to start working.
 
Only thing I can't get sorted is how to get unRAID bot to post in my custom telegram channel I have that all the other bots for various dockers and other stuff post in to keep telegram cleaner. In Radarr docker for instance I can add the chat ID of my Notification channel into a field beside my bots API key and then they post in my unified notification channel instead of each bot posting in their own thread.

I think you are supposed to be able to enter

'apikey:chatid' and it should work

However I just created a file called 'chatid' and entered the number in there


Sent from my iPhone using Tapatalk
  • Thanks 1
Link to comment

Hmmm thx for the info, Just tried "apikey:chatid" but test didn't work, perhaps a day delay again.... not sure as the APIkey for my bot has a " : " in it perhaps that mucks things up.

 

Nov 25 10:14:34 REMOTE ool www[5445]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'test' 'Telegram.sh'
Nov 25 10:14:51 REMOTE ool www[25433]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'enable' 'Telegram.sh'
Nov 25 10:14:54 REMOTE ool www[25433]: /usr/local/emhttp/plugins/dynamix/scripts/agent 'test' 'Telegram.sh'

first test listed in log above worked, then I add chatid with apikey using ":" in between and get no test message popup, to my eyes no error on either not sure why no results again once chatid added.

Quote

However I just created a file called 'chatid' and entered the number in there

Where do you put this file? As I am just using the built in agent not a custom user script and an UnRAID nOOb still :)

I will wait and see if it starts working later with "apikey:chatid" if I patiently wait again, but another way if this fails would be welcome.

 

Not sure why its so easy cut and dry with other dockers, but built in UnRAID usage has been difficult for me :/

Edited by BackupAddict
added info
Link to comment
On 11/25/2019 at 8:01 PM, Ashe said:

cd /boot/config/telegram
Nano chatid
Add chatid number to file
Ctrl-x
Save


Sent from my iPhone using Tapatalk

Awesome thank-you for the details, all sorted now notifications arriving in my alert channel now.

 

Easy once one know how but that said a simple chatid field in the UnRAID notification agent GUI for Telegram would sure be more user friendly than having to use terminal :)

 

Edited by BackupAddict
  • Like 1
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.