Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntfy service #607

Open
jpmens opened this issue Oct 29, 2022 · 12 comments
Open

ntfy service #607

jpmens opened this issue Oct 29, 2022 · 12 comments

Comments

@jpmens
Copy link
Collaborator

jpmens commented Oct 29, 2022

ntfy sends push notifications to your phone or desktop using PUT/POST.

This would be a nice candidate for mqttwarn. ntfy is fully floss.

Takers for writing the code? :-)

@amotl
Copy link
Member

amotl commented Oct 30, 2022 via email

@binwiederhier
Copy link

I also vote for @particledecay. He's done good work with the apprise plugin. 😄 ❤️

@amotl
Copy link
Member

amotl commented Nov 20, 2022

Hi again,

7c37406 adds documentation and a simple test case about notifications via ntfy, using Apprise.

Cheers,
Andreas.

/cc @caronc

@zoic21
Copy link

zoic21 commented Feb 12, 2023

Hello,

I try to used ntfy with mqttwarn, I can send a message on topic I want with my title but I don't find how to send tags or priority. I use this configuration :

[config:ntfy]
; Dispatch message to ntfy.
; https://github.com/caronc/apprise/wiki/URLBasics
; https://github.com/caronc/apprise/wiki/Notify_ntfy
module   = 'apprise_single'
baseuri  = 'ntfys://xxxxx:[email protected]:443/maison/monitoring'
[ntfy]
targets = ntfy
title = {title}
topic = {topic}
tags = {tags}
priority = {priority}

And I send this : {"message":"coucou","topic":"maison","tags":"grinning lady_beetle","priority":"max"}. I received message but without tags and priority.

How can I pass this parameters ?

Thank in advance.

@jpmens
Copy link
Collaborator Author

jpmens commented Feb 12, 2023

I think we use apprise for that, so you'll have to check their documentation

@zoic21
Copy link

zoic21 commented Feb 12, 2023

Hello,
Yes it's what have done but it seen mqttwarn don't pass tags and priority parameters

@zoic21
Copy link

zoic21 commented Feb 13, 2023

For information I find how to solve that :

[config:http]
timeout = 60
loglevel = DEBUG
targets = {#method     #URL               # query params or None                              # list auth # Json
  'ntfy' : [ "post",  "https://ntfy.XXXXX.net", None, ('xxxxx', 'xxxxx'), True],
  }
[ntfy]
targets = http:ntfy

Then I send : {"topic":"xxxx","message":"coucou","priority":5,"tags":["grinning","octopus"]}

@jpmens
Copy link
Collaborator Author

jpmens commented Feb 13, 2023

Thanks for reporting back, @zoic21, and glad you got it working.

@amotl
Copy link
Member

amotl commented Feb 13, 2023

Dear Loïc,

thank you for reporting your observations, and good that you have been able to make it work already.

On the other hand, I took the chance to improve the mqttwarn <-> Apprise integration with GH-619 in a more generic manner. It enhances the situation when aiming to propagate parameters to all Apprise plugins, so it will also support your use case well, as documented by 468a6e2. I will be happy if you could support us in discussing and testing this improvement.

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Feb 13, 2023

Hi again,

mqttwarn 0.32.0 has been released with the improvements from GH-619. Feedback about it is very welcome.

@zoic21: As mentioned at #619 (comment), please let us know if you have additional needs in this area, for example to submit the topic field through the data dictionary.

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Apr 20, 2023

Hi.

Based on a use case introduced by @sevmonster we've explored recently (see GH-632), we are adding a dedicated ntfy service plugin with GH-638 now, in order to have better control about all the details when communicating with the ntfy HTTP API. I will be happy about any comments and suggestions.

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Apr 27, 2023

Hi.

After adding a dedicated ntfy service plugin with GH-638, this comment intends to track a few corresponding backlog items. Feel free to add more suggestions and wishes.

With kind regards,
Andreas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants