[PR #599] [CLOSED] Support MQTT for sending notification #1343

Closed
opened 2026-05-07 01:01:41 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/599
Author: @zoic21
Created: 2/3/2023
Status: Closed

Base: mainHead: main


📝 Commits (1)

📊 Changes

4 files changed (+133 additions, -0 deletions)

View changed files

📝 cmd/serve.go (+15 -0)
server/mqtt.go (+93 -0)
📝 server/server.go (+13 -0)
📝 server/server.yml (+12 -0)

📄 Description

Hello,

It's my first time I coding in go, sorry if there are horrors...

I test and it's working on my labs, I can send a mqtt message to ntfy/message in json format like mosquitto_pub -h 127.0.0.1 -m '{"message":"coucou","topic":"toto","priority":"5","tags":"heavy_check_mark,tomato"}' -t ntfy/message and I received message on ntfy ui.

Only missing think can be documentation (I will do it if you think you can accept this pr) and maybe more error handler (for now if we can't connect to mqtt or if there is message decode error I just log in info level).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/599 **Author:** [@zoic21](https://github.com/zoic21) **Created:** 2/3/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`db518b5`](https://github.com/binwiederhier/ntfy/commit/db518b5c19b72537c67e7a6401f95e60a4ce773a) add mqtt listenner ### 📊 Changes **4 files changed** (+133 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/serve.go` (+15 -0) ➕ `server/mqtt.go` (+93 -0) 📝 `server/server.go` (+13 -0) 📝 `server/server.yml` (+12 -0) </details> ### 📄 Description Hello, It's my first time I coding in go, sorry if there are horrors... I test and it's working on my labs, I can send a mqtt message to ntfy/message in json format like ``mosquitto_pub -h 127.0.0.1 -m '{"message":"coucou","topic":"toto","priority":"5","tags":"heavy_check_mark,tomato"}' -t ntfy/message`` and I received message on ntfy ui. Only missing think can be documentation (I will do it if you think you can accept this pr) and maybe more error handler (for now if we can't connect to mqtt or if there is message decode error I just log in info level). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:41 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1343
No description provided.