The Red Lion FlexEdge (DA50A and DA70A) runs Crimson 3.2, which has a built-in Ubidots MQTT connector. Enable the connector, enter industrial.api.ubidots.com, a device name and your Ubidots token, set the transport to TLS and add tags to a tag set. Each tag then arrives in Ubidots as a variable on one device, refreshed at the tag set's update rate.
This guide builds a small test database on a FlexEdge DA70A and sends three tags to Ubidots. The same connector settings work on every Crimson 3.2 device: Graphite and CR1000/CR3000 HMIs and the DA10D/DA30D.
What the Ubidots MQTT connector does
The Ubidots MQTT connector is one of the cloud connectors in Crimson 3.2, next to the Generic, Amazon, Azure, Google and Sparkplug MQTT connectors. The connector publishes the tags in its tag sets to one Ubidots device over MQTT. Ubidots creates the device and one variable per tag on the first message, plus a connected variable that reads 1 while the device is online. The connector sends numeric data only: send flags as 1 or 0, because string tags are not transmitted.
Requirements
A Red Lion FlexEdge DA50A or DA70A with software Group 2 or higher. Group 2 enables the cloud connectors; this guide uses Group 3 because step 4 checks the connection in the web server.
Crimson 3.2, build 3.2.0014.0 (October 2020) or later. The Ubidots connector arrived in that build.
An Ubidots account and your Ubidots token.
A network that lets the FlexEdge reach industrial.api.ubidots.com on port 8883 (TLS) or 1883, with a default gateway and DNS servers.
Where do I download Crimson 3.2 and its manual?
HMS Networks now publishes Red Lion's software. Download Crimson 3.2 from the HMS Crimson 3.2 download page; the download is free, and HMS asks for your name, company and email first. The Crimson 3.2 Software Guide (LP1153) covers the Ubidots MQTT connector in chapter 24, "Using Connectors", on pages 297 to 299.
Which Red Lion devices support the Ubidots connector?
Every device that Crimson 3.2 programs can run the Ubidots MQTT connector, as long as its software group is 2 or higher. Only the FlexEdge lets you choose its group; the other devices have a fixed group, listed in HMS's Crimson 3.2 Unified Release FAQ. The DA10D runs Group 2, so it has no web server: check its connection in Ubidots instead of Remote View.
Device | Software group | Ubidots connector | Web server |
FlexEdge DA50A / DA70A | Selectable, 1 to 4 | Group 2 and up | Group 3 and up |
Graphite HMIs | 3 | Yes | Yes |
CR1000 / CR3000 HMIs | 3 | Yes | Yes |
DA30D | 3 | Yes | Yes |
DA10D | 2 | Yes | No |
On other devices, only File → New and the Ethernet port names change. To read Modbus devices with a DA10D or DA30D, follow the DA10D/DA30D setup guide.
1. Create the Crimson database for your FlexEdge
A Crimson database is the project file that Crimson builds on your PC and downloads to the device. The database holds the hardware settings, data tags, connectors and display pages. In Crimson 3.2, click File → New, open FlexEdge under Models and choose DA50 or DA70. Set Variant to your model, for example DA70A0F, and Group to Group 3 - Full Crimson Functionality.
Under Device Configuration → System Configuration → Network → Interfaces, open Ethernet 1 and put the port on the same subnet as your PC. Configured via DHCP works; if you set a manual address, also set a gateway and DNS servers, or the FlexEdge can't resolve the Ubidots host name.
Under Services → Time Sync, leave the time zone and NTP settings on Automatic. An accurate clock timestamps the data and lets TLS validate certificates.
Click Link → Options, select TCP/IP and enter the FlexEdge's IP address. Crimson downloads the database to that address.
2. Create test tags and a display page
The test database uses four numeric data tags. Tag1 counts display ticks, Tag2 counts display updates, Tag3 takes a value typed in by hand and Status shows the connector state. Tag1 to Tag3 go to Ubidots in step 3; Status stays on the FlexEdge.
Open Data Tags, click New Tag four times and rename Tag4 to Status.
Open Display Pages, delete the Hello World text, and drag the four tags from the Resource Pane onto the page.
Select Tag3 and check Data Entry in the floating toolbar, so you can type its value.
Right-click the page, choose Properties → Actions, enter Tag1++ in On Tick and Tag2++ in On Update, and click OK.
Open Web Server. Keep Enable Web Server on with Transport Protocol TLS-HTTPS, and on the Features tab set Remote Control to Enabled.
3. Configure the Ubidots MQTT connector
Open Communications and select Ubidots MQTT under Connectors. The connector's Service tab holds the Ubidots settings, the Network tab holds the transport, and each Tag Set tab lists the tags to publish. Set the Service tab as follows.
Section | Field | Value |
Control | Enable Agent | Yes |
Operation | Update Mode | Send Changes |
Operation | Reconnection, Data Buffering | As your application needs (see the FAQ) |
MQTT Server | Host Name 1 | industrial.api.ubidots.com |
Data Topics | Device Name | The Ubidots device label, for example flexedge: lowercase letters, numbers, dashes or underscores |
Authentication | Access Token | Your Ubidots token |
Diagnostics | Status | Drag in the Status tag |
The Ubidots broker accepts MQTT at industrial.api.ubidots.com on port 8883 with TLS, or port 1883 without it. On the Network tab, set Transport Protocol to TLS and Connect via Port to 8883, and leave the other settings at their defaults.
On the Tag Set 1 tab, keep Transfer Mode on Periodic with an Update Rate of 1.0 seconds, and drag Tag1, Tag2 and Tag3 from the Resource Pane into Contents. Press F9 to download the database to the FlexEdge. After the first download, click Link → Send Time to copy your PC's time zone to the device.
4. Check the connection and the data in Ubidots
Open https:// followed by the FlexEdge's IP address in a browser and click Remote. The browser warns that the site is not secure because the FlexEdge uses its own certificate; continue to the page. The Status tag reads 4 once the connector has published data to Ubidots, and Tag1 and Tag2 keep counting.
In Ubidots, go to Devices → Devices. A device named after your device label appears, with the variables tag1, tag2, tag3 and connected. Ubidots writes labels in lowercase. You can rename the device and its variables; keep the labels, because the connector publishes to them.
Troubleshooting: why is the Status tag not reaching 4?
The connector writes its state to the Status tag as a number from 0 to 4, defined in chapter 24 of the Crimson 3.2 Software Guide. A Status tag that stops below 4 tells you which stage failed.
Status | Meaning | Check |
0 | Starting up, or recovering from a dropped connection | Enable Agent is Yes, the Ethernet cable is connected, and a manual IP address has a gateway and DNS servers |
1 | Connecting to the server after resolving its address | The port matches the transport: 8883 with TLS, 1883 with TCP. Outbound traffic to that port is allowed. The token is correct, because the broker drops connections with a wrong token |
3 | Connected and ready, nothing published yet | The tag set has tags in Contents and Transfer Mode is Periodic. With Send Changes, a tag that never changes is only sent on connection |
4 | Connected, and data has been published | If no device appears in Ubidots, check the Device Name: lowercase letters, numbers, dashes or underscores only |
The manual describes Status 2 as waiting for the Primary Application, a Sparkplug concept. HMS's Ubidots troubleshooting note covers more checks, and a string tag never appears in Ubidots because the connector sends numbers only.
FAQ
Can the Crimson Ubidots connector send string or boolean tags?
The Crimson Ubidots connector sends numeric data only. Flag tags must be converted to integers, 1 or 0, and string tags are not transmitted. To send strings, use Crimson's Generic MQTT connector with a decoder function, as described in Crimson Generic MQTT Setup Guide: Red Lion Tags to the Cloud.
Should I use the Ubidots connector or the Generic MQTT connector?
Use the Ubidots MQTT connector for numeric tags that go to one Ubidots device per connector. Use the Generic MQTT connector when you need your own topic, string tags, one connector feeding several devices, or a Crimson build that predates the Ubidots connector.
Does the Ubidots connector work in Crimson 3.1?
Yes. Crimson 3.1 includes the Ubidots MQTT connector from build 3.1.3119.001 (December 2020). HMS's Crimson 3.1 note calls the fields Client ID and Default Token. The FlexEdge DA50A and DA70A need Crimson 3.2; the earlier DA50D and DA70D run Crimson 3.1.
Can Ubidots write values back to Crimson tags?
HMS's setup note for this connector enables writes per tag set with Tag Writes = Enabled and recommends Update Mode = Send Changes. If your build's Tag Set tab shows Tag Writes, put the writable tags in their own tag set. With Data Buffering on, keep send-only tags in a separate set with writes disabled.
What happens to the data while the FlexEdge is offline?
With Data Buffering off, the connector samples nothing offline and sends the latest values on reconnection. Buffering to memory keeps up to 14,400 values, 4 hours at one sample per second. Buffering to the memory card lasts until the card is full. Enable buffering on the Service tab and on each tag set.
Other Red Lion guides











