Help with ntfy syntax

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1362
Joined: 17 Jun 2018, 20:41
Location: USA

Help with ntfy syntax

#1 Post by ThomasB » 13 Feb 2025, 07:29

I'm using the ntfy.sh service to send messages from ESPEasy. It has been working well. But I want to add the priority command to the message.

This is the format I have been using, without priority:

Code: Select all

postToHTTP,ntfy.sh,80,/mydevice,'title:Motor Status','The motor is running fine'
But I want to add the priority command to it. Like this:

Code: Select all

postToHTTP,ntfy.sh,80,/mydevice,'title:Motor Status','priority:5','The motor is ON FIRE'
But it does not work correctly. The message becomes "priority:5" and the message's priority is unchanged.

I'm seeking help with the syntax.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1362
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Help with ntfy syntax

#2 Post by ThomasB » 13 Feb 2025, 07:57

I found my mistake. This is the correct syntax:

Code: Select all

postToHTTP,ntfy.sh,80,/mydevice,'title:Motor Status%LF%priority:5','The motor is ON FIRE'
- Thomas

User avatar
Ath
Normal user
Posts: 4330
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Help with ntfy syntax

#3 Post by Ath » 13 Feb 2025, 08:13

ThomasB wrote: 13 Feb 2025, 07:29

Code: Select all

postToHTTP,ntfy.sh,80,/mydevice,'title:Motor Status','priority:5','The motor is ON FIRE'
But it does not work correctly. The message becomes "priority:5" and the message's priority is unchanged.
Multiple headers should be combined in the (single) header argument, new-line separated, like this:

Code: Select all

postToHTTP,ntfy.sh,80,/mydevice,'title:Motor Status%LF%priority:5','The motor is ON FIRE'
Edit: You beat me in the find :lol: (and I didn't refresh before posting)
/Ton (PayPal.me)

User avatar
ThomasB
Normal user
Posts: 1362
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Help with ntfy syntax

#4 Post by ThomasB » 13 Feb 2025, 17:37

Thanks Ton!

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests