# Ask google for sensor data

**URL:** https://discourse.nodered.org/t/ask-google-for-sensor-data/39398
**Category:** General
**Created:** [19 January 2021 17:32 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398 "2021-01-19T17:32:26Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)
#### Post date: [19 January 2021 17:32 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/1 "2021-01-19T17:32:26Z")

</div>

Hi,

I have google home talking to my node-red flow using the library ([node-red-contrib-alexa-smart-home (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-alexa-smart-home)). It is great for switching on outlets and lights but it currently can't get sensor data. I was wondering if anyone has been able to do this with another library. Basically I'd like to ask google for a sensor reading and convert that into either an MQTT message or a database query (might be simpler?).

I have looked back through the forums and the only thing I can find is

> [@Querying data from a sensor via Google Home?](https://discourse.nodered.org/t/querying-data-from-a-sensor-via-google-home/7833):
>
> Hey there. I have a running instance of NR and the bridge to GH made by @i8beef which is working great. I wonder if there is a way to ask to GH for values that can be accessed via MQTT from my sensors such as "Hey Google, what's the humidity in the flowerpot?".

which doesn't quiet suit my needs.

Thanks in advance,

MArtyn

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [19 January 2021 19:39 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/2 "2021-01-19T19:39:09Z")

</div>

I'm using [node-red-contrib-googlehome](https://flows.nodered.org/node/node-red-contrib-googlehome) which is similar to `node-red-contrib-alexa-smart-home`, and which I believe is written & maintained by the original author of the node which you are using (@hardillb).

Both nodes seem constrained by the [available 'devices'](https://developers.google.com/assistant/smarthome/guides) published by google, so any sensor device needs to fall within one of their listed categories.

For example, I have a temperature sensor in my garden, and the nearest device type I can find is the **thermostat** device which _almost_ works!!  
I can ask "What's the temperature in the garden", and Google Home will reply with the current temperature, but also insists on telling me what temp the 'heating' is set to (which of course is not required).

_Frustrating!!!_

---

<div class="post-metadata">

### Author: ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)
#### Post date: [19 January 2021 20:00 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/3 "2021-01-19T20:00:56Z")

</div>

It seems like sensor should be where it is at?

> **[Actions on Google Smart Home  |  Google Developers](https://developers.google.com/assistant/smarthome/guides/sensor)**

I agree, very frustrating1

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [19 January 2021 21:00 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/4 "2021-01-19T21:00:59Z")

</div>

I've been playing with the device type "Sensor" which I can get to just return current temperature. I just need to find the time to add it to the list of device types on the site

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [19 January 2021 21:23 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/5 "2021-01-19T21:23:48Z")

</div>

> [@hardillb](#):
>
> which I can get to just return current temperature

That's good to hear. Thanks Ben.

---

<div class="post-metadata">

### Author: ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)
#### Post date: [19 January 2021 23:02 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/6 "2021-01-19T23:02:08Z")

</div>

Just a quick question, can your node be used to trigger an mqtt message to control a tasmota device? I was just going to see if I could replace my instances of node-red-contrib-alexa-smart-home node to give it a try.

Thank you, Martyn

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [20 January 2021 12:57 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/7 "2021-01-20T12:57:01Z")

</div>

Of course.

You may need to transform payload to match what ever the tasmota is expecting.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [19 February 2021 19:18 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/8 "2021-02-19T19:18:49Z")

</div>

> [@hardillb](#):
>
> I just need to find the time to add it to the list of device types on the site

Is there any update to this please @hardillb

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [21 February 2021 09:05 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/9 "2021-02-21T09:05:31Z")

</div>

Update should be live along with an updated device/trait editor

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [21 February 2021 10:48 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/11 "2021-02-21T10:48:57Z")

</div>

Great! Now working here, and reading DS18B20 equipped devices in the garden & greenhouse.

I had a few initial setup problems, but all my own fault - I overcomplicated the flow.

I assume from your notes that you are not expecting the Google home app to display the value at this time.

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [21 February 2021 11:11 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/12 "2021-02-21T11:11:58Z")

</div>

What device types/traits have UI on either the Home Hub or the mobile app can be found here: [Touch controls &nbsp;|&nbsp; Actions on Google Smart Home &nbsp;|&nbsp; Google Developers](https://developers.google.com/assistant/smarthome/develop/touch-controls)

---

<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: [22 April 2021 11:12 UTC](https://discourse.nodered.org/t/ask-google-for-sensor-data/39398/13 "2021-04-22T11:12:56Z")

</div>

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