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

node-red-contrib-azureiothubnode-param

v0.5.6

Published

An Azure IoT Hub node for node-red. use msg.constr to set connection string

Downloads

13

Readme

Node-Red node for Azure IoT Hub

This Node-RED node adds Azure IoT connectivity to your Node-RED flow.

Prerequisites

To use the Azure IoT Hub Node-RED node, you need to have the following installed on the target machine:

  • Node.js v0.10 or above. (Check out Nodejs.org for more info)
  • Node-RED. To install Node-RED, run the following command:
    npm install -g node-red
  • Azure IoT Hub instance deployed in an Azure subscription with a device ID provisionned. You can learn how to deploy an Azure IoT Hub instance, create a Device ID and retrieve its connection string here.

Install the Node-RED node

To install the node, run the following command from the folder containing the package.json file for the node.

npm install -g node-red-contrib-azureiothubnode

First simple flow

To learn how to use the Azure IoT Hub node, here is a simple example:

  1. run Node-RED typing the following command
    node-red
  2. Open your Web browser and navigate to http://localhost:1880
  3. Click on the top right menu and select Import | Clipboard
  4. Paste the below in the popup window:
    [{"id":"7b108cb1.4807c8","type":"azureiothub","z":"8d630437.6181a8","name":"Azure IoT Hub","protocol":"amqp","x":379.5,"y":89.22000122070312,"wires":[["b79e7772.b39cc8"]]},{"id":"2269b09.2499b5","type":"inject","z":"8d630437.6181a8","name":"Inject data","topic":"","payload":"Hello from device","payloadType":"str","repeat":"","crontab":"","once":false,"x":209.5,"y":196.01998901367187,"wires":[["7b108cb1.4807c8"]]},{"id":"b79e7772.b39cc8","type":"function","z":"8d630437.6181a8","name":"Convert Bytes to String","func":"msg.payload = msg.payload.toString();\nreturn msg;","outputs":1,"noerr":0,"x":614.5,"y":201.57000732421875,"wires":[["a142535d.158f4"]]},{"id":"a142535d.158f4","type":"debug","z":"8d630437.6181a8","name":"","active":true,"console":"false","complete":"false","x":762.5,"y":320.1499938964844,"wires":[]}]
  5. Double click on the Azure IoT Hub node.
  6. Select the protocol of your choice.
  7. Enter the connection string for the device (see prerequisites for details).
  8. Click OK to validate
  9. Click on the Deploy red button in the top left to deploy the flow. Note that if you change the settings (protocol or connection string) you will need to redeploy the flow for the settings to be taken into account.
  10. You can now click on the Inject Data node to send messages to Azure IoT Hub
  11. When receiving messages from Azure IoT Hub, they will be displayed in the debug tab.