npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-messenger

v0.0.8

Published

Send HomeKit messages with HomeBridge (Pushover / IFTTT / Email)

Downloads

80

Readme

homebridge-messenger

NPM downloads NPM version GitHub issues GitHub pull requests Licence verified-by-homebridge

Homebridge plugin which allow users to send messages from HomeKit.

Features

The plugin supports the following technologies:

Installation

Option 1: Install via Homebridge Config UI X:

Search for "messenger" in homebridge-config-ui-x and install homebridge-messenger.

Option 2: Manually Install:

sudo npm install -g homebridge-messenger

Configuration

The plugin adds to HomeKit a main switch and switches for each configured message.

The accessory name is used to specify the name of the main switch. If this main switch if turned OFF, no message will be sent by the plugin.

Message switches are stateless: they are turned OFF after being turned ON, once the message is sent.

There are two levels of configuration:

  • Service level properties defines the parameters for a specific technology. All messages related to that technology will be using the same properties for all messages.
    • Example: All emails will use the same SMTP configuration.
  • Message level properties contains the configuration of each message.
    • Example: Each message can have a different title and text.

All switches can be used in scenes and automation.

Homebridge Config UI X

Homebridge Config UI X is the easiest way to configure this plugin :

  • Every option is available through the UI
  • Configuration validation

Pushover

"accessories": [
      {
          "accessory": "HomebridgeMessenger",
          "name": "Messenger",
          "services": {
              "pushover": {
                  "user": "your_user",
                  "token": "your_token"
              }
          },
          "messages": [
              {
                  "type": "pushover",
                  "name": "Pushover message",
                  "text": "This is a test",
                  "sound": "pushover",
                  "device" : "iphone",
                  "priority": 0
              },
              {
                  "type": "pushover",
                  "name": "Critical message",
                  "text": "This is important",
                  "sound": "magic",
                  "priority": 2
              }         
          ]
      }
  ]
  • Service properties :
    • user (required): The user/group key of your user (or you).
    • token (required): Your application's API token.
  • Message properties :
    • type (required): Must be pushover.
    • name (required): Name of the switch and title of your message.
    • text (required): Body of the message.
    • sound (facultative): Name of the sound that will notify the user. If no valid value is provided, the default pushover sound will be used. For no sound, use silent. The Pushover API contains the list of all available sounds.
    • device (facultative): The device name to send the message to. If not specified, the message will be send to all your devices. You can send to multiple devices by using a coma.
    • priority (required): Priority of the message. Accepted values are -2, -1, 0, 1 or 2. You may refer to the Pushover API for more details. Critical messages (2), are sent with the following parameters :
      • Retry : 60 seconds
      • Expires: 3600 seconds

IFTTT (Webhooks service)

"accessories": [
    {
        "accessory": "HomebridgeMessenger",
        "name": "Messenger",
        "services": {
            "ifttt": {
                "key": "your_key"
            },
        },
        "messages": [
            {
                "type": "ifttt",
                "name": "Test IFTTT",
                "event": "my_webhook",
                "value1": "hello world",
                "value2": "foo bar",
                "value3": "chewbacca"
            }        
        ]
    }
]
  • Service properties :
    • key (required): Your key. To obtain your key, log into your IFTTT account and click on the Documentation link in the Webhooks service.
  • Message properties :
    • type (required): Must be ifttt.
    • name (required): Name of the switch. This will be not passed to IFTTT.
    • event (required): Name of your event configured in IFTTT (Webhooks service).
    • value1 (facultative): Value 1 to be passed to IFTTT.
    • value2 (facultative): Value 2 to be passed to IFTTT.
    • value3 (facultative): Value 3 to be passed to IFTTT.

Email

"accessories": [
    {
        "accessory": "HomebridgeMessenger",
        "name": "Messenger",
        "services": {
            "email": {
                "recipient": "[email protected]",
                "smtpServer": "smtp.domain.com",
                "smtpPort": 465,
                "smtpSecure": true,
                "smtpUsername": "your_username",
                "smtpPassword": "your_password"
            }
        },
        "messages": [
            {
                "type": "email",
                "name": "Test email",
                "text": "This is a test",
                "recipients": "[email protected], [email protected]"
            }        
        ]
    }
]
  • Service properties :
    • recipient (required): Default email address of the recipient.
    • smtpServer (required): Address of the SMTP host.
    • smtpPort (facultative): Port to connect to. (Default value is 25).
    • smtpSecure (facultative): Set to true if SMTP supports TLS. (Default value is false).
    • smtpUsername (facultative): Username for the SMTP server, if required.
    • smtpPassword (facultative): Password for the SMTP server, if required.
  • Message properties :
    • type (required): Must be email.

    • name (required): Name of the switch and subject of your email.

    • text (required): Body of the email.

    • recipients (facultative): Address of the recipients for this email. Multiple emails can be used, divided by a comma. If empty, the default email address at the service level will be used.

Advanced configuration

An example featuring all technologies is available here.

Coming next

Change Log

Available here

Credits

License

The homebridge-messenger plugin is released under the MIT license.