Page 2 of 15

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 11:48
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!

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 13:44
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

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 15:23
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

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 15:37
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.

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 19:46
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

Re: Domoticz to Google Assistan integration

Posted: Wednesday 10 April 2019 23:16
by EldigoR
Does it sync switches as well? Or do they need to be manually added in config.py?

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 10:29
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).

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 16:51
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

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 17:09
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.

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 17:19
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

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 20:24
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:

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 22:18
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..

Re: Domoticz to Google Assistan integration

Posted: Thursday 11 April 2019 22:27
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!

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 10:15
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?

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 12:34
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"

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 12:57
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.

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 14:11
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

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 15:00
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?

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 15:25
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

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 16:17
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😀