OmniServer's main purpose is enabling connectivity without custom code for devices that use ‘non-standard’ protocols to communicate such as weight scales, barcode readers, and printers. And OmniServer does that in a more efficient and cost-effective manner than writing custom code.
Furthering the goal of efficiency and cost-effectiveness, you may or may not be aware that OmniServer supports CSV import and export for speedy configuration of many things including topics, devices and, in the actual protocol itself, items, registers, topic variables and even messages. On larger projects, this provides a substantial time savings.
In this post continuing our "OmniServer Did You Know?" blog series, we will cover how to use CSV import and export in OmniServer to facilitate faster configuration on larger protocol implementations.
While some protocols might have one or only a handful of items and messages and no registers or topic variables (so you'd likely not need CSV import/export), other more complex protocols could have dozens or even hundreds of items or other components.
The CSV import/export capabilities in the protocol itself include items, registers, topic variables and messages, making more complex protocols with more components easier to mass edit, saving you time and effort that can be put to other uses.
And, whether your protocol is simple or more complex, for projects where you have dozens or hundreds of the same device using the same protocol, the CSV import and export capabilities for OmniServer topics and devices allows you to mass configure and mass edit your topics and devices to provide greater economies of scale on those projects.
If you missed previous posts in our blog series "OmniServer Did You Know?", get caught up here!
CSV Import and Export is also useful for merging OmniServer projects from different machines - it makes moving existing Topics and Devices from one machine to another where there is already an existing OmniServer project easy.
How Can I Use OmniServer CSV Import and Export?
It's simple to use CSV import and export for any of the supported components in OmniServer to increase productivity. We provide three easy ways to initiate an import or export when you've selected the relevant component you wish to import or export.
In the OmniServer Configuration and Protocol Editor toolbars, we've provided Import and Export buttons that are context-sensitive to which section you've selected (i.e. if you're currently in the Topics section, you'll only be able to import or export topics).
![]() CSV Import Toolbar Button |
![]() CSV Export Toolbar Button |
As another alternative, which is also context-sensitive, you can select the relevant section in the tree view that you wish to import or export (i.e. Topics, Devices, etc) and go to File -> Import or File -> Export, as well.
And last, but not least, you can also just right-click in the relevant section and select Import or Export from the menu that pops up. In the following sections, we'll cover how to perform an export and import for each supported component in your OmniServer project and protocols
With the Topic Variable List selected in your OmniServer protocol, you can again use one of the previously mentioned methods to initiate an import or export. (If you'd like more information on how Topic Variables are used in an OmniServer protocol - see our blog post.)
Make sure to have manually configured at least one Register in the protocol and perform an export first so that you have a template to work off of for creating your import file.
A Topic Variable export exports every Topic Variable in the Topic Variable List along with its associated settings that are configured in the current OmniServer protocol.
A Topic Variable import will import the Topic Variables you've added in the CSV file to the current OmniServer protocol. If there are any Topic Variables that already exist, you'll receive a prompt asking if you want to overwrite the existing Topic Variable or not (and also whether you'd like to apply the same decision to any further conflicting Registers).
And last, but not least, with the Command/Request Message List selected in your OmniServer protocol, you can use one of the previously mentioned methods to initiate an import or export.
There are a lot of settings in a Command/Request Message so it's easiest to manually configure at least one Register in the protocol and perform an export first so that you have a template to work off of for creating your import file.
A Command/Request Message export exports every Command/Request (i.e. Host) Message in the protocol along with its associated settings.
A Command/Request Message import will import the Command/Request Messages you've added in the CSV file to the current OmniServer protocol. If there are any messages that already exist, you'll receive a prompt asking if you want to overwrite the existing Command/Request Message or not (and also whether you'd like to apply the same decision to any further conflicting Command/Request Messages).
Are there any limitations to OmniServer CSV Import/Export?
The only real limitations are that not all components of a protocol are supported for import/export such as Unsolicited Messages or Error Messages. Also, make sure to avoid using commas in any description fields - this can cause problems with the imports/exports because commas are the separate used between the fields.
You'll receive an import summary at the end of any import indicating whether all rows were successfully imported or, if not, a list of failed rows will be provided with the reason why that row failed.
Have a protocol that you’re not really sure how to implement? We're always happy to hear your potential use case for OmniServer and help with a complimentary protocol review of your protocol documentation or to answer questions you may have.
Email us at support@softwaretoolbox.com with your questions and don't forget to subscribe to our blog for more quick and easy OmniServer tutorials and tips and the latest news. Then, make sure to download the OmniServer trial to try CSV Import/Export yourself for free.