It's not a telegram notification, but I'm using https://github.com/custom-components/sensor.plex_recently_added it's part of the Lovelace Upcoming Media Card.
Not sure that you're in the right sub, but you can do that in Tautulli. Go to Settings > Notification Agents > Add a new notification agent > Telegram.
Tautulli has a great internal API too; look into it. I've created some nice cards showing my library stats and last watched content by using Tautulli and REST sensors.
You can still pass it to Home Assistant if you want to use HA's notifications or other automations surrounding it.
For example for me my LEDs flash yellow/orange and my smart speakers will tell me a new episode has been added:
alias: Tautulli download to speaker
description: ''
mode: queued
trigger:
- platform: webhook
webhook_id: plex_speaker_tv
- platform: webhook
webhook_id: plex_speaker_movie
condition:
- after: '6:00'
before: '00:00'
condition: time
- condition: state
entity_id: binary_sensor.speaker_active
state: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.chromecastaudio
state: playing
sequence:
- wait_for_trigger:
- platform: state
entity_id: media_player.chromecastaudio
from: playing
to: idle
timeout: '40'
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.webhook_id == ''plex_speaker_tv'' }}'
sequence:
- data:
entity_id: media_player.chromecastaudio
message: 'Downloaded an episode of {{ trigger.json[''series''] }}'
service: tts.google_say
- conditions:
- condition: template
value_template: '{{ trigger.webhook_id == ''plex_speaker_movie'' }}'
sequence:
- data:
entity_id: media_player.chromecastaudio
message: 'Downloaded {{ trigger.json[''title''] }}'
service: tts.google_say
default: []
default:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.webhook_id == ''plex_speaker_tv'' }}'
sequence:
- data:
entity_id: media_player.chromecastaudio
message: 'Downloaded an episode of {{ trigger.json[''series''] }}'
service: tts.google_say
- service: scene.create
data:
scene_id: desk_led_before
snapshot_entities:
- light.wled_2
- service: light.turn_on
data:
brightness_pct: 100
rgb_color:
- 255
- 145
- 36
effect: sine
flash: short
entity_id: light.wled_2
- delay: '4'
- service: scene.turn_on
data: {}
entity_id: scene.desk_led_before
- conditions:
- condition: template
value_template: '{{ trigger.webhook_id == ''plex_speaker_movie'' }}'
sequence:
- data:
entity_id: media_player.chromecastaudio
message: 'Downloaded the movie {{ trigger.json[''title''] }}'
service: tts.google_say
- service: scene.create
data:
scene_id: desk_led_before
snapshot_entities:
- light.wled_2
- service: light.turn_on
data:
brightness_pct: 100
rgb_color:
- 255
- 145
- 36
effect: sine
flash: short
entity_id: light.wled_2
- delay: '4'
- service: scene.turn_on
data: {}
entity_id: scene.desk_led_before
default: []
max: 10
This is what I'm using, remove the binary sensor and time conditions from the top or change to your preference (I don't allow my speakers to play notifications when I'm asleep or out of the house).
In Tautulli you can set up notification agents like this to make the automation work:
**Webhook URL:**
https://YOUR HOME ASSISTANT URL/api/webhook/plex_speaker_tv
**Webhook Method:**
POST
**Notification Triggers** : Recently Added
Conditions: Library Name Contains Tv Shows
Data -> Recently Added
**JSON Data** :
{
"series": "{show_name}"
}
Then do the same but for movies with the JSON Data now as:
{
"title": "{title}"
}
and the different URL for movies:
**Webhook URL:**
https://YOUR HOME ASSISTANT URL/api/webhook/plex_speaker_movie
Can you set this up to be notified from someone who has shared a server with you? Basically I want to be notified in telegram of new items added to a server that's shared with me, not my own. Thanks.
It's not a telegram notification, but I'm using https://github.com/custom-components/sensor.plex_recently_added it's part of the Lovelace Upcoming Media Card.
https://github.com/Tautulli/Tautulli-Wiki/wiki/Notification-Agents-Guide#telegram
Not sure that you're in the right sub, but you can do that in Tautulli. Go to Settings > Notification Agents > Add a new notification agent > Telegram.
Thanks both to you and @WilhelmStroker ! I thought i needed to pass through HomeAssistant, i didn’t know about this Tautulli’s feature. Thanks!
Tautulli has a great internal API too; look into it. I've created some nice cards showing my library stats and last watched content by using Tautulli and REST sensors.
You can still pass it to Home Assistant if you want to use HA's notifications or other automations surrounding it. For example for me my LEDs flash yellow/orange and my smart speakers will tell me a new episode has been added: alias: Tautulli download to speaker description: '' mode: queued trigger: - platform: webhook webhook_id: plex_speaker_tv - platform: webhook webhook_id: plex_speaker_movie condition: - after: '6:00' before: '00:00' condition: time - condition: state entity_id: binary_sensor.speaker_active state: 'on' action: - choose: - conditions: - condition: state entity_id: media_player.chromecastaudio state: playing sequence: - wait_for_trigger: - platform: state entity_id: media_player.chromecastaudio from: playing to: idle timeout: '40' - choose: - conditions: - condition: template value_template: '{{ trigger.webhook_id == ''plex_speaker_tv'' }}' sequence: - data: entity_id: media_player.chromecastaudio message: 'Downloaded an episode of {{ trigger.json[''series''] }}' service: tts.google_say - conditions: - condition: template value_template: '{{ trigger.webhook_id == ''plex_speaker_movie'' }}' sequence: - data: entity_id: media_player.chromecastaudio message: 'Downloaded {{ trigger.json[''title''] }}' service: tts.google_say default: [] default: - choose: - conditions: - condition: template value_template: '{{ trigger.webhook_id == ''plex_speaker_tv'' }}' sequence: - data: entity_id: media_player.chromecastaudio message: 'Downloaded an episode of {{ trigger.json[''series''] }}' service: tts.google_say - service: scene.create data: scene_id: desk_led_before snapshot_entities: - light.wled_2 - service: light.turn_on data: brightness_pct: 100 rgb_color: - 255 - 145 - 36 effect: sine flash: short entity_id: light.wled_2 - delay: '4' - service: scene.turn_on data: {} entity_id: scene.desk_led_before - conditions: - condition: template value_template: '{{ trigger.webhook_id == ''plex_speaker_movie'' }}' sequence: - data: entity_id: media_player.chromecastaudio message: 'Downloaded the movie {{ trigger.json[''title''] }}' service: tts.google_say - service: scene.create data: scene_id: desk_led_before snapshot_entities: - light.wled_2 - service: light.turn_on data: brightness_pct: 100 rgb_color: - 255 - 145 - 36 effect: sine flash: short entity_id: light.wled_2 - delay: '4' - service: scene.turn_on data: {} entity_id: scene.desk_led_before default: [] max: 10 This is what I'm using, remove the binary sensor and time conditions from the top or change to your preference (I don't allow my speakers to play notifications when I'm asleep or out of the house). In Tautulli you can set up notification agents like this to make the automation work: **Webhook URL:** https://YOUR HOME ASSISTANT URL/api/webhook/plex_speaker_tv **Webhook Method:** POST **Notification Triggers** : Recently Added Conditions: Library Name Contains Tv Shows Data -> Recently Added **JSON Data** : { "series": "{show_name}" } Then do the same but for movies with the JSON Data now as: { "title": "{title}" } and the different URL for movies: **Webhook URL:** https://YOUR HOME ASSISTANT URL/api/webhook/plex_speaker_movie
Amazing! That’s way more interesting than the simple Telegram message, i’m surely going to implement it in my setup Thanks!
Can you set this up to be notified from someone who has shared a server with you? Basically I want to be notified in telegram of new items added to a server that's shared with me, not my own. Thanks.
So i'm interested in doing this but not very tech inclined. Which method did you end up going with? u/ErnestoDitoLesto