Attention - INTERNATIONAL customers, USPS shipping services, including Express Mail continue to experience extended service delays.
We STRONGLY advise shipping using UPS for all URGENT orders. Click on the link to set up freight collect options for your account. Dismiss

You are using an unsupported browser!

Please upgrade your version of IE to at least 9, or use a modern browser such as Chrome or Firefox.

Amazon® AWS® IoT WiFi Temperature/Humidity

WiFi Temperature Humidity Sensor for AWS

SETUP INSTRUCTIONS

INTRODUCTION

The NCD AWS IoT WiFi Temperature Humidity sensor was developed for industrial applications where WiFi is available.  Great care was taken to ensure this device is easy to configure and use so even IoT beginners can set it up.  This guide will thoroughly explain the setup and initial use of the sensor.

AWS Account Setup

The first thing to do is to create an AWS account. If you do not already have one, you can do this at https://aws.amazon.com  Once you have created your AWS you may proceed through the rest of this section.

To make setup and use of the NCD AWS IoT Sensor as fast and pain free as possible we use IAM credentials which allows the Sensor to provision itself on AWS IoT.

Go to: https://aws.amazon.com and go to My Account in the top right corner, Select AWS Management Console, then login to your AWS account.

Now in AWS Services search for IAM, then click IAM to open the IAM console.

In the IAM console we need to first create a new Policy which the NCD AWS Sensor will use to provision itself on AWS IoT.

To do this select Policies in the left menu. The Policies Dashboard will list many default policies but we will be creating a new one so click the Create Policy button.

In the Create Policy Dashboard we first need to select the service.  Search: IoT,  then click IoT to select that service for this Policy.

Now we can select the actions this Policy will allow access to.  For simplicity’s sake select All IoT Actions(iot:*). If you are experienced with AWS please feel free to be more explicit as to the Actions allowed on the Policy.

Under Resources select All Resources.  Once again if you are experienced with policy creation feel free to be more explicit.  Finally click Review Policy.

In the Review Policy Window you can enter a name for your Policy, a description and review the summary. If you followed the instructions above it should look similar to this (except for the name and description, which would be the information you entered).  Be sure to take note of the Name you enter here as we will need to reference that later.

Once you are satisfied click Create policy.

After clicking Create Policy you will be taken back to the IAM Management console.  Click Users on the left to create a new IAM user.

This will start the “wizard” for creating an IAM User.  Enter a name for this IAM user and select Programmatic access under Access Type, then click the Next:Permissions button.

Now we will attach the Policy just created to this IAM User.  Click the Attach existing Policies directly box at the top, then in the filter policies search box type in the name you entered for the Policy. Once it appears click the checkbox to select it, then click the Next: Tags button.

Nothing needs to be entered on the Add Tags page so click Next: Review.

On the Review page you can observe your information and ensure everything is correct.  If it is, click Create user.

On the final page we see the user credentials. It’s very important to understand that once you leave this page you will never be able to get the IAM Secret Access Key again. You absolutely must copy it down in a text editor or it will be gone forever and you’ll need to create the IAM User again. Once it’s copied click the Show link under Secret access key and copy the key that appears as well. We will need these credentials to setup the Sensor. Once you are sure you have secured those credentials click the close button.

We are now done with the AWS browser window and it can be closed if you choose.

AWS IoT Sensor Setup

In this section we will configure the NCD AWS IoT Sensor. 

Make sure your NCD AWS IoT Sensor is in setup mode which is indicated by a flashing blue LED.  If not in Setup Mode Press and hold the C Button on the Module inside the Enclosure Until the LED turns Blue.  

Once it is in setup mode open the WiFi network preferences on your computer and scan for WiFi networks.  The Sensor should show up in the WiFi network scan as NCD_AWS_Sensor. Select NCD_AWS_Sensor.

When prompted for a password enter: NCDBeast

Once connected to the Sensor a browser window will appear on your screen.  If for some reason this browser window does not appear open your browser and enter the IP address 172.217.28.1 then press enter. This Browser interface will allow you to Configure the Sensor.

Click WiFi.  Enter information about the WiFi Network you would like the sensor to connect to.  Note that this network will need to have internet connectivity.  If your WiFi Network does not broadcast it’s IP address then enter it’s SSID into the Hidden Network field.  DHCP or Static IP is optional.

Click Soft AP.  Here you can optionally change the Soft AP SSID and Password for the sensor.  This is not required but some users may find it useful.

Click AWS IAM.  

  • Enter the Key and Secret you obtained in step 12 above.  
  • Select the Region your AWS Account is hosted in.
  • It is possible to customize the Topic the sensor reports sensor telemetry data to.  This is entered in the Cloud Topic Format Field.  Token replacement is implemented for ::Sensor_Type:: and ::Sensor_ID::  Sensor_Type is a number representing the type of sensor.  Sensor_ID will be the MAC address of the sensor.  Leave this field blank to report data only to the Thing Shadow.
  • Interval is the Interval in milliseconds that the sensor reports it’s telemetry data to AWS.

Click Save Settings.  The Sensor will now save your settings and will reboot.  The LED will begin flashing Yellow after reboot.  If the sensor is able to connect to AWS successfully the LED will begin flashing Green.  If the LED flashes Red then check all of the settings entered in the Sensor.  If the LED flashes Yellow for more than 1 minute it indicates it is unable to connect to the WiFi network.

Testing

The best way to make sure the setup was performed correctly is to visualize some information on AWS IoT.  If you closed your AWS browser earlier then you’ll need to open it again. 

Reopen your AWS Management Console and search services for IoT Core, then select it.

From the IoT Core Dashboard click Manage on the left, then select Things. If completed correctly you will see a device listed here which is your new NCD AWS IoT Gateway.  

Note the name of the device (Thing) in the panel. You will need this in a future step so write it down. In the screenshot my Thing’s name, as AWS calls it, is: FCF5C43E7188.

 Click on the name to access its interface.

From the Thing’s Interface select Activity from the left menu, then from that page select MQTT Client.

Here I will enter Office/# into the Subscription Topic Field to listen to any devices that publish to a topic that begins with Office. This is because earlier on step 18 I entered /Office/::Sensor_Type::/::Sensor_ID:: into the Cloud Topic Format field. 

What you enter in the Subscription Topic Field will depend on what you entered in Step 18.  We recommend reviewing AWS Documentation Here for more info on Topics.  Once you have your Subscription topic entered click Subscribe to Topic.

This will open the monitoring console which will show a stream of information coming in from the NCD AWS IoT WiFi Temperature Humidity Sensor.

When Data appears here, setup of the sensor and AWS is complete.

Configuration through AWS IoT Thing Shadow

It’s possible to configure most of the Sensor’s settings through the AWS IoT Thing Shadow.  This allows the user to configure settings remotely through the Cloud.  We will cover this capability in this section.

Open your AWS Management Console and search services for IoT Core, then select it.

From the IoT Core Dashboard click Manage on the left, then select Things.  If completed correctly you will see a device listed here which is your new NCD AWS IoT Gateway.  Note the name of the device (Thing) in the panel, you will need this in a future step so write it down. In the screenshot my Thing’s name, as AWS calls it, is: FCF5C43E7188.

 Click on the name to access its interface.

From the Thing’s Interface select Activity from the left menu, then from that page select MQTT Client.

Scroll down until you see the Publish section of the MQTT client interface. There are two fields here, the Topic field which is a single line with the Publish to Topic Button to the right and a message payload field which is the large Blue box below the Topic field.  

In the Topic field you will want to enter your device’s Shadow Topic which will be in the format $aws/things/thing_name/shadow/update where thing_name would be replaced with your device’s thing name.  My thing’s name is FCF5C43E7188 so my shadow topic is $aws/things/FCF5C43E7188/shadow/update. 

In the message payload field you will enter the settings you want to alter in JSON format.  I for instance am changing the report interval of the sensor to 10 seconds(10000 milliseconds).  Finally click Publish to topic to write those settings to the sensor.

Configurable Settings

The following settings may be configured through the thing shadow in JSON format:

  • interval
    • variable type: number
    • description: the interval at which the sensor will publish it’s telemetry to AWS IoT Core.
    • example: {“interval”:10000}
  • ssid
    • variable typestring
    • description: the SSID of the WiFi network which the sensor should associate with on boot.
    • example: {“ssid”:”my_wifi”,”ssid_password”:”super_secure”}
  • ssid_password
    • variable typestring
    • description: the password required to associate with the WiFi network.  Leave blank if network is unsecure.
    • example: {“ssid”:”my_wifi”,”ssid_password”:”super_secure”}
    •  
  • ap_pass
    • variable typestring
    • description: the password required to connect to the sensor’s soft AP network for configuration.
    • example: {“ap_pass”:”NCD_AWS_Sensor”,”ap_pass”:”NCDBeast”}
  • ap_ssid
    • variable type: string
    • description: the broadcast SSID used by the sensor when in configuration/soft AP mode.
    • example: {“ap_pass”:”NCD_AWS_Sensor”,”ap_pass”:”NCDBeast”}
  • dhcp_enabled
    • variable type: 1 or 0
    • description: configures whether or not dhcp utilized to obtain an IP from the network determined by the ssid setting.  1 is enable 0 is disable.
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • static_ip
    • variable typenumber array [192,168,0,2]
    • description: setting ignored if dhcp variable set to 1.  The IP address to use when associating with the WiFi Network configured by the ssid setting.
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • default_gateway
    • variable typenumber array [192,168,0,1]
    • description: setting ignored if dhcp variable set to 1.  The default gateway to use when associating with the WiFi Network configured by the ssid setting
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • subnet_mask
    • variable typenumber array [255,255,255,0]
    • description: setting ignored if dhcp variable set to 1.  The subnet mask to use when associating with the WiFi Network configured by the ssid setting
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • dns_primary
    • variable typenumber array [8,8,8,8]
    • description: setting ignored if dhcp variable set to 1.  The dns primary to use when associating with the WiFi Network configured by the ssid setting
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • dns_secondary
    • variable typenumber array [8,8,4,4]
    • description: setting ignored if dhcp variable set to 1.  The dns secondary to use when associating with the WiFi Network configured by the ssid setting
    • example: {“dhcp_enabled”:0,”static_ip”:[192,168,0,4],”default_gateway”:[192,168,0,1],”subnet_mask”:[255,255,255,0],”dns_primary”:[8,8,8,8],”dns_secondary”:[8,8,4,4]}
  • region
    • variable typestring
    • description: The AWS region used to connect to AWS IoT.
    • example:{“region”:”us-east-2″,”i_am_key_id”:”alsdfhoiaoibyadfe”,”i_am_secret_key”:”XXXXXXXXXXXXXXXXXXXX”}
  • i_am_key_id
    • variable_type: string
    • description: the AWS IAM credential key used to provision itself to AWS IoT Core.  If this variable is altered old TLS credentials will be discarded and the device will retrovision itself using the IAM credentials provided.
    • example:{“region”:”us-east-2″,”i_am_key_id”:”alsdfhoiaoibyadfe”,”i_am_secret_key”:”XXXXXXXXXXXXXXXXXXXX”}
  • i_am_secret_key
    • variable_type: string
    • description: the AWS IAM credential secret used to provision itself to AWS IoT Core.  If this variable is altered old TLS credentials will be discarded and the device will retrovision itself using the IAM credentials provided.
    • example:{“region”:”us-east-2″,”i_am_key_id”:”alsdfhoiaoibyadfe”,”i_am_secret_key”:”XXXXXXXXXXXXXXXXXXXX”}
  • user_topic_format
    • variable_typestring
    • description: The topic format utilized to publish telemetry data to AWS IoT.  If this field is left blank then the sensor will only publish telemetry data to the shadow topic.  This field supports token replacement.  ::Sensor_ID:: will be replaced with the sensor’s Mac address.  ::Sensor_Type:: will be replaced with the sensor’s type which is a number.
    • example: {“user_topic_format”:”Office/::Sensor_Type::/::Sensor_ID::”}

Notes

Factory Reset

To Factory reset your sensor to default settings first put the sensor into Setup Mode(LED flashing blue) then simply press and hold the C button inside the enclosure adjacent to the USB Micro connection for 4 seconds until the on board LED begins flashing random colors.  Factory default settings will be applied and the sensor will reboot in setup mode.

On board RGB LED indicator

Flashing Green: Indicates the Sensor is powered up, connect to WiFi, and has a valid connection to AWS IoT.

Flashing Yellow: Indicates the Sensor is booting up.

Flashing Blue: Indicates the sensor is in setup mode.

Flashing Random Colors: Indicates the sensor is applying factory default settings.

Flashing Red: Indicates an error. The LED will flash a sequence which indicates the type of error. as follows

  •  Repeated two red flashes indicates the sensor is unable to associate with the WiFi Network.  Try moving the Sensor closer to the WiFi access point and ensure settings stored in sensor are correct.
  • Repeated three red flashes indicates the sensor is unable to connect with AWS IoT.  Ensure the WiFi network has internet connectivity and AWS IAM credentials are correct.

©2019 National Control Devices, LLC

ncd.io

Made in the USA
5 Year Warranty
Free Shipping on orders over $100
Free Shipping on orders over $100

To learn something new, take the path that you took yesterday. ~John Burroughs

*

Log in with your credentials

or    

Forgot your details?

Create Account