Associate DEVICE_ID from mqtt device

I’m wondering if there are any best practice suggestions on matching Losant DEVICE_IDs with the native identification of mqtt devices in the field? The built-in Losant mqtt state update assumes the DEVICE_ID is in the topic name which makes it really seamless because a workflow is not even needed. However, I need to figure out how the field device will know the Losant device ID or the way around.

Seems to me there are two options?

  1. Have the field device use the API to lookup the DEVICE_ID before publishing to mqtt.
  2. Send another identifier from the field device and use a Workflow to looking a tag to associate the DEVICE_ID.

Are there any other ways outside of this?

Thanks!

Paul

1 Like

This article describes a common process that’s been successfully implemented. Essentially it uses something similar to what you outlined in #1. The device does a round-trip to a Endpoint to register and receive its MQTT authentication details.