Skip to main content
All CollectionsConnect your Devices
Learn how to connect Blues Wireless' Notecard-powered App to Ubidots
Learn how to connect Blues Wireless' Notecard-powered App to Ubidots

Learn how to connect your Notecard-powered app to Ubidots

Sergio M avatar
Written by Sergio M
Updated over 3 months ago

For all the IoT Entrepreneurs and developers looking for a fast path to build and deploy cellular-connected products, the Notecard is a great option.

This product works with any device, from 8-bit microcontrollers to the latest microprocessors and single-board computers.

Follow this guide to connect your Notecard and easily visualize and create your own App with Ubidots.

Requirements

This tutorial assumes you’ve already completed the initial Sensor Tutorial to capture sensor data, and save it in a Notefile called sensors.qo and send that data through the Notecard to Notehub; or, that you’ve already created your own app with sensor data and are ready to connect your app to Ubidots.


1. Create an Ubidots Router

A Route is an external API, or Server location, where Notes will be forwarded for a Device or Fleet upon receipt. Routes are defined in Notehub for a Project and can target a single Fleet or all devices in a Project. A Project can have multiple routes defined and active at any one time. Before you create a Route, ensure the data you want to route is available in Notehub, by navigating to the Events view.

Step 1: To send data to your Ubidots from Notehub, you'll need your Ubidots account token. Go to your Ubidots account and click on your profile, choose the API Credentials option, and copy your default token for the next steps.

image.png

Step 2: Back in Notehub, open the Routes dashboard and click the Add Route button.

image.png

Step 3:Give the Route a name, keep the Route Type default (General HTTP/HTTPS Request/Response), and choose to add Additional Headers. Add a header name of X-Auth-Token with a value of the default token you copied earlier.

Step 4: For the Route URL, enter https://industrial.api.ubidots.com/api/v1.6/devices/[device], this portion of the URL: [device] allows you to identify the DeviceUID from NoteHUB and create a new device in Ubidots named with the same DeviceUID.

Notehub provides a lot of information in each Route request. You may want to trim down what you send to Ubidots or transform the payload to adhere to a format expected by Ubidots' API. Either way, Notehub supports shaping the data sent to a Route using JSON data.

Step 5: In the Notefiles dropdown, choose "Select Notefiles" and enter the name of the notefile to monitor. Then, in the Transform JSON option, select JSONata Expression and enter the following expression.

{"temperature":{"value": body.temp , "timestamp": when * 1000}}

Step 6: Click Save and navigate back to your Ubidots dashboard. If everything is wired up correctly, the default data visualization will update with the temperature and humidity readings sent from Notehub.

image.png

2. Data visualization / Dashboard Creation

Now it’s time to build your own dashboard to start monitoring the data from your devices.

  1. Go to the Dashboard (Data -> Dashboard) section of your Ubidots account.

  2. Select the plus (+) icon located a the right-upper side of the page, then select the widget types desired to display in your Ubidots’ Dashboard.

You can customize your Dashboards and application in just a few clicks, please refer to the following guides to learn how:

Did this answer your question?