Configuring devices

With Omnicore, you can control a device by modifying its configuration. A device configuration is an arbitrary, user-defined blob of data. After a configuration has been applied to a device, the device can report its state to Omnicore.

Device configuration works differently in the MQTT and HTTP bridges. See below for details.

For more information, see Devices, Configuration, and State.

Limits

Configuration updates are limited to 1 update per second, per device. However, for best results, device configuration should be updated much less often — at most, once every 10 seconds.

The update rate is calculated as the time between the most recent server acknowledgment and the next update request.

Protocol differences

MQTT

Devices using MQTT can subscribe to a special MQTT topic for configuration updates:

When a device subscribes to the configuration topic, the MQTT bridge responds with an MQTT SUBACK message, which contains the granted QoS for the config topic (0 or 1), or 128 if an error occurred.

After initially subscribing, the device receives the latest configuration in a message's payload, and will receive additional configuration updates as they are pushed to Omnicore.

Device with Empty Initial Configuration

Device with Initial Configuration

Updating and reverting device configuration

You can update and revert device configuration using OmniCore Console.

You can also use APIs to update and revert device configuration. Update Device Configuration

Code Samples are available in GitHub

Reviewing device configuration

You can review the last 10 versions of a device configuration using OmniCore Console and APIS. Get Device Config

Last updated