Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

gomobile/iotapp-hub-to-device

Repository files navigation

Intel® XDK IoT Node.js* Hub to Device App

See LICENSE.md for license terms and conditions.

This sample application is distributed as part of the Intel® XDK. It can also be downloaded or cloned directly from its git repo on the public Intel XDK GitHub* site.

For help getting started developing applications with the Intel XDK, please start with the Intel XDK documentation.

See also, the mraa library documentation for details regarding supported boards and the mraa library API and the upm library documentation for information regarding the upm sensor and actuator library APIs.

App Overview

This sample app demonstrates how to retrieve data from the Microsoft Azure Hub. This app assumes you have run the "IoT Device to Hub App" and stored collected data in your Microsoft Azure Hub account, which this app will retrieve and display on the Node.js console.

NOTE: You can get your Microsoft Azure Hub membership by going to the Azure Portal. For this app you do not need a full subscription to the service - you can use the free trial. For a detailed tutorial on how to setup your Azure IoT hub, see: Setup Azure IoT Hub

Getting Started

Download and unzip a copy of the project files and put it into an easily accessible folder on your workstation.

  • Start the Intel XDK and select "Open an Intel XDK Project” from the Projects tab (see the image below).

  • Locate the folder that contains the "IoT-Hub-to-Device" project you downloaded and unzipped and select the file with the .xdk extension.

How to open an Intel XDK project

Modifying the Source Files

Modify the connection.json file to specify the connection string information that is unique to your hub. The information shown below will not work, you must change it to match your IoT hub connection identification information:

{
    "HOST_NAME": "your-hostname",
    "SHARE_ACCESS_NAME": "shared-access-key-name",
    "FIRST_KEY": "shared-access-key"
}

To get your shared access key, goto your IoT Hub > Shared Access Policies > IoT Hub Owner > Connection String - Primary.

Share Policies Page Key Page

Running the Project

After all hardware and software configuration are complete, be sure to configure your IoT board's network interface so it has access to the Internet.

Important App Files

  • main.js
  • package.json
  • connection.json

Important Project Files

  • README.md
  • LICENSE.md
  • <project-name>.xdk

Tested IoT Node.js Platforms

This sample should run on any IoT Node.js development platform, because it does not require any sensor hardware.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published