Coder Social home page Coder Social logo

node-red-contrib-push's Introduction

Node-RED Push Notification nodes

node-red-contrib-push is a Node-RED package that allows you to send APN, GCM and Web push notifications.

It uses the node-apn library for APN notifications, node-gcm for GCM notifications and web-push for Web notifications.

Table of Contents

APN

You can use the apn node to send notifications to iOS and Safari devices. You will need to configure a Provider Authentication Token and then create an app configuration, which will contain the token, as well as the topic (bundle-id) of your app and wheather it's using a production or sandbox environment. Assign the app configuration to the apn node and you are ready to send notifications.

You can use the apn-notification node to set the properties of a notification, or you can send the values in the msg.notification object. You can also set the raw payload which will be sent to Apple in the msg.rawNotification object. More information available in the apn node info tab.

The tokens must be provided in the msg.tokens object as an array.

GCM

The gcm node is used to send notifications to Android and iOS (if it's configured in Firebase) devices. For Chrome notifications, check out the web node. You will need to configure your GCM Api Key and assign it to the node.

You can use the gcm-notification node to set the properties of a notification, or you can send the values in the msg.notification object.

The recipient of the notification can be specified by setting one of the following keys: to, topic, condition, registrationTokens or tokens.

More information available in the gcm node info tab.

Web

The web node is used to send notifications to Chrome, Firefox, Opera, and Samsung Internet browsers. For a list of supported versions of those browsers, check the web-push page.

Some browsers (Chrome and Opera) requires a GCM Api Key to send notifications, so you will need to configure it in the node.

You can use the web-notification node to set the properties of a notification, or you can send the values in the msg.notification object.

The device tokens must be provided in the msg.tokens object and they must contain the endpoint, as well as the p256dh and the auth keys.

More information available in the web node info tab.

Additional information

The apn, gcm and web nodes will return the result in the msg.result key.

Example flow

You can find an example flow in exampleFlow.json.

Screenshots

Screenshot 1

License

Copyright 2017 Mihail Cristian Dumitru

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

node-red-contrib-push's People

Contributors

xzya avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

node-red-contrib-push's Issues

App or WebApp ...

Dear Mihael,

Thanks a lot for contributing this node to the community! I registered this issue, but it is perhaps more a question about your contribution.

I want to achieve the following: when my Node-Red flow detects a door being opened, a notification should be triggered on my Android device. When I click in Android on that notification, either my Node-Red dashboard or the flow editor should be opened (without an extra app so a pure Node-Red solution). Summarized:

image

But from what I understand this is not possible currently with this contribution. Is that correct? Instead I have to use (or create) a GCM enabled app, and copy it's registration token into your contribution. When the notification is being clicked, that GCM enabled app will be opened.

Do you think it would be possible what I want to achieve? I found this documentation, but it is to fuzzy for me at this moment. The token should be resended automatically to Node-Red when it is being refreshed, and so on ...

Thanks in advance !!!

Bart Butenaers

Cannot remove

Uninstall fails. The 'remove' options is not highlighted even though al usages in the flows are removed. This is because there are still 3 config nodes present. When removing those, the 'remove' option becomes available but clicking it results in an error and it says to check the logs. However there is nothing in the logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.