Abstract:
This document explains how to troubleshoot an Ubidots connection, as an extension of the Crimson Cloud Connectors: Generic - Ubidots Tech Note.
Products:
CR3000 HMIs / Data Acquisition (DA10 & DA30) / Graphite® HMI / Graphite Controllers
Use Case: Generic MQTT w/ Ubidots
Troubleshooting and verifying tag data transfer to Ubidots.
Required Software:
Crimson 3.1
Required Firmware:
Build 3106.000 or higher
Tools to Use
- Debug Console as described at the beginning of the Crimson 3.1: Debugging Output Tech Note. The web option will be used throughout this document.
- Packet Capture as described in the Crimson 3.1: Packet Capture Tech Note. Using the SSL Data option, the unit will save an unencrypted version of the traffic (only required if using a secure connection).
Debug Console
- Figure 1 shows a bad connection to the cloud, in this case, the User Name (Default Token) is incorrect.
Figure 1.
- Figure 2 shows a bad connection because Tag Writes are enabled, but there is no Subscription Topic is defined.
Figure 2.
- Figure 3 shows a good connection, but data is not updating in the cloud because Force into Root is Disabled.
Figure 3.
If the transmission appears to be good, but the data does not appear in Ubidots, verify that Force into Root is Enabled.
- Figure 4 shows a good connection, where tags (Tag1-Tag4) are being written to the cloud.
Figure 4.
Below is a dissected version of the transmission:
mqtt: send:
2=../v1.6/devices/g10ts..{
"connected":1, device status (it is connected)
"timestamp":1569505320 time stamp of the device status
}
mqtt: recv:
23FAFE68 : 0000 : 40 02 00 05 @...
mqtt: send:
2a../v1.6/devices/g10ts..{
"connected":1, device status (it is connected)
"Tag1":0, Tag1's value (0)
"Tag2":0, Tag2's value (0)
"Tag3":2, Tag3's value (2)
"Tag4":2, Tag4's value (2)
"timestamp":1569505320 time stamp of the tag values
}
mqtt: recv:
23FAFE68 : 0000 : 40 02 00 06 @...
- Figure 5 shows a good connection where Tag1 being written to by the cloud.
Figure 5.
Below is a dissected version of the transmission:
2%. /v1.6/devices/g10ts/connected/lv..1 the device is connected
2.. /v1.6/devices/g10ts/timestamp/lv..1569506100 timestamp of the write
2!../v1.6/devices/g10ts/tag1/lv..48 Tag1 is being set to 48
Packet Capture
If a secure connection is used, you can use the SSL packet capture to see the contents of the packets and check them in WireShark. The TLS capture records that unencrypted data, so it’s useful for debugging encrypted links.
For a secure connection, select TLS as the interface and the port configured on the Network tab of the connector, port 8883.
For a standard connection, select the appropriate Ethernet port as the source, Specific Port for the TCP Capture, and TCP Port 1883 as shown in Figure 6, then start the capture.
Figure 6.
After stopping the capture and downloading the file, open it in Wireshark. You will see the data transfer, as shown in Figure 7.
Figure 7.
Verifying Data Exchange
Log in to ubidots.com, click Devices, and then the device configured to accept the data. The current value of the tags will be displayed, as shown in Figure 8.
Figure 8.
Writing from Ubidots
Here is an Ubidots article that describes creating a Manual Input Widget.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement