Starting my journey with Home Assistant on my new Synology DS220+, I quickly encountered an annoyance. While my NAS notifies me via E-Mail about new updates which can't be automatically installed, Home Assistant Updates will just appear and I won't recognize it, until I open the Dashboard. And still having the default view, it's not that obvious if the system is outdated. I'm running Home Assistant as a Docker container, so I have to manually update it (using docker-compose
) to the latest stable version.
So I checked if all needed information was available in the state
of Home Assistant and if there was an Telegram integration. Luckily nearly everything was already available so I could quickly dive into implementing an automation for this task.
According to the current state (Home Assistant Version 2021.12.10
) there is no UI for setting up the Telegram integration. So make sure to have access to the configuration files of Home Assistant. How to gain access won't be covered in this post.
To register a Telegram bot and receive messages, you will of course need a Telegram account.
The Home Assistant documentation on the Telegram and Telegram Bot integrations was a bit confusing at first, so I will try to quickly summarize the steps needed to setup everything needed for this automation. For further reference there's also Telegram's Bot Documentation.
These steps will create a new bot via Telegram using the @BotFather
/newbot
Home Assistant
(This doesn't need to be unique)FoosHABot
(This needs to be unique and has some limitations, see the Documentation)Sidenote: After creating your bot, you can further configure your bot, e.g. assign a profile picture using
/setuserpic
These steps will retrieve your chat id (Using the @getidsbot
)
/start
as messageid
, this is the chat id and we will need later onPro Tip: you can click the number and it will be copied to your clipboard
So now that you have successfully created your bot and wrote down both the API Token as well as the chat id we can start configuring Home Assistant.
We need to configure multiple integrations, so that the automation will work.
To communicate through the bot, we need to add the following lines to the configuration.yaml
:
1# Telegram bot2telegram_bot:3 - platform: polling4 api_key: !secret telegram_bot_api_key5 allowed_chat_ids: !secret telegram_bot_chat_ids
As you can see, the configuration is fairly simple. I'm also using secrets to easily exclude them from my Git repository to keep them private. I will provide a brief explanation for each configuration key.
telegram_bot
- This is the integration's name
platform
- This is how Home Assistant will interact with the Telegram bot
api_key
- This is the API Token from the step Create a new botallowed_chat_ids
- This is a list of chat ids which the bot is allowed to talk to. Use the chat id from the step Retrieve a chat idA sample secrets.yaml
with placeholders would look like this:
1telegram_bot_api_key: "{YOUR_API_KEY}"2telegram_bot_chat_ids:3 - {YOUR_CHAT_ID}4 - {ANOTHER_CHAT_ID}5telegram_bot_my_chat_id: {YOUR_CHAT_ID}
To send a notification the easy way, Home Assistant's Notifications integration can be used. We will add a simple Telegram notification channel for our chat id retrieved in Retrieve a chat id:
1# Notification Channels2notify:3 - platform: telegram4 name: telegram5 chat_id: !secret telegram_bot_my_chat_id
That's it. Now we can trigger a notification using the notify.telegram
service. The service name is always notify.{name}
, so you can even use something like foos_telegram
as name
and call it via notify.foos_telegram
.
Sidenote: A chat id could even be from a group, so the bot would send a message to that group instead to a single user chat.
To try your newly configured notification channel, head over to the Developer Tools > Services
and select notify.telegram
. Then add a sample message and click Call Service
. Shortly after that you will receive a message from your bot.
Now that everything is set up to send a message using the Telegram notifier, only one thing is missing. An information which Home Assistant version is currently running. So we add the version integration.
UPDATE (February 3, 2022): Since Home Assistant 2022.2.0 you can (and should) set this up via the UI. Keeping the manual instructions for reference.
Adding the sensor to the configuration.yaml
manually:
1# Sensors2sensor:3 - platform: version
That's everything needed. By default this will check the current version of your Home Assistant instance and offer it in the state sensor.current_version
.
As I used the UI to create this automation, so I will describe what you should select or type to get the same result.
Notify on HA Update
Mode
Queued
(More information)Trigger type
would be State
Entity
= binary_sensor.updater
Attribute
= Newest version
1service: notify.telegram 2data: 3 title: '*HA version {{ state_attr(''binary_sensor.updater'', ''newest_version'') }}*' 4 message: >- 5 A new Home Assistant version is available. 6 7 _Installed Version:_ {{ states('sensor.current_version') }} 8 9 _Newest Version:_ {{ state_attr('binary_sensor.updater', 'newest_version')10 }}11 12 _Release Notes:_ {{ state_attr('binary_sensor.updater', 'release_notes') }}
Now hit the save button and execute the automation using Run Actions
. If everything is configured correctly, you will now receive a notification from your bot.
Prerequisite is, that you configured the Synology DSM integration.
Notify on NAS Update
Mode
Queued
(More information)Trigger type
would be State
Entity
= binary_sensor.nas_update_available
Attribute
= Latest available version
1service: notify.telegram 2data: 3 title: >- 4 *DSM Version {% if state_attr('binary_sensor.nas_update_available', 5 'latest_available_version') == None %}Unknown{% else %}{{ 6 state_attr('binary_sensor.nas_update_available', 'latest_available_version') 7 }}{% endif %}* 8 message: >- 9 A new DSM Version is available.10 11 _Installed Version:_ {{ state_attr('binary_sensor.nas_update_available',12 'installed_version') }}13 14 _Newest Version:_ {% if state_attr('binary_sensor.nas_update_available',15 'latest_available_version') == None %}Unknown{% else %}{{16 state_attr('binary_sensor.nas_update_available', 'latest_available_version')17 }}{% endif %}
As you can see, using the different integrations from Home Assistant and setting up one or more Telegram notifiers, you can easily add further automated notifications. There are so many possibilities, as the Telegram integration allows things like Sending a Photo
, Sending a Video
, showing buttons to interact with your bot and trigger actions in home assistant when receiving events like telegram_command
(See Telegram bot integration).
Maybe I will find the time to dive deeper into it and write another post.
Until then, hit me up on Twitter @theiNaD with your questions or feedback.
]]>A lot of old & outdated posts as well as other content have been removed. Some content has been moved to other places. The old posts still existing won't be translated into english.
The Download Station Hosting Providers can now be found at DS Mediatheken.
Currently there is no plan that a comment function will be added. If you are struggling using the DS Mediatheken plugin, just write an Issue at GitHub.
]]>Ab jetzt ist die erste Version meines neuen Projektes ds-mediatheken auf GitHub verfügbar. Dieses Projekt wurde komplett neu geschrieben und unterstützt aktuell das ZDF und 3sat.
Es folgen noch die weiteren Mediatheken, welche von den alten Providern unterstützt wurden. Diese Zusammenführung hat für mich den Vorteil, dass durch den neuen Aufbau Änderungen an den Mediatheken einfacher durchgeführt werden können. Auch sammeln sich eure Fehlerberichte an einem Punkt und ihr müsst nur noch einen Provider auf dem aktuellen Stand halten.
Im Endeffekt vermutlich eine Win-Win Situation für alle.
]]>Dies ist in der aktuellen Version behoben.
Diese könnt Ihr wie immer Hier erhalten.
]]>endlich mal wieder ein kleines Update meinerseits. Ab jetzt ist die Version 0.4c des ZDF Hosting Providers verfügbar. Diese behebt folgende Probleme:
CDATA
Tags im Dateinamenwebapp.zdf.de
) zur Download Station hinzugefügt werden.seit einigen Wochen (Das genaue Datum kenne ich nicht), funktionierte der NDR Hosting Provider nicht mehr. Ich habe den Fehler behoben und mit der aktuellen Version können wieder Videos aus der NDR Mediathek mit der Download Station heruntergeladen werden. Grund war eine Änderung seitens des NDR.
Sollten Probleme auftreten, so bitte ich euch, dass ihr einfach ein Ticket bei Github hinterlasst mit ein paar Infos zu eurer Synology (Version von Download Station etc.).
]]>SERIE - FOLGE.mp4
) benennen. Bei den Updates handelt es sich um die Provider der folgenden Mediatheken:
Zudem arbeite ich zur Zeit auch an einer Implementierung für die Österreicher unter euch für den ORF.
Grüße, Daniel
]]>Die Funktionsweise ist identisch zu den restlichen Hosting Providern. Die aktuellste Version werdet ihr immer hier finden.
Sollten Probleme auftreten, so bitte ich euch, dass ihr einfach ein Ticket bei Github hinterlasst mit ein paar Infos zu eurer Synology (Version von Download Station etc.).
]]>Dieser behebt einen Fehler, welcher unter Windows Betriebssystemen falsche Dateinamen anzeigen lässt, da die Umbenennung "verbotene" Zeichen erlaubte.
]]>Für die unten aufgelisteten Mediatheken stehen Updates zur Verfügung, welche dazu führen, dass die Dateien automatisch nach den Videotiteln benannt werden. Dies ist eine erste Version dieser Funktion, sollte es zu Fehlern kommen, so bitte ich entsprechend mich zu kontaktieren oder ein Ticket zu erstellen.
Auch wird möglichst versucht einen "brauchbaren" Titel zu nutzen d.h., es können dann im weiteren Verlauf mit Software wie Filebot die Dateien noch besser benannt werden, ohne dass ihr großartig manuell etwas machen müsst.
Die anderen Mediatheken, wie z.B. BR, MDR usw. folgen noch im Laufe der Zeit.
Folgende Features befinden sich zudem zur Zeit in der Warteschlange:
Diese Version behebt den Fehler, dass Links mit der Teilurl mediathek.daserste.de
nicht erkannt wurden.
.host
Datei herunterladen, in Download Station hinzufügen und schon können die Videos aus der SWR Mediathek heruntergeladen werden.
]]>Das Portfolio der Hosting Provider für die Synology Download Station ist gewachsen. Es sind insgesamt 5 neue Mediatheken implementiert worden, wovon 1 in einen bereits vorhandenen Provider integriert wurde.
Zudem wurde eine möglich Fehlerquelle beim ARD Provider eliminiert. Die Trefferquote für MP4s sollte nun höher liegen.
Folgende Mediatheken der öffentlich rechtlichen Sender könnt Ihr ab jetzt mit eurer Download Station nutzen:
ARD Hosting Provider, erweitert um die Unterstützung des RBBs Download Station Plugins
]]>Für ein Update folgt einfach dem Punkt Update
der Anleitung.
Ihr habt die Möglichkeit sowohl die Beiträge auf Deutsch als auch auf Französisch herunter zu laden. Dies wird anhand des Links bestimmt, d.h. wenn Ihr den französischen Beitrag möchtet, dann müsst Ihr den Link von der französischen Mediathek heraussuchen.
Viel Spaß damit.
]]>Die Änderungen sind nur zwei kleine:
kurze Zwischenmeldung meinerseits. Ich habe die 3 Provider der öffentlich-rechtlichen Sender aktualisiert, da ein Fehler auftrat, wenn die Mediatheken auf eine andere URL weiterleiten wollen.
Folgende Versionen sind aktuell:
Ich bedanke mich auch bei all den Leuten, die Feedback via Twitter, Github, E-Mail oder auch Caschy's Blog gegeben haben. Solltet Ihr weitere Fehler finden, so weist mich gerne darauf hin.
]]>Ich besitze seit kurzem ein DS215j NAS von Synology und spiele seitdem auch ein wenig mit der Download Station herum.
Bevor ich mir das NAS zugelegt habe, überlegte ich mir PyLoad drauf zu installieren. Allerdings wollte ich erstmal versuchen mit den Boardmitteln die meisten Downloads zu realisieren.
Nun ist es so, dass Massengeschmack.tv die Downloads nur zulässt, wenn man angemeldet ist. Alternativ kann man die Benutzerdaten via HTTP Basic-Auth mitteilen und so die Datei herunterladen. Leider bietet der Download Manager keine direkte Möglichkeit und jedes mal die Logindaten selber in die URL einzubauen ist auch zu kompliziert.
Nach kurzem Informieren habe ich nun einen Hosting Provider für die Download Station geschrieben, welcher es euch erlaubt alle Dateien welche von massengeschmack.tv
kommen herunterzuladen mit den hinterlegten Accountdaten.
Moin,
heute ist frisch Watch Dogs erschienen. Ja einige haben schon seit Freitag am PC Watch Dogs gespielt, aber das soll nicht das Thema sein.
Ich habe es zuerst auf Englisch installiert. Mittlerweile (auch um die Kommunikation mit einigen Freunden zu erleichtern) wollte ich dann gerne mal die deutsche Fassung testen. In UPlay gibt es leider keinerlei Einstellung hierfür.
Variante 1 wäre gewesen, das Spiel neu zu installieren (also wohl auch neu herunter zu laden). Besonders da die Server zur Zeit sehr überlastet sind, fällt diese Variante weg. Zudem mag es Leute geben, die keine 100 MBit Leitung haben (Mit der ich das Spiel heute Vormittag echt fix herunterladen konnte).
Update vom 28.05.2014
Mir ist im ersten Moment gar nicht bewusst aufgefallen, dass zwar Menü, Untertitel etc. auf deutsch sind, aber die Sprachausgabe weiterhin auf englisch ist. Leider habe ich keine Lust und Zeit weiter zu forschen, wie man die Sprachausgabe auch auf deutsch kriegt. Denn vermutlich existieren nur die Textübersetzungen für alle Sprachen und die Sprachdateien werden nur für die angegebene Sprache heruntergeladen. Sollte jemand eine Lösung hierfür finden, so würde ich mich sehr über einen Kommentar freuen :)
Die Lösung des Problems ist wirklich einfach. Mit regedit (Win+R -> regedit) könnt ihr (wie im folgenden Screenshot zu sehen) unter Computer\HKEY_CURRENT_USER\Software\Ubisoft\Watch_Dogs einfach 4 Registry-Keys ändern und nach einem Neustart von Watchdogs erhaltet ihr die gewünschte (wenn diese vorhanden ist) Sprache. In meinem Fall habe ich die Keys von en-US zu de-DE geändert.
Mehr müsst ihr nicht machen. Solltet ihr eine russische Version haben (die eigentlich nur Russisch haben dürfte), dann wird dieser Trick wohl nicht funktionieren. Da die Sprachdateien nicht heruntergeladen werden.
Ich wünsche euch noch viel Spaß beim Hacken ;)
]]>