sensecraft/docs/05-Helium/0-Helium Introduction/README.md

187 lines
11 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Helium Introduction
In this chapter, we will introduce the Helium console controls that we use to get a first impression of the Helium console.
## Using Helium for the first time
If this is your first time using Helium, please refer to this section to complete the registration of your Helium account and the use of the components.
### Register for a Helium account
Enter the [Helium website](https://console.helium.com/), then fill in the email address you want to register, click **Submit**, Helium will send a login email to this email address to complete the registration.
<div align=center><img width = 400 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/105.png"/></div>
Login to your own email, click on the email sent from Helium and go back to the Helium login page to complete your registration. The future login method is the same as this.
<div align=center><img width = 400 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/106.png"/></div>
When you become a new member of Helium and you have device data to send to Helium, you will get **250 DATA CREDITS**. And 1 DC = 24 Byte Packet = $0.00001 USD. Just 250 DCs may not be enough to commission your project. You can choose to get DC from Helium.
### Helium Console - Flows
Flows is a visual-centric view of the key elements in Console and allows users to instantly understand the relationship among devices, functions, and integrations.
When the entire configuration is completed, each key element will be displayed below the Flow column and elements will be connected directly to elements via custom dashed lines.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/107.png"/></div>
There is a **Nodes** tab in the upper left corner of the workspace. Nodes are graphical representations of Console elements and for quick identification are color coded. Connection points are used to create relationships among nodes.
<div align=center><img width = 500 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/108.png"/></div>
Devices: device nodes represent the hardware that is sending the packets. Since devices are the source of data and integrations can only receive data theres only one connection point for edges.
<div align=center><img width = 230 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/109.png"/></div>
Labels: label nodes represent a group of devices with a common.
<div align=center><img width = 210 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/110.png"/></div>
Functions: users can transform and/or parse payloads before sending to an endpoint. Functions can both receive data from devices and continue sending data after taking action to integrations.
<div align=center><img width = 210 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/111.png"/></div>
Integrations: enable devices to customer endpoints over HTTP or MQTT.
<div align=center><img width = 210 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/112.png"/></div>
Edges represent the flow of data from device or label nodes moving from left to right. Edges use connection points create relationships among nodes.
Users can control the flow of device data using edges to provide the following connections from devices/groups of devices (via labels):
- to integrations
- to functions
- to function and on to integrations
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/113.png"/></div>
We can build connections between different nodes by dragging the left mouse button to click on the connection points on both sides of the nodes.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/124.png"/></div>
The Inspector provides the ability to:
- Visually inspect node details
- Make common node configuration changes
- Access node in other areas of Console for more complete edits
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/114.png"/></div>
To access the Inspector simply click a node and different options appear for the following:
- Devices or Labels
- Functions
- Integrations
The Console Debug tool allows you to quickly and easily examine device messages. This enables you to verify and debug issues much more easily without requiring the data to be sent to an application endpoint first. For security and privacy reasons the Debug tool does not persist data. Instead, the 40 most recent events are accumulated from the time the Debug window is opened.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/115.png"/></div>
- For more information about Debug Mode go [here](https://docs.helium.com/use-the-network/console/debug).
- For more information on how to set up Flow in this tutorial, please refer here.
### Helium Console - Devices
Helium Console allows developers to add devices and grab the device identifiers to load onto their device firmware that authenticates and identifies the device for the Helium Network.
To add a device, go to **Devices** and click the **+ Add Device** icon on the top right of the window.
<div align=center><img width = 600 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/116.png"/></div>
!!!Attention
Helium Console users are capped at one Organization and 10 devices for their account.
When prompted, enter a name for your device. Device names do not have to be unique (as every device will be given a unique identifier generated by Console). **DevEUI**, **AppEUI**, and **AppKey** are auto generated by the Helium Console when you create a new device. However, you can input your own **DevEUI**, **AppEUI**, and **AppKey** if your device is already provisioned with these credentials.
- Device EUI - 64-bit end-device identifier, sometimes called Manufacturer EUI
- App EUI - 64-bit application identifier
- App Key - 128-bit AES key, used to secure communication between device and network
<div align=center><img width = 600 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/117.png"/></div>
Once added, you'll see a consolidated view of all your device details, as well as the Activation Method (only OTAA is currently supported) and the LoRaWAN® US Channels used by the Helium Network (which will always be sub-band 2).
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/118.png"/></div>
!!!Note
This initial join process could take up to 20 mins depending on:
- when this transaction (batched with others) gets added to the blockchain
- the overall performance of the blockchain
After the initial join takes place future rejoining of the same device will be much quicker.
- For more details about Helium devices, please refer [here](https://docs.helium.com/use-the-network/console/migrating-devices).
- For information on how to add Grove - Wio-E5 devices to Helium Console , please refer [here](#jump1).
### Helium Console - Functions
With the Decoder Function, users can transform and/or parse a raw payload before it is posted to an endpoint.
<div align=center><img width = 500 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/119.png"/></div>
When a Decoder Function is applied to a device or integration the Decoder Function code is executed on the payload sent by the device. The Decoder Function can be written using custom JavaScript code provided by the user or selected from prebuilt decoders (currently Browan Object Locator and Cayenne LPP).
Console decoders are compatible with The Things Network (TTN) decoders, which are already available for a wide variety of devices.
To begin creating a new function within the Helium Console, select Functions from the left side navigation. Then create a new Function by clicking the Add New Function **+** icon.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/120.png"/></div>
Name your new Function, select "Decoder" as Function Type, and "Custom Script" as Format if you want to enter your own script, or select from the predefined decoders.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/121.png"/></div>
Next we need to enter the JavaScript that will decode our payloads for us. The Script Validator allows you to easily test inputs in hexadecimal form to ensure that your script will run successfully.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/122.png"/></div>
- In addition, to providing a custom decoder a growing list of community-created functions can be found [here](https://github.com/helium/console-decoders).
- For more information on how to create and attach functions, check out our Tips and Tricks video [here](https://youtu.be/UNUOLbIKXww).
- How to write the custom decoder for each sensor in this tutorial can be found here.
### Helium Console - Integrations
Integrations enable devices to connect to pre-configured, cloud-based applications or send data directly over HTTP or MQTT.
To add a new integration, navigate to the **Integrations** page using the left side navigation, click the Add New Integration **+** and then select from the available integrations.
<div align=center><img width = 800 src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/123.png"/></div>
A number indicates that an Integration has been added.
- For a video walkthrough of how to use Integrations, check out our Tips and Tricks video [here](https://youtu.be/lnERw1f7TGE).
- How to add Azure IoT Hub Integration in this tutorial can be found [here](https://wiki.seeedstudio.com/Integrate-into-Azure-IoT-Hub/).
Please continue with the next step of the tutorial [Connecting to Helium](https://wiki.seeedstudio.com/Connecting-to-Helium/).
<table align="center">
<tr>
<td align="cent er"><p style="text-align:center;"><img src="https://files.seeedstudio.com/wiki/Wio-Terminal-Developer-for-helium/helium.png" alt="pir" width="500" height="auto"></p></td>
<td align="left"><strong>Connecting to Helium</strong></br></br>This section describes how to configure Helium so that sensor data can be successfully uploaded to and displayed in Helium.</br></br><a href="https://wiki.seeedstudio.com/Connecting-to-Helium">Let's get started ></a></td>
</table>
## Tech Support
Please do not hesitate to submit the issue into our [forum](https://forum.seeedstudio.com/).
!!!Note
SenseCAP K1100 serves as a gateway to the higher-end SenseCAP LoRaWAN® series of industrial outdoor sensors. Users can prototype multiple AIoT applications with this kit, after which they can scale them up to the robust, long-life, and industrial [SenseCAP sensors](https://www.seeedstudio.com/iot_into_the_wild.html).
<p style="text-align:center"><a href="https://www.seeedstudio.com/catalogsearch/result/?q=sensecap&categories=SenseCAP" target="_blank"><img src="https://files.seeedstudio.com/wiki/K1100/94.png" /></a></p>
## Statement
- The LoRa® Mark is a trademark of Semtech Corporation or its subsidiaries.
- LoRaWAN® is a mark used under license from the LoRa Alliance®.