зеркало из
1
0
Форкнуть 0
A Node.js SDK for connecting devices to Microsoft Azure IoT services
Перейти к файлу
Pierre Cauchois 85bf410f95 Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
.github PR template: remove reference to develop branch 2017-04-12 15:48:39 -07:00
build Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
common Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
device Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
doc Add e2e tests to the node-test docs 2017-06-14 16:14:00 -07:00
e2etests Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
jenkins improve builds, step 1: separate e2e tests 2017-10-23 19:31:47 -07:00
network_e2e Docker-based network connection tests for windows 2017-04-11 13:17:38 -07:00
provisioning Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
security Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
service Add package-lock files to source tree 2018-02-15 20:21:56 -08:00
ts-e2e remove deprecated --type-check option in tslint npm script 2017-10-26 00:28:07 -07:00
.gitattributes Add license, readme, contribution guidelines and build files 2016-11-14 17:00:39 -08:00
.gitignore security stubs 2017-11-13 18:12:08 -08:00
.jshintignore [Node.js] Add code coverage reporting 2016-02-22 13:12:20 -08:00
.jshintrc Improve Node.js build 2015-10-20 13:15:29 -07:00
CODE_OF_CONDUCT.md Add code of conduct file 2017-10-17 15:43:27 -07:00
LICENSE Add license, readme, contribution guidelines and build files 2016-11-14 17:00:39 -08:00
lts_branches.png Update LTS document 2017-07-07 17:20:05 -07:00
readme.md Adding feature matrix for provisioning service (#190) 2018-01-04 18:05:15 -08:00
thirdpartynotice.txt Add license, readme, contribution guidelines and build files 2016-11-14 17:00:39 -08:00
tslint.json azure-iot-common port to TypeScript 2017-05-02 18:33:01 -07:00

readme.md

Microsoft Azure IoT SDK for Node.js

This repository contains the following:

  • Azure IoT Hub Device SDK: to connect client devices to Azure IoT Hub
  • Azure IoT Hub Service SDK: enables developing back-end applications for Azure IoT
  • Node-RED node for Azure IoT: demonstrates how to create a Node-RED node that connect with Azure IoT Hub

The API reference documentation for the device SDK is here.

The API reference documentation for the service SDK is here.

To find SDKs in other languages for Azure IoT, please refer to the azure-iot-sdks repository.

Developing applications for Azure IoT

Visit Azure IoT Dev Center to learn more about developing applications for Azure IoT.

How to use the Azure IoT SDKs for Node.js

Devices and data sources in an IoT solution can range from a simple network-connected sensor to a powerful, standalone computing device. Devices may have limited processing capability, memory, communication bandwidth, and communication protocol support. The IoT device SDKs enable you to implement client applications for a wide variety of devices.

  • Using npm packages: the simplest way to use the Azure IoT SDKs for Node.js to develop device apps is to leverage the npm packages:
  • Clone the repository
git clone https://github.com/Azure/azure-iot-sdk-node.git
  • Working with the SDKs code: if you are working with the SDK's code to modify it or to contribute changes, then you can clone the repository and build the libraries following these instructions.

Key features and roadmap

Device client SDK

✔️ feature available ✖️ feature planned but not supported no support planned

Features mqtt mqtt-ws amqp amqp-ws https Description
Authentication ✔️ ✔️* ✔️ ✔️* ✔️* Connect your device to IoT Hub securely with supported authentication, including private key, SASToken, X-509 Self Signed and Certificate Authority (CA) Signed. *IoT Hub only supports X-509 CA Signed over AMQP and MQTT at the moment.
Send device-to-cloud message ✔️* ✔️* ✔️* ✔️* ✔️* Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties. IoT Hub only supports batch send over AMQP and HTTPS at the moment. This SDK supports batch send over HTTP. * Batch send over AMQP and AMQP-WS, and add system properties on D2C messages are in progress.
Receive cloud-to-device messages ✔️* ✔️* ✔️ ✔️ ✔️ Receive cloud-to-device messages and read associated custom and system properties from IoT Hub, with the option to complete/reject/abandon C2D messages. *IoT Hub supports the option to complete/reject/abandon C2D messages over HTTPS and AMQP only at the moment.
Device Twins ✔️* ✔️* ✔️* ✔️* IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties. *Send reported properties version and desired properties version are in progress.
Direct Methods ✔️* ✔️* ✔️* ✔️* IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific operation. *Handler for generic operation is in progress
Upload file to Blob ✔️ A device can initiate a file upload and notifies IoT Hub when the upload is complete. File upload requires HTTPS connection, but can be initiated from client using any protocol for other operations.
Connection Status and Error reporting ✔️ ✔️ ✔️ ✔️ ✔️ Error reporting for IoT Hub supported error code.
Retry policies ✔️ ✔️ ✔️ ✔️ ✔️ Retry policy for unsuccessful device-to-cloud messages have three options: no try, exponential backoff with jitter (default) and custom.
Devices multiplexing over single connection ✖️ ✖️ ✖️
Connection Pooling - Specifying number of connections ✖️ ✖️ ✖️

Service client SDK

✔️ feature available ✖️ feature planned but not supported no support planned

Features Node Description
Identity registry (CRUD) ✔️ Use your backend app to perform CRUD operation for individual device or in bulk.
Cloud-to-device messaging ✔️ Use your backend app to send cloud-to-device messages in AMQP and AMQP-WS, and set up cloud-to-device message receivers.
Direct Methods operations ✔️ Use your backend app to invoke direct method on device.
Device Twins operations ✔️ * Use your backend app to perform device twin operations. *Twin reported property update callback and replace twin are in progress.
Query ✔️ Use your backend app to perform query for information.
Jobs ✔️ Use your backend app to perform job operation.
File Upload ✔️ Set up your backend app to send file upload notification receiver.

Provisioning client SDK

✔️ feature available ✖️ feature planned but not supported no support planned

This repository contains provisioning device client SDK for the Device Provisioning Service.

Features mqtt mqtt-ws amqp amqp-ws https Description
TPM Individual Enrollment ✖️ ✖️ ✖️ This SDK does not support connecting your device to the Device Provisioning Service via individual enrollment using Trusted Platform Module yet.
X.509 Individual Enrollment ✔️ ✔️ ✔️ ✔️ ✔️ This SDK supports connecting your device to the Device Provisioning Service via individual enrollment using X.509 root certificate). Please visit the samples folder to learn more about this feature.
X.509 Enrollment Group ✔️ ✔️ ✔️ ✔️ ✔️ This SDK supports connecting your device to the Device Provisioning Service via enrollment group using [X.509 root certificate](This SDK supports connecting your device to the Device Provisioning Service via individual enrollment using X.509 leaf certificate). Please visit the samples folder to learn more about this feature.

Provisioniong service client SDK

This repository contains provisioning service client SDK for the Device Provisioning Service to programmatically enroll devices.

Feature Support Description
CRUD Operation with TPM Individual Enrollment ✔️ Programmatically manage device enrollment using TPM with the service SDK. Please visit the samples folder and this quickstart to learn more about this feature.
Bulk CRUD Operation with TPM Individual Enrollment ✔️ Programmatically bulk manage device enrollment using TPM with the service SDK. Please visit the samples folder to learn more about this feature.
CRUD Operation with X.509 Individual Enrollment ✔️ Programmatically manage device enrollment using X.509 individual enrollment with the service SDK. Please visit the samples folder and this quickstartto learn more about this feature.
CRUD Operation with X.509 Group Enrollment ✔️ Programmatically manage device enrollment using X.509 group enrollment with the service SDK. Please visit the samples folder to learn more about this feature.
Query enrollments ✔️ Programmatically query registration states with the service SDK. Please visit the samples folder to learn more about this feature.

Samples

In the repository, you will find a set of simple samples that will help you get started:

Platforms compatibility

The Azure IoT SDK for Node.js should work with versions of Node.js as old as v0.10.x. this being said, a lot of dependencies are slowly dropping support for these older versions and we really have no control over that.

It is recommended to update to at least Node.js v4.x.x.

Contribution, feedback and issues

If you encounter any bugs, have suggestions for new features or if you would like to become an active contributor to this project please follow the instructions provided in the contribution guidelines.

Support

If you are having issues using one of the packages or using the Azure IoT Hub service that go beyond simple bug fixes or help requests that would be dealt within the issues section of this project, the Microsoft Customer Support team will try and help out on a best effort basis. To engage Microsoft support, you can create a support ticket directly from the Azure portal. Escalated support requests for Azure IoT Hub SDK's development questions will only be available Monday thru Friday during normal coverage hours of 6 a.m. to 6 p.m. PST. Here is what you can expect Microsoft Support to be able to help with:

  • Client SDKs issues: If you are trying to compile and run the libraries on a supported platform, the Support team will be able to assist with troubleshooting or questions related to compiler issues and communications to and from the IoT Hub. They will also try to assist with questions related to porting to an unsupported platform, but will be limited in how much assistance can be provided. The team will be limited with trouble-shooting the hardware device itself or drivers and or specific properties on that device.
  • IoT Hub / Connectivity Issues: Communication from the device client to the Azure IoT Hub service and communication from the Azure IoT Hub service to the client. Or any other issues specifically related to the Azure IoT Hub.
  • Portal Issues: Issues related to the portal, that includes access, security, dashboard, devices, Alarms, Usage, Settings and Actions.
  • REST/API Issues: Using the IoT Hub REST/APIs that are documented in the documentation.

Read more

Long Term Support

The project offers a Long Term Support (LTS) version to allow users that do not need the latest features to be shielded from unwanted changes.

A new LTS version will be created every 6 months. The lifetime of an LTS branch is currently planned for one year. LTS branches receive all bug fixes that fall in one of these categories:

  • security bugfixes
  • critical bugfixes (crashes, memory leaks, etc.)

No new features or improvements will be picked up in an LTS branch.

LTS branches are named lts_mm_yyyy, where mm and yyyy are the month and year when the branch was created. An example of such a branch is lts_07_2017.

Schedule1

Below is a table showing the mapping of the LTS branches to the packages released

NPM Package Github Branch LTS Status LTS Start Date Maintenance End Date Removed Date
1.x.x lts_07_2017 Active 2017-07-01 2017-12-31 2018-06-30
  • 1 All scheduled dates are subject to change by the Azure IoT SDK team.

Planned Release Schedule


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.