# How to check measurements of custom templates?

**URL:** https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342
**Category:** Forum
**Tags:** cumulocity
**Created:** [February 5, 2020, 12:39pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342 "2020-02-05T12:39:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Abdullah\_C\_nar](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Abdullah\_C\_nar](https://community.cumulocity.com/u/Abdullah_C_nar)
#### Post date: [February 5, 2020, 12:39pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342/1 "2020-02-05T12:39:15Z")

</div>

Hi,

I have created a SmartRest measurement template using the UI. I added only one parameter and keep the $time and $type empty for this test. Now the preview is this:

1001,\<$.type\>,\<$.time\>,

I am PUBLISH’ing below message and I don’t get any error message:

Topic: s/uc/template1  
Msg:1001,TESTRESULT

If I change the message it to 1002, I get an error saying there is no template with this id. So I assumed I’m going well. But I couldn’t find how to check the received measurement. There is nothing on the UI and I can not see those packets in the response of the GET request to {{url}}/measurement/measurements.

What am I doing wrong?

Also, I created a response in this template and checked the “Include response” option in the measurement message template. But I can not get any response. Is there any way to bind this response to that message? Or where do we subscribe to get the response? I tried below topics:

s/uc/template1  
s/uc/#  
s/uc

Is there any step by step example of how to create a custom template using the UI?

Regards.

---

<div class="post-metadata">

### Author: ![Abdullah\_C\_nar](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Abdullah\_C\_nar](https://community.cumulocity.com/u/Abdullah_C_nar)
#### Post date: [February 5, 2020, 12:57pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342/2 "2020-02-05T12:57:37Z")

</div>

I found out that there is a problem with string type. I changed it to number and it worked. But I don’t know what if we want to send string as a measurement. Are we only allowed to send numbers as measurement?

Anyway, I have found a question on StackOverflow. You can check the answer, it also describe how to set custom types. I used the predefined battery level type and I can see the result on the Measurements UI. Check the attached image for reference.

Regarding the second question. I’m still trying to understand how to see the response of the message.

 ![battery_measurement_template.PNG](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/2X/d/de9515b7e51040cae576e9d9b740466767dbacfb.png)

---

<div class="post-metadata">

### Author: ![Abdullah\_C\_nar](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Abdullah\_C\_nar](https://community.cumulocity.com/u/Abdullah_C_nar)
#### Post date: [February 5, 2020, 1:54pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342/3 "2020-02-05T13:54:59Z")

</div>

> [@Abdullah Ç?nar](#):
>
> I found out that there is a problem with string type. I changed it to number and it worked. But I don’t know what if we want to send string as a measurement. Are we only allowed to send numbers as measurement?
> 
> Anyway, I have found a question on StackOverflow. You can check the answer, it also describe how to set custom types. I used the predefined battery level type and I can see the result on the Measurements UI. Check the attached image for reference.
> 
> Regarding the second question. I’m still trying to understand how to see the response of the message.

I forgot to mention the stackoverflow link: [https://stackoverflow.com/a/51158907/5182362](https://stackoverflow.com/a/51158907/5182362)

---

<div class="post-metadata">

### Author: ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)
#### Post date: [April 21, 2020, 1:35pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342/4 "2020-04-21T13:35:19Z")

</div>

Hi Abdullah,

have you checked our SmartRest documentation: [https://cumulocity.com/guides/reference/smartrest-two/](https://cumulocity.com/guides/reference/smartrest/)?

best regards  
Michael

---

<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: [April 2, 2021, 3:44pm UTC](https://community.cumulocity.com/t/how-to-check-measurements-of-custom-templates/2342/5 "2021-04-02T15:44:11Z")

</div>


