At Tulip, we have some ProGlove MARK 2 and MARK DISPLAYs. The MARK Display is extra exciting, as the ProGlove Streams API allows for bi-directional communication between the device and Tulip.
To connect to Tulip, we need a ProGlove Gateway. This device connects to the Glove and communicates over a variety of protocols including USB HID, USB CDC, and MQTT.
USB CDC, MQTT, and WebSocket/WiFi integration paths are compatible with Streams API. Below, I discuss the method I used to connect over USB CDC (which operates as a serial connection through Node-RED). In this method, the ProGlove Gateway is connected to my Edge MC with the included USB cable.
(Note: @youri.regnaud has also reported success with Streams API over MQTT)
To receive information: The Gateway will output JSON objects as specified by the API during events like a device pairing, barcode scan, or button gesture. Simply pull out the desired headers in your Tulip Machine Attributes node and send into Tulip.
(For example, the Tulip “Attribute Source” for a scanned barcode would be
To send information: use a Tulip Connector to send a JSON object (such as a screen template or LED flash command) to the ProGlove.
(Note that you’ll need the serial number of your scanner to accomplish this; I recommend having a machine attribute node that will always display
msg.payload.device_serial where it exists, so Tulip can pull and save the device’s serial number from an arbitrary barcode scan or pairing event.)
At the end of the day, you should be able to use and control your ProGlove with Tulip!
See here for a proof-of-concept.
Resources: Resources that I used are below:
- Sample Node-RED flow to communicate w/ a ProGlove via USB CDC - link here. Attached here: Tulip USB CDC Proglove.json (11.7 KB)
- ProGlove Streams API Documentation - link here.
- Specific doc for write-to-screen commands here. (Note that each screen template may have a different structure, and likely needs a different Tulip Connector.)
- Sample Tulip Connector to write to a Proglove Screen Template here.
Thanks for this example. Some points of comparison with an MQTT connection:
- The MQTT connection requires connecting the ProGlove gateway to the Wifi and making sure that the network configuration allows communication between the 2 gateways. Depending on the security rules of the company’s network, the USB CDC solution may be easier to implement than MQTT
- The MQTT connection avoids a wired connection between the 2 gateways. In the case of an installation with dozens of scanners and ProGlove gateways, the MQTT solution seems more scalable
About available scanner event, double click or triple button click event can be usefull to trigger action directly from the scanner without scanning Button press event
Some tips to send event_id and time_created field from your application :
By the way, the possibility of using the expression editor directly in connector/function would allow “App Builder” to avoid having to fill in these “technical” fields and finally provide a function that abstracts the necessary technical fields of the API.
Great call on supporting expressions within connectors. I just made a feature request for this. Honestly, I hadn’t ever considered this, but I can think of a half dozen ways I would use it on day 1 if it existed.
Double-press gestures for a scanner is also a great idea - definitely easier than relying on having a barcode somewhere to scan.
How do we get access to the Serial driver?
Seems to be locked, both on Edge MC and Edge IO!
If you disable the node-red feature on the device portal, the serial driver becomes accessible, it is either one or the other, but not both, as I found out.
@oviland @kobe is totally correct, thanks for chiming in! Certain Tulip drivers (e.g. Serial, Phidgets) conflict with Node-RED, as both will try to connect to the same device and one will end up blocking the other.
Disabling the Serial driver in your device driver config should make this work. If you ever want to use the Serial driver again, you’ll need to disable Node-RED.
(Personally, I prefer to use Node-RED for serial functionality, so this is definitely the best way to go!)
Ok, thank you, both @kobe and @k.ober.
I will stick to Node-RED.
There is a problem though. If the Edge IO device loose its power or is restarted, Node-RED loose its mapping to the ACM port.
Node-RED must then be toggled off/on at the Edge IO.
Not a good solution in a production environmnet.
Hey @oviland -
Talking to the hardware team about this now, the root cause is the EdgeIO booting and starting NR before the USB device completes its boot, causing that connection to be unavailable. We are looking at some potential solutions to resolve this. One is to make a delay on NR start that is user configurable, but more natively supporting hot plugging is a better one.