Ntfy notification via CLI/CURL does not work

Hey there.

I’ve tried to add ntfy as a notification service to my Home Assistant instance. I wrote a command-line script, that takes either STDIN or CLI arguments as input and then uses curl to my self-hosted notification server. For debugging purposes it even sends out a notification even if the message is missing. Everything works fine when I ssh into my HA and run the script from command line (execution rights are fine). But whatever I try, I seem unable to use this as a notification service in HA.

I’ve tried multiple variations of this configuration:

  - name: ntfy
    platform: command_line
    command: /root/ntfy.sh

It does show up in the dev section, and I can trigger it without errors – but no notification is sent. Does anybody have an idea what I am doing wrong? Did I miss something?

I have still to try shell_command as suggest in some other threads – if I understand it correctly, I would lose the ability to notify with a custom message. But I might be wrong here.


Home Assistant 2022.7.6
Supervisor 2022.07.0
Operating System 8.2
Frontend 20220707.1 - latest

Did you manage to integrate ntfy in the end?

No, sadly not. I switched to Pushover.

I’m not sure if this meets your requirements, but here’s what it looks like to me.

  - name: ntfy
    platform: rest
    method: POST_JSON
      topic: secret-topic
    title_param_name: title
    message_param_name: message
    resource: https://ntfy.sh

In the node-red addon I configured node-red-contrib-sse-client for incoming ntfy messages. But the ‘websocket in’ node works for that too.

1 Like