# Getting temperature readings from DS18B20 into an Alexa virtual device

**URL:** <https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396>\
**Category:** General\
**Created:** [13 August 2022 14:40 UTC](https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396 "2022-08-13T14:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyrilbl](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cyrilbl](https://discourse.nodered.org/u/cyrilbl)\
**Post date:** [13 August 2022 14:40 UTC](https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396/1 "2022-08-13T14:40:11Z")

</div>

Hi, There must be a simple answer to this can any one help please? I have a DSI8B20 temperature sensor which is measuring water temperature.I want to ask Alexa to tell me the current temp.I have set up the Alexa virtual device in node red and running the pizza oven example(node-red-contrib-virtual-samart-home) it works fine.The pizza virtual device node needs the object - temperature:(temperature as a number) The DS18B20 only gives the temperature as a number. What node would I need to use to make this object and what would be the settings. I have tried many combinations with the change node with no success.

Debug of pizza example  
13/08/2022, 15:37:31[node: debug 3](http://192.168.0.74:1880/#)temp : msg.payload : Object

object

temperature: 34

Debug of DS18B20

13/08/2022, 15:32:49[node: debug 4](http://192.168.0.74:1880/#)msg.payload : number

34

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 August 2022 15:03 UTC](https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396/2 "2022-08-13T15:03:17Z")

</div>

Try this:  
 ![Screen Shot 2022-08-13 at 11.02.46 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/29a7825e95023c9580a8685848debe10c71b72d4.png)

---

<div class="post-metadata">

**Author:** ![cyrilbl](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@cyrilbl](https://discourse.nodered.org/u/cyrilbl)\
**Post date:** [13 August 2022 15:52 UTC](https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396/3 "2022-08-13T15:52:35Z")

</div>

Thank so much for that,I guess it was the only combination I did not try. Works perfect !!!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 August 2022 15:52 UTC](https://discourse.nodered.org/t/getting-temperature-readings-from-ds18b20-into-an-alexa-virtual-device/66396/4 "2022-08-27T15:52:47Z")

</div>

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