[Integration] NTFY: receive Gladys messages on your phone

Hi everyone :waving_hand:

I’ve published an external integration that allows Gladys to send its notifications via ntfy.

Why ntfy?

ntfy is a free and open-source push notification service. The principle is simple: you publish a message on a « topic », and all phones subscribed to that topic receive the notification. No subscription, no bot to create, and if you want to keep everything within your own network, you can host your own ntfy server alongside Gladys.

In practice

Once the integration is installed, ntfy appears in the « Send via » choice of scene actions:

  • Send a message: the text arrives as a notification on the chosen person’s phone.

  • Send a camera image: the image is attached to the notification and is displayed directly in the app. If the server does not accept attachments, the message is sent without the image.

Each household member has their own topic, so no one receives notifications from others. On the administrator side, you set the server (ntfy.sh by default), the title of the notifications, and their priority, from « Min » to « Urgent » for those that must go through even in silent mode.

Small note: this only works in one direction. Gladys writes to you, but you cannot reply to her from ntfy.

What you need

  • Gladys 4.62 or newer

  • The ntfy app on your phone (Android / iOS)

  • An ntfy access token (it starts with tk_), created from your ntfy.sh account or on your own server

Installation in 3 minutes

  1. Install the integration. If you have your own server, put its address in the configuration, otherwise keep https://ntfy.sh.

  2. In the My account block, each person enters their topic and token.

  3. In the ntfy app, subscribe to the same topic, on the same server. You’re ready.

:warning: On ntfy, a topic is readable by anyone who knows its name. Avoid gladys or maison and choose a long and random name, like gladys-maison-a8f3k2.

The code, the documentation, and a troubleshooting guide (notification not arriving, error 403…) are on GitHub: GitHub - callemand/gladys-ntfy: ntfy notifications integration for Gladys Assistant · GitHub

If you try it, let me know what you think here. In case of a bug, an issue on the repository will help me fix it. Thanks! :folded_hands:

@NineStars thanks for the feedback!

I tested version 1.2.0 on my side (published image, in amd64 and arm64) and text messages are working fine. Besides, the code for sending a message without an image hasn’t changed since 1.1.0, only the image sending is new. So there must be something specific to your installation, and I need some information to find out:

  1. Your Gladys version and your machine (Raspberry Pi, x86…)

  2. The status displayed for the ntfy integration in Gladys (Running, Degraded, error…)

  3. The Logs tab of the integration, right after sending a test message: copy the lines that appear

  4. Are you using ntfy.sh or your own server? If it’s your server, is authentication enabled?

  5. Are your topic and token still filled in the “My Account” block?