I have been working on finding a solution for sending Tautulli updates into a signal group and I finally figured out how to utilize Home Assistant to send information to my signal group chat. While I have used Discord and telegram in the past, my friends were reluctant to use them so this seems to be the best approach for my use case. I figured someone else may be interested so I would pass it along.
** I am sure there are much more elegant ways to accomplish this, so I am more than open to feedback about how to make it work better!
There are a couple prerequisites which I imagine you have in place if you are reading this thread.
- Tautulli & Plex Server
- MQTT Broker in Home Assistant ( I use the Mosquitto Addon) https://github.com/home-assistant/addons/blob/5c0243dfacf2539956b7d270f70de32bf77901e6/mosquitto/DOCS.md
First, I set up the Signal Rest API add on and the integration using the instructions on the integration page here: Signal Messenger - Home Assistant
Once I had that set up and working, I created the signal groups an ensured I was able to send messages using the relevant Notification Service Calls in Home Assistant. Below is what mine looks like in my config
- name: signal_XXXXXXX_alerts
platform: signal_messenger
url: "http://127.0.0.1:8080" # the URL where the Signal Messenger REST API is listening
number: "+XXXXXXXXXXX" # the sender number
recipients: # one or more recipients
- "group.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
Then I had to go into Tautulli to setup 2 different MQTT notifications. The first includes the Title of the Recently added item and the second creates a notification utilizing the {poster_url}
.
After I had these running, I checked that they were being received by the MQTT Broker and I was ready to setup the MQTT sensors in home assistant. Under the mqtt config I added the following 2 sensors
sensor:
- name: RecentlyAddedPlex
state_topic: tautulli/recentlyadded
value_template: "{{ value_json.body }}"
unique_id: XXXXXXXXXXXXXXXXXXXXXX
- name: RecentlyAddedPlexImagae
state_topic: tautulli/recentlyadded/image
value_template: "{{ value_json.body }}"
unique_id: XXXXXXXXXXXXXXXXXXXXXXX
Lastly, I setup an automation to send the notifications. The trigger is a message being published to the broker and the action is sending the data from each sensor in the Signal Notification
alias: Tautulli Recently Added Notification
description: ""
trigger:
- platform: mqtt
topic: tautulli/recentlyadded
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: notify.signal_XXXXXXX_alerts
data:
message: "{{ states('sensor.recentlyaddedplex') }}"
data:
urls:
- "{{ states('sensor.recentlyaddedplex_2') }}"
mode: single
I added the 15 second delay as I wanted to make sure that the sensors would both be updated from Tautulli before the message was sent…so far this has been working great! I would love if I was able to make it a bit cleaner, but this was as far as I could go with my own skills.
Hope this helps someone else looking to go down the same path. My next steps are to add server up/down notifications, another automatio/sensor which will send teh newsletter out to the group once per week and create a private group for myself which sends other information I would like to see.