Yoas1 9 Posted April 28, 2024 Posted April 28, 2024 Hi, I build webhook server to send emby events to telegram. Take a look Link to github: Emby-Telegram-Notifier 1
sh0rty 520 Posted April 29, 2024 Posted April 29, 2024 (edited) Hi and thanks for the effort. Installed without problems. Unfortunately, I get no images when media is added to Emby on my test run. Just plain text. Installing requirements Collecting requests Downloading requests-2.31.0-py3-none-any.whl (62 kB) Collecting urllib3<3,>=1.21.1 Downloading urllib3-2.2.1-py3-none-any.whl (121 kB) Collecting charset-normalizer<4,>=2 Downloading charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB) Collecting certifi>=2017.4.17 Downloading certifi-2024.2.2-py3-none-any.whl (163 kB) Collecting idna<4,>=2.5 Downloading idna-3.7-py3-none-any.whl (66 kB) Installing collected packages: urllib3, charset-normalizer, certifi, idna, requests Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 idna-3.7 requests-2.31.0 urllib3-2.2.1 starting flask app. * Serving Flask app '/App/app.py' * Debug mode: on WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5000 * Running on http://172.19.0.2:5000 Press CTRL+C to quit * Restarting with stat * Debugger is active! * Debugger PIN: xxx-xxx-xxx 192.168.2.50 - - [29/Apr/2024 20:50:06] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 20:52:21] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 20:52:45] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 21:02:54] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 21:05:06] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 21:05:11] "POST /webhook HTTP/1.1" 200 - 192.168.2.50 - - [29/Apr/2024 21:07:53] "POST /webhook HTTP/1.1" 200 - Edited April 29, 2024 by shorty1483
sh0rty 520 Posted April 30, 2024 Posted April 30, 2024 Working now as expected thanks to the updated code and great help of @Yoas1 1
Luke 39319 Posted February 3 Posted February 3 14 minutes ago, richenginner said: how to run in emby windows server? The github link in the first post seems to have some detailed instructions.
richenginner 2 Posted February 3 Posted February 3 1 minute ago, Luke said: The github link in the first post seems to have some detailed instructions. only for docker
richenginner 2 Posted February 3 Posted February 3 1 hour ago, Luke said: i tried, but not save and reset to empty values
Luke 39319 Posted February 3 Posted February 3 12 minutes ago, richenginner said: i tried, but not save and reset to empty values Best thing to do is report your issue in the topic for the plugin. Thanks.
richenginner 2 Posted February 3 Posted February 3 2 minutes ago, Luke said: Best thing to do is report your issue in the topic for the plugin. Thanks. another user report but user don't response yet. thanks!
Luke 39319 Posted February 3 Posted February 3 3 minutes ago, richenginner said: another user report but user don't response yet. thanks! I don't know what that's from, but the user didn't provide any description of their problem. That could mean anything. The developer should ask some questions, but the user should also provide more detail.
sh0rty 520 Posted February 5 Posted February 5 On 2/3/2025 at 6:35 AM, richenginner said: thank you very much! You could spin up Docker Desktop on Windows to use this notifier container. Works flawlessly for me since months now. 1
Yoas1 9 Posted February 16 Author Posted February 16 Hi, I built a container to run this notifier (without cloning and running another container). I also changed the way the application works: 1 - config file to get telegram bot token, 2 - added admin users to receive all notifications from the server 3 - added users to receive only new/deleted notification items from the server. https://github.com/Yoas1/emby-telegram-notifier- (if you like it give it a star in GitHub and docker hub ) 1
Yoas1 9 Posted February 16 Author Posted February 16 (edited) @richenginner If you don't want to use Docker, you can clone the repo and run the script with Python. Edited February 16 by Yoas1
sh0rty 520 Posted February 18 Posted February 18 (edited) On 2/16/2025 at 8:10 PM, Yoas1 said: Hi, I built a container to run this notifier (without cloning and running another container). I also changed the way the application works: 1 - config file to get telegram bot token, 2 - added admin users to receive all notifications from the server 3 - added users to receive only new/deleted notification items from the server. https://github.com/Yoas1/emby-telegram-notifier- (if you like it give it a star in GitHub and docker hub ) When I spin up the new image with yaml, I got an error at beginning. 172.31.0.1 - - [18/Feb/2025 22:15:55] "POST /webhook HTTP/1.1" 500 - [2025-02-18 22:12:42,860] ERROR in app: Exception on /webhook [POST] Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/app/app.py", line 167, in webhook admin_id = get_admins() File "/app/app.py", line 37, in get_admins admins = info_data["admins"] KeyError: 'admins' This seems to be an error in your example yaml. It needs to be admins and not admin in line 5 it seems. Edited February 18 by sh0rty
Yoas1 9 Posted February 18 Author Posted February 18 Yes i missed a letter there... Thanks I'll fix it
Yoas1 9 Posted February 18 Author Posted February 18 token: - <telegram-bot-token> emby-server: - http://<emby-server-url>:<port> admin: - <chatid> users: - <chatid> - <chatid> If you create a new bot you must send him /start in your telegram. 1
sh0rty 520 Posted February 18 Posted February 18 12 minutes ago, Yoas1 said: token: - <telegram-bot-token> emby-server: - http://<emby-server-url>:<port> admin: - <chatid> users: - <chatid> - <chatid> If you create a new bot you must send him /start in your telegram. Yea just recognized that too I thought you meant Emby user ID.
Yoas1 9 Posted February 18 Author Posted February 18 I change it to <telegram-chatid> does it work well?? Let me know if you run into the problem
sh0rty 520 Posted February 18 Posted February 18 6 minutes ago, Yoas1 said: I change it to <telegram-chatid> does it work well?? Let me know if you run into the problem Test message worked well + a small test run. Will check the next days. Keep up the great work!
sh0rty 520 Posted February 19 Posted February 19 (edited) One question though. I just need an admin and no user. When I specify the config.yaml like that, Telegram messages are sent to the recipient, but Emby throws an internal server error when sending test message + I get an error in container log. token: - 7025719356:AAHRCnMngxRIpk5zixuixjjjc-2Pe21pjCg emby-server: - http://192.168.2.51:80 admins: - chatid users: [2025-02-19 07:50:02,875] ERROR in app: Exception on /webhook [POST] Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/app/app.py", line 191, in webhook for i in range(len(user_id)): TypeError: object of type 'NoneType' has no len() 172.31.0.1 - - [19/Feb/2025 07:50:02] "POST /webhook HTTP/1.1" 500 - When I delete the users section completely from the yaml, I get another internal server error because the script cannot find users section in yaml. Is it correct htat I do need to specify the same chat as Admin and User in yaml? This is the only variant thats working without errors. Edited February 19 by sh0rty
sh0rty 520 Posted February 19 Posted February 19 3 hours ago, sh0rty said: Thee users section completely from the yaml, I get another internal server error because the script cannot find users section in yaml. Is it correct htat I do need to specify the same chat as Admin and User in yaml? This is the only variant thats working without errors. With the working combo, I get the telegram messages twice.
Yoas1 9 Posted February 19 Author Posted February 19 Yes I see the problem, I will try to fix it tonight 1
sh0rty 520 Posted February 19 Posted February 19 6 hours ago, Yoas1 said: Yes I see the problem, I will try to fix it tonight Nevertheless, best Emby Telegram plugin around! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now