Connection - migration

The control prefix was renamed by Bosch IoT Hub to command. Since December 10, 2019 Bosch IoT Things supports the command prefix for all new connections created after our service update.

If you have an older connection to Bosch IoT Hub, you will see a deprecation warning in our UI. This guide will help you to migrate your existing connection to the new format.

There are two parts of the connection that need to be migrated:

  1. Sources and
  2. Targets.

Migrating sources

In the deprecated connection, you should have two sources configured.

  • Source 1 listens to the event and telemetry channel of your Hub tenant.
  • Source 2 listens to the deprecated control channel of your Hub tenant.

Source 1

In Source 1, you can remove the following header mappings:

  • reply-to
  • correlation-id

Additionally, in case you have activated “Send replies”, you will need to add the following two header mappings to the replies header mappings:

  • subject ⇾ {{ header:subject | fn:default(topic:action-subject) | fn:default(topic:criterion) }}-response
  • to ⇾ command/$yourHubTenant/{{ thing:id }}

Please note, that you have to replace the $yourHubTenant placeholder with the actual ID of your Hub tenant.

Source 2

In Source 2, you need to change the address prefix control to command_response. In addition, you can remove the following two header mappings:

  • message-id
  • reply-to

and disable “Send replies” for this source.

Example source

After migration, your connection sources should look similar the following picture.

migrated connection targets

Migrating targets

While the “old” connections used to have one target, your “new” connection will have two targets.

Both new targets have now the following address: command/$yourHubTenant.

Please note, that you have to replace the $yourHubTenant placeholder with the actual ID of your Hub tenant.

Target 1

The first target publishes the following two topics:

  • Live messages and
  • Live commands.

It should have the following header mappings configured:

  • content-type ⇾ {{ header:content-type | fn:default('application/vnd.eclipse.ditto+json') }}
  • to ⇾ command/$yourHubTenant/{{ thing:id }}
  • reply-to ⇾ command_response/$yourHubTenant/replies
  • subject ⇾ {{ header:subject | fn:default(topic:action-subject) }}
  • correlation-id ⇾ {{ header:correlation-id }}

Please note, that you have to replace the $yourHubTenant placeholder with the actual ID of your Hub tenant.

Target 2

The second target publishes the following two topics:

  • Twin events and
  • Live events.

It should have the following header mappings configured:

  • content-type ⇾ {{ header:content-type | fn:default('application/vnd.eclipse.ditto+json') }}
  • to ⇾ command/$yourHubTenant/{{ thing:id }}
  • subject ⇾ {{ header:subject | fn:default(topic:action-subject) }}
  • correlation-id ⇾ {{ header:correlation-id }}

Please note, that you have to replace the $yourHubTenant placeholder with the actual ID of your Hub tenant.

Example target

After migration, your connection targets should look similar the following picture. migrated connection targets

Corporate information Data protection notice Legal information Support Free plans