Domoticz to Google Assistant integration

Alexa, Google Home and Siri

Moderator: leecollings

DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Domoticz to Google Assistan integration

Post by DAVIZINHO »

HELLO..
This is a very interesting solution! but i dont understand somo of the things you make :-(
i will search for more info about configuration a reverse proxy in the synology (i have one too) and maybe i cand understand all. :-)

Because, its not posible to make this solution without this reverse proxy?, only redirecting ports in router?

thanks!
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

DAVIZINHO wrote: Wednesday 10 April 2019 11:48 HELLO..
This is a very interesting solution! but i dont understand somo of the things you make :-(
i will search for more info about configuration a reverse proxy in the synology (i have one too) and maybe i cand understand all. :-)

Because, its not posible to make this solution without this reverse proxy?, only redirecting ports in router?

thanks!
It's not so difficult:
https://www.grahamleggat.com/blog/2017/ ... oxy-server
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Domoticz to Google Assistan integration

Post by DAVIZINHO »

DewGew wrote: Wednesday 10 April 2019 13:44
DAVIZINHO wrote: Wednesday 10 April 2019 11:48 HELLO..
This is a very interesting solution! but i dont understand somo of the things you make :-(
i will search for more info about configuration a reverse proxy in the synology (i have one too) and maybe i cand understand all. :-)

Because, its not posible to make this solution without this reverse proxy?, only redirecting ports in router?

thanks!
It's not so difficult:
https://www.grahamleggat.com/blog/2017/ ... oxy-server
Thanks a lot for the info! is great.
But i dont understand the needing of reverse proxy, is only for make a secure connection?. No i access to my domoticz with a secure ssl connection with a letsencrypt certification.
Its not posible to connect directly?
i think i dont understand something and im wrong :-( sorry
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

Great work sofar!

I'm trying to set things up but I get these responses when I'm trying to sync devices with https://[PROXY URL]/sync

browser:
Synchronization request sent, status_code: 404
console
127.0.0.1 - - [10/Apr/2019 15:30:41] "GET /sync?code=6887d014144740c890c58be4c61f3a48&state=undefined HTTP/1.0" 200 -
I'm a doing something wrong?

The action simulator also gives errors when trying to talk to the my app's name
We're sorry, but something went wrong. Please try again.
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

EldigoR wrote:Great work sofar!

I'm trying to set things up but I get these responses when I'm trying to sync devices with https://[PROXY URL]/sync

browser:
Synchronization request sent, status_code: 404
console
127.0.0.1 - - [10/Apr/2019 15:30:41] "GET /sync?code=6887d014144740c890c58be4c61f3a48&state=undefined HTTP/1.0" 200 -
I'm a doing something wrong?

The action simulator also gives errors when trying to talk to the my app's name
We're sorry, but something went wrong. Please try again.
Got it! I had to link the service to the assistant on my phone Image
I now see the domoticz scenes Image
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

Does it sync switches as well? Or do they need to be manually added in config.py?
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

EldigoR wrote:Does it sync switches as well? Or do they need to be manually added in config.py?
Talking too my self here Image
It does sync switches when the type is "Type" : "Light/Switch"
My rfxcom switches are type "Type" : "Lighting 2", Those do not sync (yet).
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Thursday 11 April 2019 10:29
EldigoR wrote:Does it sync switches as well? Or do they need to be manually added in config.py?
Talking too my self here Image
It does sync switches when the type is "Type" : "Light/Switch"
My rfxcom switches are type "Type" : "Lighting 2", Those do not sync (yet).
It syncs well enough
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Thursday 11 April 2019 10:29
EldigoR wrote:Does it sync switches as well? Or do they need to be manually added in config.py?
Talking too my self here Image
It does sync switches when the type is "Type" : "Light/Switch"
My rfxcom switches are type "Type" : "Lighting 2", Those do not sync (yet).
I have a modifyed version here: https://github.com/DewGew/Domoticz-Google-Assistant
Would be great if you want to test it.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

I have a modified version here: https://github.com/DewGew/Domoticz-Google-Assistant
Would be great if you want to test it.
Cool, I will give it a try tonight.

As I have a lot of switches which don't have to be controlled by voice, I'd made a room especially to sync with the assistant.

Added in the config.py

Code: Select all

ROOMPLAN = '6' 
and change this URL:

Code: Select all

DOMOTICZ_GET_ALL_DEVICES_URL = DOMOTICZ_URL + '/json.htm?type=devices&filter=all&used=true&plan=' + ROOMPLAN
It would be great if you can implement this as well
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

You have made some nice progress!
never thought of adding temperature ;)

I noticed 2 things.
[*]When I ask the temperature, google also answered that the temperature device is off
like: it's 20 degrees and in the livingroom is off.

[*]The blinds and screen detection isn't working for me

Code: Select all

if 'Light/Switch' == device["Type"]:
        if device["SwitchType"] in ['Blinds', 'Venetian Blinds EU', 'Venetian Blinds US'] :
            return blindsDOMAIN 
it wil never detect my blinds as blinds because the device["Type"] is "Lighting 2" and Type" : "RFY" in my setup.

other than that great job :lol:
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Thursday 11 April 2019 17:19
I have a modified version here: https://github.com/DewGew/Domoticz-Google-Assistant
Would be great if you want to test it.
Cool, I will give it a try tonight.

As I have a lot of switches which don't have to be controlled by voice, I'd made a room especially to sync with the assistant.

Added in the config.py

Code: Select all

ROOMPLAN = '6' 
and change this URL:

Code: Select all

DOMOTICZ_GET_ALL_DEVICES_URL = DOMOTICZ_URL + '/json.htm?type=devices&filter=all&used=true&plan=' + ROOMPLAN
It would be great if you can implement this as well
I just use a separate user for GA and assign devices in user settings. Then I can see in the log if GA swithches the devices.
Try to fix the issues about the blinds..
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »


DewGew wrote: I just use a separate user for GA and assign devices in user settings. Then I can see in the log if GA swithches the devices.
Good one!
ressof
Posts: 60
Joined: Thursday 20 April 2017 7:20
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Domoticz to Google Assistan integration

Post by ressof »

EldigoR wrote: Thursday 11 April 2019 20:24
[*]When I ask the temperature, google also answered that the temperature device is off
like: it's 20 degrees and in the livingroom is off.
There is a setting called "queryOnlyTemperatureSetting" but I havent got any luck with this setting.
https://developers.google.com/actions/ ... uresetting
Also I don't see the point with modes on thermostats. Changing this will not do anything in Domoticz?
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

ressof wrote: Friday 12 April 2019 10:15
EldigoR wrote: Thursday 11 April 2019 20:24
[*]When I ask the temperature, google also answered that the temperature device is off
like: it's 20 degrees and in the livingroom is off.
There is a setting called "queryOnlyTemperatureSetting" but I havent got any luck with this setting.
https://developers.google.com/actions/ ... uresetting
Also I don't see the point with modes on thermostats. Changing this will not do anything in Domoticz?
Assistant says "inactivated" instead of "off"
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Thursday 11 April 2019 20:24 You have made some nice progress!
never thought of adding temperature ;)

I noticed 2 things.
[*]When I ask the temperature, google also answered that the temperature device is off
like: it's 20 degrees and in the livingroom is off.

[*]The blinds and screen detection isn't working for me

Code: Select all

if 'Light/Switch' == device["Type"]:
        if device["SwitchType"] in ['Blinds', 'Venetian Blinds EU', 'Venetian Blinds US'] :
            return blindsDOMAIN 
it wil never detect my blinds as blinds because the device["Type"] is "Lighting 2" and Type" : "RFY" in my setup.

other than that great job :lol:
Test if you can get the blinds now.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

DewGew wrote: Friday 12 April 2019 12:57
EldigoR wrote: Thursday 11 April 2019 20:24 You have made some nice progress!
never thought of adding temperature ;)

I noticed 2 things.
[*]When I ask the temperature, google also answered that the temperature device is off
like: it's 20 degrees and in the livingroom is off.

[*]The blinds and screen detection isn't working for me

Code: Select all

if 'Light/Switch' == device["Type"]:
        if device["SwitchType"] in ['Blinds', 'Venetian Blinds EU', 'Venetian Blinds US'] :
            return blindsDOMAIN 
it wil never detect my blinds as blinds because the device["Type"] is "Lighting 2" and Type" : "RFY" in my setup.

other than that great job :lol:
Test if you can get the blinds now.
Al most. The Lighting 2 types are working properly now but the Type" : "RFY" (which is my somfy screen) is still ignored
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Friday 12 April 2019 14:11
Al most. The Lighting 2 types are working properly now but the Type" : "RFY" (which is my somfy screen) is still ignored
”RFY” is that used for lights and switches too?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz to Google Assistan integration

Post by EldigoR »

DewGew wrote: Friday 12 April 2019 15:00
EldigoR wrote: Friday 12 April 2019 14:11
Al most. The Lighting 2 types are working properly now but the Type" : "RFY" (which is my somfy screen) is still ignored
”RFY” is that used for lights and switches too?
I think it can be yes
https://shop.somfy.co.uk/smart-home/lights-switches
but I only have screens
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistan integration

Post by DewGew »

EldigoR wrote: Friday 12 April 2019 15:25
DewGew wrote: Friday 12 April 2019 15:00
EldigoR wrote: Friday 12 April 2019 14:11
Al most. The Lighting 2 types are working properly now but the Type" : "RFY" (which is my somfy screen) is still ignored
”RFY” is that used for lights and switches too?

I think it can be yes
https://shop.somfy.co.uk/smart-home/lights-switches
but I only have screens
I added RFY
Give it a try again😀
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest