Synology - send System Notifications to Homeassistant & Companion App

Hi.

I got permanently all those notifications by my Diskstation through e-mail, which started to annoy me. So I investigated how I could improve this process. There is an app by Synology for push notifications but since I try to bundle all my smart home notifications in the HA companion app, I found a way to do that. The whole setup takes less than 5 minutes. You can also use this to do other things in Homeassistant, like trigger automations based on Synology notifications etc.

First go to the Synology Control Panel → Notification → Push Service → Application Webhooks → Manage Webhooks.
Add a new webhook and select Custom.

Choose any provider name and a subject. The subject will be the first line of the notification. I just left it as is.
Then enter the URL of your HA webhook (more information here: Automation Trigger - Home Assistant).
image

The header section should be already pre-filled to send JSON:
image

In the request body add a field and give it a name (e.g. Message)
image

Specify that this field you added is the Message Content
image

In Homeassistant set up an automation to process the incoming webhook data. Here is my example, where I just forwarded the notification to my companion app:

trigger:
  - platform: webhook
    webhook_id: some_hook_id
condition: []
action:
  - service: notify.mobile_app_florian
    data:
      title: Synology
      message: "{{trigger.json.Message}}"
7 Likes

Great! I loved when everything is integrated in one place.

This looks really nice!

However I have an old Synology DSM 6.2.4, which seems not to have the Webhooks yet. They must be available from DSM 7.x.

I’ve got it in push service on the bottom of the page.

Very nice !!! Removed email notification and switched to this. All in 1 place

Small upgrade to automation:

trigger:
  - platform: webhook
    webhook_id: some_hook_id
condition: []
action:
  - service: notify.mobile_app_florian
    data:
      title: Synology
      message: "{{trigger.json.Message}}"
      data:
        actions:
          - action: URI
            title: OPEN WWW
            uri: http://ip_address_synology 
          - action: URI
            title: OPEN APP
            uri: app://com.synology.DSfinder
1 Like

Hi
I believe that with a DSM update the configuration has changed slightly.
With DSM 7.2. I don’t understand where to set up Message Content.
As from the screenshot, I receive the webhook but not the content of the same.

I have no experience with Webhooks, can someone help me?

Thank you

For me it still looks in 7.2 as in my guide.

In your screenshot everything seems to be already preconfigured. You should get the text in Home Assistant with trigger.json.text

I said I had no experience with Webhooks… :smiley: :smiley: :smiley:

Thanks a lot @FPro

Sorry @emanuele.bordon, @FPro - I’m stuck here as well.
I’m basically receiving an empty message.

What exactly do I need to put into the ‘HTTP Body’ section?

OK - Got it:
I had to replace the word ‘text’ that’s shown in the screenshot above as
image

with the word ‘Message’ - and while I was at it, I added a new message title as well:

{
  "Title": "Synology Event",
  "Message": "@@TEXT@@"
}