Usage of DefaultTemplateIdentifier in MQTT Client ID

The MQTT Documentation tells that a Client can incorporate the defaultTemplateIdentifier in it’s Client ID (see Link). How is it supposed to work and what’s the benefit of it? Does it support Smart Rest 1 or 2 template collections?

What I’ve tried so far:

  • Having a template collection with Id kobu. It contains a Smart Rest Identifier to create a custom Event.
  • Incorporate the collection ID to the client-Id: d:my-serial-201020312x:kobu
  • Send data to using topic s/uc (on purpose without template ID as I thought it comes from Client-ID then) => did not work
  • Send data to topic s/uc/kobu => this worked fine (so the template itself works)

In order to make use of the default template you will need to publish to s/ud.
Everything else looks correct.

2 Likes

That did the trick. With this hint I found it also documented here in Smart Rest 2 docs. So this is not supported for the Smart Rest 1 X-IDs?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.