Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted

Table of Contents

1. Overview

2. Installation

3. Configuration

4. Basic Usage

5. Advanced Features

6. Priority Levels

7. Emoji Tags

8. Real-World Examples

9. Troubleshooting

 

Please login or register to see this attachment.

 

1. Overview

ntfy.sh is a notification service that I have started to use. It has clients for iOS, Android, Web, and desktop, etc.
It's free and quite versatile.

Please login or register to see this link.


 

The NTFY QuickApp provides a powerful and flexible way to send push notifications from your Fibaro HC3 home automation system using the popular ntfy.sh service (or your own ntfy server). It supports all ntfy features including priorities, emojis, action buttons, attachments, and even bidirectional Fibaro actions. Besides wrapping the standard API in Lua, it also adds 'fibaro' actions, that allows us to include buttons that call functions in our QA when the user selects it.
The QA can be run as a standalone QA called from other QAs, or be included as a library in your own QA (need to rename and call the :onInit function)


Most of the documentation is on the ntfy.sh site, but I include a summary below.

Feel free to improve on the QA and post it here!

 

Key Features:

•Full ntfy API support - All notification features available

•Priority levels - From silent to urgent notifications

•Emoji tags - 75+ predefined emoji shortcuts

•Action buttons - Interactive notifications with callbacks

•Fibaro actions - Trigger HC3 actions from mobile notifications

•Attachments - Send files, images, and links

•Mark down support - Better message formatting

•Scheduling - Delayed delivery support

•Multi-channel - Email forwarding and phone calls

•Authentication - Support for private ntfy servers

 

2. Installation

Step 1: Install the QuickApp

1. Download the ntfy.fqa file

2. Import it into your Fibaro HC3 via the QuickApp installer

3. The QuickApp will appear in your device list as "NTFY Notification Service"

 

Step 2: Mobile App Setup

1. Install the ntfy mobile app:

•Android: Google Play Store

•iOS: App Store

2. Subscribe to your chosen topic (e.g., "my-alerts")

3. Configure notification preferences in the app

 

Tip: Choose a unique, hard-to-guess topic name to prevent others from sending to your topic. Topics are essentially passwords!

 

3. Configuration

Basic Configuration

After installation, if neccessary, you can customize the QuickApp by modifying the configuration in the onInit() function:

 

Please login or register to see this code.

 

Configuration Options

•server: ntfy server URL (use your own server or ntfy.sh)

•defaultTopic: Topic to use when none specified

•defaultResponseTopic: Topic for receiving Fibaro action responses

•timeout: HTTP request timeout in seconds

 

However, it should not be needed as all parameters can be specified in request.

 

4. Basic Usage

Simple Notifications

The easiest way to send a notification:

 

Please login or register to see this code.

 

Main send() Method

The main send() method accepts a table with all notification options:

 

Please login or register to see this code.

 

Convenience Methods

•sendSimple(topic, message, title) - Basic notification with custom topic

•sendAlert(message, title) - High priority with warning emoji

•sendCritical(message, title) - Max priority with critical emojis + email

 

5. Advanced Features

Action Buttons

Create interactive notifications with up to 3 action buttons:

 

View Action (Opens URL/App)

Please login or register to see this code.

 

HTTP Action (API Call)

Please login or register to see this code.

 

Fibaro Action (HC3 Integration)

Most useful, as it allow us to call back to a QA function.
The 'callback' parameter can only be used if the code is local (we can't pass Lua functions between QAs).
If you call the Ntfy QA from another QA, use 'deviceId','actionName','args'

Please login or register to see this code.

 

Please login or register to see this code.

 

 

Attachments and Media

Please login or register to see this code.

 

Scheduled Delivery

Please login or register to see this code.

 

6. Priority Levels

ntfy supports 5 priority levels that control how urgently notifications are delivered:

 

MIN (1): No vibration/sound, notification under fold

LOW (2): No vibration/sound, in notification drawer

DEFAULT (3): Normal vibration and sound

HIGH (4): Long vibration, pop-over notification

MAX (5): Very long vibration, urgent pop-over

 

Priority Usage Examples

Please login or register to see this code.

 

7. Emoji Tags

The QuickApp includes 75+ predefined emoji tags that automatically convert to emojis in notifications. Tags that don't match emojis are displayed as regular text labels.

 

Usage Tip: You can use multiple tags in one notification: tags = {"house", "lock", "checkmark"} will show multiple emojis

 

8. Real-World Examples

Security System Alert

Please login or register to see this code.

 

Temperature Monitoring

Please login or register to see this code.

 

Smart Energy Management

Please login or register to see this code.

 

9. Troubleshooting

Common Issues

Notifications Not Received

•Verify the topic name matches between HC3 and mobile app

•Check mobile app notification permissions

•Ensure internet connectivity on both HC3 and mobile device

•Try sending a test notification from ntfy.sh web interface

 

Fibaro Actions Not Working

•Check that setupListener() is running (check debug logs)

•Verify the response topic is unique and not used elsewhere

•Ensure callback functions don't have syntax errors

•Actions expire after timeout - check if pressing button quickly enough

 

Performance Optimization

•Use appropriate priorities - avoid overusing high/max priority

•Consider grouping similar notifications to reduce spam

•Use delays for non-urgent notifications to batch them

•Monitor ntfy.sh rate limits if using the public service

 

-- Check helper functions

local emoji = quickApp:getEmojiForTag("warning") -- Should return warning emoji

local priority = quickApp:getPriorityInfo(4) -- Should return HIGH info

 

Support Resources

•ntfy Documentation:

Please login or register to see this link.

•ntfy.sh Status:

Please login or register to see this link.

•Fibaro Community:

Please login or register to see this link.

 

NTFY QuickApp Documentation Made for Fibaro HC3 ntfy.sh

 

  • Like 4
  • Thanks 1
Posted

This was way to easy to setup (just testing atm) :D

Well done @jgab 

Please login or register to see this attachment.

  • Like 1
  • Topic Author
  • Posted

    Ah, and you get the Yubii icon too - it doesn't show on iOS.

    • Like 1
    Posted (edited)

    Yea, even new yubii icon too :D 😝 

    Is it possible to send a snapshot from a camera on the hc3? 🤔 Since this isnt possible natively on the hc3?

     

    I guess the 8. real world example is somthing like this? But got to know the Url of the snapshot? and it have to be accessable from the outside of my network? 🤔

    The mybell takes snapshot and shows in QA, could this be sent in a ntfy message?

    image.png.a3486e97553adc3f55e8b8fc72117043.png

    Please login or register to see this attachment.

    Edited by Brors94
  • Topic Author
  • Posted

    If you have an external url to the pic you could include that in the message? (could you send it to some external storage with link?)
    If your pics are only available from within your network I have no idea at the moment...

    • Like 1
    • 4 months later...
    Posted

    Hi,

     

    Just to inform users who are on Apple computer with Apple silicon chip and macOS Tahoe can download NTFY app for iPhone/iPad on their mac from App store and enjoy receiving NTFY notifications.

    Since NTFY app is also made for iPads window on macs is big enough :-D

     

    I requested Fibaro to make their Yubii Home app available on mac App store. It would be nice to have browser and Yubii app on the same screen seeing result of our new coded quick apps without needing to grab mobile phones :-) 

    • Like 1

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...