Ask domoticz for value of sensor value using Google Assistant

Alexa, Google Home and Siri

Moderator: leecollings

Post Reply
crashingdutchman
Posts: 21
Joined: Monday 05 December 2016 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

Ask domoticz for value of sensor value using Google Assistant

Post by crashingdutchman »

I have managened to have Domoticz respond to "actions" that I submit to it through the Google Assistant on my phone. The smartswitch that I used to switch on or off the lights in our Christmas tree was hard to reach, so in Google Assistant I did this:
  • I created a so called shortcut so that when I say "Switch off the Christmas tree" Google Assistant does a "switch off the Christmas tree"
  • In IFTTT I created a Recipe using Google Assistant. It listens to the trigger "switch of the Christmas tree"
  • When this trigger is received, IFTTT fires a Webhooks action. This action basically is a request to my Domoticz instance used to switch off a device (see the Domoticz API on how to do that)
  • When the action has finished, Assistant responds with "Your Christmas tree has been switched off"
The Christmas tree has been dismantled a week ago, so I am not using it anymore until December, but I have other actions defined in Google Assistant too. When I say "Good night" or "Good evening", all devices in a certain group are switched off and when I say "Good morning" to Google Assistant the same group is switched on.

I wanted to develop this further to have my Google Assistant to tell me the temperature in the "living room", "office" or "outside" when I ask for it. Have not yet found out how to do that.

Suggestions are welcome!
PeterFleur
Posts: 32
Joined: Sunday 08 March 2015 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4739
Contact:

Re: Ask domoticz for value of sensor value using Google Assistant

Post by PeterFleur »

Take a look at the thread about Controlicz in this forum for a nice way to integrate Domoticz with Google Home

Sent from my SM-G930F using Tapatalk

RaspberryPI
ZWave
RFXtrx433E
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Ask domoticz for value of sensor value using Google Assistant

Post by DewGew »

Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
crashingdutchman
Posts: 21
Joined: Monday 05 December 2016 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

Re: Ask domoticz for value of sensor value using Google Assistant

Post by crashingdutchman »

Thank you both for your replies. I am going to look into that now.
CarlosDom
Posts: 5
Joined: Sunday 23 October 2016 15:44
Target OS: Linux
Domoticz version:
Contact:

Re: Ask domoticz for value of sensor value using Google Assistant

Post by CarlosDom »

Controlicz is not free anymore.
Does anybody know how to retrieve a domoticz temperature from google home?
Thanks
User avatar
fratton
Posts: 5
Joined: Tuesday 08 December 2015 17:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: FRANCE
Contact:

Re: Ask domoticz for value of sensor value using Google Assistant

Post by fratton »

I use : https://github.com/dohliam/stream2chromecast

SH:

Code: Select all

#!/bin/bash
fichier=/tmp/message.mp3
IPGH="192.168.1.78"
message=$1 # text message
kill -9 `ps aux | grep 'stream2chromecast.py' | awk '{print $2}'`

rm -f $fichier

curl -s -G "http://translate.google.com/translate_tts" --data "ie=UTF-8&total=1&idx=0&client=tw-ob&&tl=fr-FR" --data-urlencode "q=$message" -A "Mozilla" --compressed -o $fichier

chown pi:pi $fichier
chmod 666 $fichier

python /home/pi/domoticz/scripts/sh/stream2chromecast/stream2chromecast.py -devicename $IPGH $fichier &

sleep 10s
kill -9 `ps aux | grep 'stream2chromecast.py' | awk '{print $2}'`
rm -f $fichier
LUA :

Code: Select all

local ligne='sh /home/pi/domoticz/scripts/sh/stream2chromecast/notification_google_home.sh "'..s_temperature..' degrés" &'
os.execute(ligne)
IFTTT WebHooks Call Example to the Sentence "What is the home temperature" :[/code]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest