Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
homechevron_rightBlogchevron_rightIntegrating Waylay with the Blues Notehub

Integrating Waylay with the Blues Notehub

Integrating Waylay with the Blues Notehub banner

July 12, 2023

Learn more about Waylay and how to integrate it within your IoT solution.

  • Data Routing
  • Cloud
Pradeep
PradeepVLSI Chip Testing Engineer
email

I'd like to introduce you to Waylay , an external data routing service that makes "things" smarter than ever.

waylay

Data sharing and visualization are critical components of the IoT. The Blues Notecard is a great option for sending data via cellular directly to Notehub , which is a secure cloud service from Blues. The Blues Notehub allows for routing of Notecard data to external systems:

notehub routing options

note

Use this tutorial to learn more about Notehub data routing.

While we can get the data from Notehub via routes, the data is raw, so we need a broker to visualize it. Depending on the provider, we can visualize the data in many different ways. Waylay is an option that is a bit different from other providers.

What is Waylay?

Waylay is a simple IoT automator that can get data from a physical device or software connectors, and it can help us to visualize data feeds.

waylay integration

While it's similar to other IoT platforms, in Waylay we have access to additional features. Here is a simple walkthrough:

  • Data Connector: A data connector defines where the IoT data comes from. Using Waylay, you can get data from many different endpoints, including sensors, software systems, and other devices.
  • Automation Editor: This allows us to create our action trigger system based on incoming data.
  • Waylay Storage: Waylay comes with a built-in data storage unit. Your data can be saved directly into Waylay's storage bucket.
  • BYOML (Bring Your ModeL): This feature allows you to run Machine Learning or other data science models within the Waylay platform.
  • Waylay Dashboard: The Waylay Dashboard provides a clean and simple UI to display real-time data through a set of widgets.

waylay features

Let's look at how we can integrate Waylay with the Blues Notehub.

Connect Notehub to Waylay

Create a new user account on Waylay . Then we have to associate Data Resources with a particular customer name (customer name is metadata here, which helps us to develop a dashboard).

waylay account

Next, we'll add Webscripts that access our Notehub through an http/https endpoint for data. Add a new Webscript by selecting it from the main menu. Add the following code to the body, giving it the name "Get-Note":

async function handleRequest (req, res) {
  if (!req. body) {
    // No body found
    return
  }

  // Parse body if needed
  let payload = req.body
  if (typeof payload === 'string' || payload instanceof String)
    payload = JSON.parse(payload)

  /*
  You can do some processing of the payload over here.
  */

  // Post values to our resource 
  waylay.data.baseUrl = 'https://data-io.waylay.io'
  await waylay.data.postSeries('replace_with_resource_id', payload, { store: true, forward: true })
    .catch(e => console.error(e.message))

  res.sendStatus(200)
}

This block of code will receive a routed event from Notehub.

waylay event

Copy and paste that Webscript's URL into a new Notehub "General HTTP/HTTPS Request/Response" route:

waylay notehub route

Now, let's simulate sending some Notecard data from the Notecard Simulator:

notecard simulator

Now, keep an eye on the data log from Waylay's resource page:

waylay log

Implementing a Rules Engine in Waylay

The Waylay Rules Engine is made up of many plugs (e.g. sensors or actuators) and the inference engine:

  • Sensors: Software-defined sensors can collect data from both physical sensors and databases or APIs.
  • Actuators: Software-defined actuators that can perform a variety of tasks such as sending messages, emails, and so on.
  • Inference Engine: When a sensor is executed, the Rules Engine infers the outcome, which might lead to the invocation of other sensors or actuators.

The following is an example rule engine template. Depending on your application, you can add as many as you desire.

waylay rules engine

To add a new rule and trigger condition, navigate to the Templates area in your user console and click the Add Template button. Alarms are a handy tool that allows you to examine or monitor abnormalities and alerts based on data.

To create a basic alarm flow, we will be adding the necessary blocks from the blocks menu and then configure them.

  1. Add a Stream block, uncheck execute on tick and check to execute on data, then select your resource of choice.

  2. Add a Condition block, uncheck execute on tick and check to execute on data, then select your resource of choice. In the condition field, write up the condition in the following format

    ${nodes.stream_1.rawData.stream.replace_metric}
  3. Add an alarm block and insert a trigger condition as you want. Our condition looks like this:

    ${nodes.stream_1.rawData.stream.temp}  > 30
  4. Then select the alarm type (CRITICAL, MAJOR, MINOR, or WARNING), and create an alarm type. When you debug, it will display the live data flow.

    waylay alarm

    Consult the Waylay documentation for additional information.

  5. Once your Notehub data is in the Waylay log, go to the Task window and create a new task using the templates you just generated.

    waylay task

  6. The next step is to design some charts to display the data. Go to the explore window and add some charts.

    waylay charts

Now that we have a visual display in our console, let's build a dashboard for an even better view of data.

Creating a Waylay Dashboard

  1. Head to the Waylay Dashboard and log in.

  2. Start a new organization by clicking the plus symbol (+). When creating your Resource, you must have used the same customer name as the name of the company.

    waylay organization

  3. Create a new application dashboard by selecting log in as admin. Then, by clicking the Plus icon, make a new dashboard and user group.

    waylay dashboard and group

  4. Next, navigate to the Config page and add a new device (select the correct device resource). Click the Add Device button.

    waylay add device

  5. After adding the device, enter the Graph window and create various gauges and charts based on your data requirements.

    Choose the widget type, add information, and then pick the widget attributes by clicking the Plus icon.

    waylay widget

Waylay also allows you to share your dashboards using the public dashboard function. It allows you to easily share Notecard data with others.

Here is my example public dashboard:

waylay public dashboard

Conclusion

Data sharing and visualization are dominating the IoT and Waylay provides several unique capabilities and options for improved data routing. We can take Cellular IoT with Blues to the next level with the assistance of Waylay.

In This Article

  • What is Waylay?
  • Connect Notehub to Waylay
  • Implementing a Rules Engine in Waylay
  • Creating a Waylay Dashboard
  • Conclusion

Blues Developer News

The latest IoT news for developers, delivered right to your inbox.

Comments

Join the conversation for this article on our Community Forum

Blues Developer Newsletter

The latest IoT news for developers, delivered right to your inbox.

© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your 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.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up