In this quick tutorial, we will cover “How to Configure a Virtual Device”. This tutorial is arguably one of the most important tutorials in this series. In order to have Catenis Flow connect to the Catenis APIs on the sandbox environment, you first need to configure your virtual device and add your virtual device’s credentials in Node-RED as a “configuration node”.
In this video we will cover:
Prerequisite
Thank you for watching How to Configure a Virtual Device in the Catenis Flow tutorial series. Watch the next video, Testing Your Virtual Device Configuration, to further expand your knowledge.
Links from this video for easy access:
To sign up for your free account, head to our website www.blockchainofthings.com.
Join our community forum for the quickest response time to all your questions and concerns. This forum is our customer support. https://forum.blockchainofthings.com/
[Music]
Hi, this is Claire for Blockchain of Things.
Today, we will configure a Virtual Device on Catenis Flow, so you can interact directly with the blockchain.
In order to complete this tutorial, you must have first signed up for an account at blockchainofthings.com
and installed the Catenis Flow palette into Node-RED.
To install the Catenis Flow palette, check out the video at this link:
You’ll also need to have created a Virtual Device which you can learn how to do by watching the video at this link:
If you’ve done these three things, then you’re ready
to proceed with this tutorial.
Ready? Let’s begin.
First, we’ll need to get your Virtual Device ID
and your API Access Secret.
If you have enrolled into a free Development Account, log in to sandbox.catenis.io
Alternatively, if you have a Production License, log in to catenis.io.
Click on the manage Virtual Devices button.
Identify the device ID corresponding to the device you wish to use, and click on the hyperlink on the device ID.
Copy this ID for later.
Click on the API Access Secret button.
Your access secret will be displayed in the popup.
Copy the device’s API Access Secret to be used in the next step.
Note that, you must not use information from the API access section listed on the left navbar.
Unless you created your device to share secret keys.
You must use the information from the
Virtual Devices section, as just described.
Virtual Devices are created in Node-RED by
setting up a Configuration Node.
A Configuration Node is a special type of node that holds reusable configuration information that can be shared by nodes in a flow.
Once a Virtual Device is created in Node-RED
via a Configuration Node
This node will be available for use by all Catenis Flow Nodes.
Let’s set up our first Configuration Node
with the Virtual Device information.
Drag any Catenis Node into your workspace and double-click it.
This will expand the properties dialog box for the Catenis Node.
The slide-out dialog box contains all of the possible configurations for the specific node.
To create a new device, click on the pencil button,
to add a new Configuration Node through the flow.
Note, that a server error message may show up.
Ignore this message.
It simply means that the node is trying to
communicate with the server,
but cannot, because the node has not yet been configured.
Enter a name in the name field.
Enter your Virtual Device ID in the Device ID field.
Enter the API Access Secret in the API Access Secret field.
Click the add button.
The populated slide-out will show up again.
Uncheck the encrypt checkbox.
Make sure that the encrypt option is unchecked.
As we need to see the transaction on the Bitcoin Blockchain
to ensure it is working correctly.
For testing, let’s also disable the off-chain message option by unchecking this option,
so a bitcoin transaction is immediately created,
so we can later check for proper connectivity to the blockchain in a timelier fashion.
Note, that when building an application you should always use off-chain messages.
Standard messages incur higher fees,
cost more Catenis Credits,
and create unneeded bitcoin transactions.
Now, click the done button and click deploy.
Now, your Virtual Device is configured within Node-RED.
Check out our next video to learn how to test connectivity to the Catenis APIs via Catenis Flow and interact directly with the Bitcoin Blockchain.
[Music]