Skip to content

Commit

Permalink
Merge pull request Seeed-Studio#1162 from KasunThushara/docusaurus-ve…
Browse files Browse the repository at this point in the history
…rsion

ADD: N3uron and AWS in edgebox rpi 200
  • Loading branch information
MatthewJeffson authored May 7, 2024
2 parents aac5567 + 66284b8 commit d90698b
Show file tree
Hide file tree
Showing 4 changed files with 484 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
description: Connect AWS IoT Core with N3uron
title: Connect AWS IoT Core with N3uron
keywords:
- Edge Box Rpi 200
- Getting started
- IIoT
- Industrial
- N3uron
- AWS
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /Edgebox-Rpi-200_N3uron_AWS
last_update:
date: 5/2/2024
author: Kasun Thushara
---
## Introduction

We have outlined the process of transmitting data from your [Edge Box RPi 200 device to AWS IoT Core using the MQTT protocol](https://wiki.seeedstudio.com/Edgebox-rpi-200-AWS/). This tutorial will seamlessly integrate with the aforementioned process. In this tutorial, we will delve into the intricacies of interfacing between the N3uron Edge IIoT platform and AWS IoT Core.

## Prerequisites

### Hardware

<div class="table-center">
<table class="table-nobg">
<tr class="table-trnobg">
<th class="table-trnobg">Edge Box RPi 200</th>
</tr>
<tr class="table-trnobg"></tr>
<tr class="table-trnobg">
<td class="table-trnobg"><div style={{textAlign:'center'}}><img src="https://media-cdn.seeedstudio.com/media/catalog/product/cache/bb49d3ec4ee05b6f018e93f896b8a25d/1/-/1-102991599_edgebox-rpi-200-first.jpg
" style={{width:300, height:'auto'}}/></div></td>
</tr>
<tr class="table-trnobg"></tr>
<tr class="table-trnobg">
<td class="table-trnobg"><div class="get_one_now_container" style={{textAlign: 'center'}}><a class="get_one_now_item" href="https://www.seeedstudio.com/EdgeBox-RPi-200-CM4104016-p-5486.html">
<strong><span><font color={'FFFFFF'} size={"4"}> Get One Now 🖱️</font></span></strong>
</a></div></td>
</tr>
</table>
</div>



### Software

We highly recommend studying the [Getting Started with N3uron](https://wiki.seeedstudio.com/Edgebox-rpi-200-n3uron/) guide. It provides essential insights into navigating the N3uron web interface, understanding concepts such as the Web UI and Web Vision module, grasping the concept of tags, and creating basic dashboards. If you haven't explored these fundamentals yet, it's advisable to do so before proceeding further. You can access the guide through the provided link.

If you haven't explored our guide on integrating [AWS IoT Core with Edge Box RPi 200](https://wiki.seeedstudio.com/Edgebox-rpi-200-AWS/), we recommend doing so as well. This comprehensive guide covers everything from the basics to the advanced steps of publishing a value to IoT Core. **As it complements the current tutorial, it's beneficial to familiarize yourself with this content too**.

## Configure N3uron IIoT Platform

**Create a Module Instance Within N3uron’s WebUI Interface**

- Step 01: In the **Navigation** panel, select **Config**.
- Step 02: In the **Explorer** panel, select **Modules**.
- Step 03: Click on the **Model** menu and select **New Module**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/createmodel.PNG" /></center>

- Step 04: The instance can be given any name but for the example we will use **MQTT**.
- Step 05: Set the **Module Type** property to **MqttClient**. Leave the rest of the properties as their default values and click **Save**.


<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/selectmodeltype.PNG" /></center>

## Configure N3uron’s MQTT Module within the WebUI’s Explorer Panel

- Step 01: In the **Explorer** panel, select the **MQTT** instance you have just created.
- Step 02: Click on the Model menu button and select **New Connection**.
- Step 03: Give the New connection a name. In this example, it has been named **AWS**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/AWSconnection.PNG" /></center>

- Step 04: Configure the connection properties:

- A: Select **Amazon Web Services** from the **Destination Broker** drop down menu. **Authentication mode** will be **Certificate**. Also **Client Id** is **N3uron** in this example.
- B: Load the **Certificate, Private key and CA certificate** you downloaded and saved when you created the Thing in the AWS IoT Console.
- C: In the AWS IoT console, in the left-hand menu, go to **Settings** and copy your **Device Data Endpoint**. Go back to N3uron and paste it in the **Broker URL** field.
- D: Leave the rest of the properties as their default values and click on **Save**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/AWSconfig.PNG" /></center>

## Subscribe to a Topic Using N3uron’s MQTT Module

- Step 01: In the **Model** panel, right-click on the **AWS** Connection, select **New Subscriber**, and give it a name. In this example, we will simply use **Subscriber**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/newsubscriber.PNG" /></center>

- Step 02: Click on it and add a name in the Topic field. In this example, we have used device/data.(In our AWS tutorial , we have published data under this topic.)

- Step 03: Set the following properties using the values shown below, leaving the rest of them as their default values:
- **Qos**: Qos 0.
- **Encoding**: UTF8
- **Compression**: None
- **Serialization**: JSON
- **Data parser/Type**: MqttClient JSON

And Save it.
<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/Subscriberconfig.PNG" /></center>

## Create a Tag
- Step 01: Within the **Explorer panel**, select **Tags**.
- Step 02: In the Model menu, right-click on the folder icon, select **New Tag**, and give it a name. In this example, we will use **Subscribed_value**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/newtag.PNG" /></center>


- Step 03: In the Configuration panel, set the following properties using the values shown below, leaving the rest of them as their default values:
- **Type**: Number.
- **Source/Enabled**: Yes
- **Module Type**: MqttClient
- **Module name**: MQTT
- **Config/Subscriber**: AWS/Subscriber

- Step 04: Click on **Save**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/tagconfig.PNG" /></center>

After you run the python script which we provide on AWS IoT and Edge Box RPi 200 and AWS IoT.
Go back to the N3uron WebUI interface and in the left-hand panel, select **Data/Real Time**. You should now see the **Subscribed_Value** tag you created before with a value.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/realtimedata.PNG" /></center>

## Visualization

If you have create a webvision module you can start this steps.

- Step 01: Navigate to **WebVision** in the **Config** section and click on **Open Designer**. Log in using your Administrator credentials.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/wenvision.PNG" /></center>

- Step 02: In the Templates section, create a new Container named as you wish. Then, designate this container as the startup. This will set this as our initial WebVision screen. It will appear with an asterisk symbol (*) beside it.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/webvison.PNG" /></center>

- Step 03: Change the background color of the container.

<center><img width={400} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/colorchabge.PNG" /></center>

- Step 04: Inside the Main container, navigate to **Components** and add a new component. For this example, select the **Label** component.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/addnewcomp.PNG" /></center>

- Step 05: You can modify the properties of the label for a better appearance.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/changeproperties.PNG" /></center>

- Step 06: Within the **Label component**, select the tag that will provide the values displayed on the Label component.

<center><img width={400} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/selecttag.PNG" /></center>

<center><img width={400} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/taglist.PNG" /></center>

- Step 07: Select tag Property

<center><img width={400} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/tagproperty.PNG" /></center>

- Step 08: Next, navigate to WebVision in the Config section and click on Open UI. Log in using your Administrator credentials.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/reTerminalDM/N3uron/Image_14.png" /></center>

Subsequently, you will witness the ultimate result, which involves updating the label values in accordance with the data subscribed from the cloud.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/N3uron_AWS/output.PNG" /></center>

## Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

<div class="button_tech_support_container">
<a href="https://forum.seeedstudio.com/" class="button_forum"></a>
<a href="https://www.seeedstudio.com/contacts" class="button_email"></a>
</div>

<div class="button_tech_support_container">
<a href="https://discord.gg/eWkprNDMU7" class="button_discord"></a>
<a href="https://github.com/Seeed-Studio/wiki-documents/discussions/69" class="button_discussion"></a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,84 @@ Port: 1883

<div align="center"><img src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/n3uron20.png" alt="pir" width="600" height="auto" /></div>


### Instantiate a WebVision module

**Step 1:** Open N3uron and navigate to the Config menu.

**Step 2:** Click on Modules, then create a new module. This instance can be given any name (except names with special characters like ‘.’, ‘/’, etc.), although users are recommended to name instances in a similar way to the name of the module being instantiated for easy identification. In this example, the WebVision module has been selected and has also been named WebVision.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_5.gif" /></center>

**Step 3:** Navigate to the main configuration of WebVision and choose the appropriate server settings. The default settings should suffice for most use cases. For further details, please refer to the following link: [WebVision Initial Configuration](https://docs.n3uron.com/docs/web-vision-configuration).


<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_6.png" /></center>

**Step 4:** Once the WebVision module has been instantiated, the first step is to assign permissions to the roles previously created in the Roles section of WebUI. By default, two roles exist: Administrator for administrative access and User for regular access. You can add users to these roles or create new ones as needed. Once roles are established, set permissions for Designer and Viewer roles accordingly.
Additionally, establish a Tag filter path for each role. Tag filter path access determines which tags from the tag model will be accessible for visualization by the corresponding role. In this case, we will assign the complete path of the tag model to both roles.


- Administrator:
- Designer: Edit
- Viewer: View
- TagFilterPath:
- Mode: Include
- Path: /
- Regex pattern: .*
- User:
- Designer: None
- Viewer: View
- TagFilterPath:
- Mode: Include
- Path: /
- Regex pattern: .*

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_7.gif" /></center>

- Useful Links

- [Users and Roles Configuration](https://docs.n3uron.com/docs/platform-security-users-and-roles)

- [Access Configuration](https://docs.n3uron.com/docs/web-vision-configuration#access-configuration)

**Step 5:** To test our initial WebVision screen, let's create a tag. Go to the WebUI, select **Config**, and then click on **Tag**. In the **Model** section, click on the menu and choose **New Tag**. Name it **TestTag**, for instance, select the type as **Number**, grant it **Read-Write permission**, initialize it to 0 (optional) and then save the settings.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_8.gif" /></center>

**Step 6:** Next, navigate to WebVision in the Config section and click on **Open Designer**.
Log in using your **Administrator credentials**.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_9.png" /></center>

**Step 7:** In the Templates section, create a new Container named Main. Then, designate this container as the startup. This will set Main as our initial WebVision screen. It will appear with an asterisk symbol (*) beside it.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_10.gif" /></center>

**Step 8:** Change the background color of the Main container.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_11.gif" /></center>


**Step 9:** Inside the Main container, navigate to Components and add a new component. For this example, select the Gauge component.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_12.gif" /></center>

**Step 10:** Within the Gauge component, select the tag that will provide the values displayed on the gauge component.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_13.gif" /></center>

**Step 11:** Next, navigate to WebVision in the Config section and click on Open UI.
Log in using your Administrator credentials.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_14.png" /></center>

**Step 12:** To test our simple design, navigate to the WebUI and select Data > Realtime. Change the value of TestTag. Afterwards, return to the WebVision UI and verify if the value displayed by the Gauge component has been updated.

<center><img width={1000} src="https://files.seeedstudio.com/wiki/Edge_Box/n3uron/Image_15.gif" /></center>


There is much to explore about WebVision to enhance your Edge Box experience. For further details, please refer to our [Knowledge Base on WebVision](https://docs.n3uron.com/docs/web-vision-configuration).


What you've seen is just the beginning. Embrace the limitless possibilities offered by its impressive array of nearly 50 modules. Dare to dream big, innovate, and take your projects to new heights with N3uron's cutting-edge features. For a deeper dive into this powerful platform, visit [https://n3uron.com/](https://n3uron.com/) and embark on an exciting journey of discovery!
Loading

0 comments on commit d90698b

Please sign in to comment.