Serial ports are tried and tested interfaces that can be found on many devices. It is not uncommon to run across RS232, RS485, and 4-20ma serial interfaces on new and in-service equipment. Another common form of serial interface is USB (Universal Serial Bus), this is often used on development boards and loggers for communicating with a host (i.e. – Arduino-based systems).
Bringing data into Machinechat JEDI from serial interfaces is made possible with the serial data collector introduced in v3.0 of the software. Data in CSV (comma separated values) can be sent to JEDI via a serial interface on the machine where JEDI is running. For example, an Arduino-based system may send out the values for “light”, “sound”, and “temperature” on a regular basis. The recurring data might look like this:
Setting up a JEDI serial data collector consists of 5 steps:
- Select the serial port to monitor
- Select a unique TargetID name for the data stream
- Set the serial port parameters (baud rate, stop bits, data bits, and parity)
- Set the record delimiter
- Add the CSV fields
Optionally, the timestamp can be extracted from the serial data if it is present, but by default the data is stamped as it comes in.
Once the data collector is setup and enabled, the serial data will enter JEDI and be available to create dashboards, rules, and actions with. One of the best places to start is the “device dashboard”, where you can see the data coming into the system like this:
If you are having trouble bringing in serial data, a handy debugger is available. In the lower left portion of the serial data collector setup screen you can "Enable Debug". This will capture activity and any errors taking place when the collector is running. You can find the output of this capture in the "debug" sub-directory where JEDI is installed.
- Please find an example here of a modified Arduino program that sends out CSV data via the USB port on a regular basis from a development board
- When selecting a serial port, you may see both CU (call up) and TTY (teletype) interfaces in the chooser. Select the CU interface
- The serial device often needs to be plugged in to show up in the port chooser
- When setting up and saving the collector initially, it may be necessary to temporarily stop sending data from the attached device
- CSV fields can contain a Number, String, or Boolean. You can also choose to ignore a field