# How to remove MQTT device prefix from any child device name

**URL:** https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892
**Category:** Forum
**Tags:** cumulocity
**Created:** [May 31, 2022, 8:03am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892 "2022-05-31T08:03:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sumit.singh](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sumit.singh](https://community.cumulocity.com/u/sumit.singh)
#### Post date: [May 31, 2022, 8:03am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892/1 "2022-05-31T08:03:52Z")

</div>

#### What product/components do you use and which version/fix level?

1011.0.19

#### Are you using a free trial or a product with a customer license?

#### What are trying to achieve? Please describe in detail.

I want to remove prefix mqtt device from child device  
for creating child device i am using templet 101  
guide me with some example or guide

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

#### Have you installed latest fixes for the products

---

<div class="post-metadata">

### Author: ![Korbinian\_Butz](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz/32/10473_2.png) [@Korbinian\_Butz](https://community.cumulocity.com/u/Korbinian_Butz)
#### Post date: [May 31, 2022, 8:16am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892/2 "2022-05-31T08:16:25Z")

</div>

Hi,  
can you share the message you sent using template 101? One can state the name of the devices as third parameter: `101,uniqueChildId,myChildDevice,myChildType`. This way a child device of type ‘myChildType’ with name ‘myChildDevice’ and external Id ‘uniqueChildId’ will be created.

See the docs here: [SmartREST - Cumulocity IoT Guides](https://cumulocity.com/guides/reference/smartrest-two/#child-device-creation-101)

---

<div class="post-metadata">

### Author: ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)
#### Post date: [May 31, 2022, 8:18am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892/3 "2022-05-31T08:18:16Z")

</div>

Hi @sumit.singh

For the root device it is “100,{{name}},{{type}}”  
For child devices it is "101,{{UniqueDeviceID}},{{name}},{{type}}.

Now to the tricky part:  
You have to make sure that either 100 or 101 for child devices are the first messages received by the platform before sending any other messages because of race conditions.  
Most likely you do that by sending it QoS 1 or 2 and wait for the ACK.

It sometimes happens that you send 101 and in parallel already some data for the child device which will be processed first and therefor the device created with “MQTT Device …” and 101 ignored.

Regards  
Stefan

---

<div class="post-metadata">

### Author: ![sumit.singh](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sumit.singh](https://community.cumulocity.com/u/sumit.singh)
#### Post date: [May 31, 2022, 8:24am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892/4 "2022-05-31T08:24:12Z")

</div>

@Stefan_Witschel Thanks for your response I will follow the same

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)
#### Post date: [August 29, 2022, 8:24am UTC](https://community.cumulocity.com/t/how-to-remove-mqtt-device-prefix-from-any-child-device-name/3892/5 "2022-08-29T08:24:40Z")

</div>

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