Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mqtt-notification

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt-notification

Native desktop notifications based on MQTT.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

node-mqtt-notification

npm version

This small node program allows your computer to display native notifications, that are send from a mqtt server.

Usage:

  • Display message when an error occurred on with one of your apps.
  • Show "Someone at the door" notification.
  • Someone opened a door.

You can also use this to remote lock your computer. (Currently only tested on MacOS)

Install and Config

You would typically run this app in the background, but first you have to configure it.

git clone https://github.com/svrooij/node-mqtt-notification.git
cd node-mqtt-notification
npm install
nano config/local.json

Edit this file to your needs config/local.json with the following config. And see default.json for the other config items. See mqtt.connect for options how to format the host. mqtt://ip_address:port is the easiest.

{
  "mqtt": {
    "host":"mqtt://ip_or_host_of_mqtt_server"
  },
  "topics": {
    "lockTopic":"the/topic/to/subscribe/to/for/locking",
    "notificationTopic":"the/notification/topic"
  }
}

Try to start the application by running npm start or directly by node receiver.js, and try to send a notification (or a lock command).

Running in the background

If everything works as expected, you should make the app run in the background automatically. Personally I use PM2 for this. And they have a great guide for this.

When PM2 is running (and starting on startup). pm2 start receiver.js --name mqtt-notifications

Keywords

FAQs

Package last updated on 20 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc