Support
Blues.io
Notehub.io
Shop
Support
Blues.io
Notehub.io
Shop
×
HomeBuild
Hookup Guide
Quickstart
Tutorials
Sensor Tutorial
Route Tutorial
Notecard Guides
Asset Tracking
Serial-Over-I2C Protocol
Updating ESP32 Host Firmware
Configuring ESP32 Attention Pin
Understanding Environment Variables
Routing Guides
Twilio Route
MQTT Route
Azure Function Route
ThingWorx Route

ThingWorx Route

Notehub.io supports routing data to ThingWorx using the ThingWorx API Route type. This guide provides instructions for using this Route type in your Notecard applications.

Prerequisites

In order to follow the instructions in this guide, you'll need the following:

  • A Notecard assigned to a Notehub.io project, with data synching from the Notecard to Notehub.io.
  • A ThingWorx Developer account, ThingWorx server and a Service that can accept telemetry from the Notecard and update properties on a developer-defined "Thing." See the ThingWorx Getting Started Guide for learning paths and resources for creating and configuring a ThingWorx server.

The ThingWorx API Route Type

To create an ThingWorx Route, choose the "ThingWorx API" option in the "Route Type" dropdown on the Notehub.io Route creation screen. You'll also need to create and provide a ThingWorx AppKey when defining the Route.

ThingWorx Route Options

Provide the endpoint to your ThingWorx Service, which should be in the form of https://<thingworxserver>/Thingworx/Things/<thing_name>/Services/<service_name>, in the "Route URL" field. Set the remaining configuration fields to restrict this Route to a Fleet or Notefile, transform the outbound payload, or to rate-limit Route execution.

The transformation required depends on the specific configuration of your ThingWorx Service. For example, the JSONata transformation above assumes that the ThingWorx Service expects a JSON object called telemetryBody with three fields, temp, humidity, and orientation.

ThingWorx Service Definition

Verify a ThingWorx Route

Once you've created a ThingWorx Route in Notehub.io, you can verify that it is working through the Notehub Events table.

Notehub.io provides a Route Log for each event. To access it, click on an individual event on the Events view, then click the "Details" link.

The Notehub Events Screen

Then, click on the "Route Log" tab.

The Route Log tab in Notehub

If your Route is properly configured, the ThingWorx Service will return a status code of 200 and the response specified in the source of your Function.

Example of a successful Route

If the server returns an error, Notehub.io will display error details in the Route Log.

Example of a failed Route

From your ThingWorx dashboard, you can confirm that the Service was successful by visiting the properties page for your Thing. The latest property values should correspond to the last routed event from Notehub.

Updated Thing Properties

Can we improve this page? Send us feedbackRate this page
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
© 2021 Blues Inc.Terms & ConditionsPrivacy
blues.ioTwitterLinkedInGitHubHackster.io
Disconnected
Disconnected
Having trouble connecting?

Try changing your Micro USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Connect a NotecardClick 'Connect' and select a USB-connected Notecard to start issuing requests from the browser.