Domoticz to Google Assistant integration

Alexa, Google Home and Siri

Moderator: leecollings

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: Domoticz to Google Assistant integration

Post by DewGew »

pvklink wrote: Thursday 30 January 2020 17:59 OK, good to hear that the sdk isnt used!

is there hope that the python issue will be solved?
Python 3.7 is supported in buster...
Just try it out. Only one user had issues. I have tryed in a rpi 3b with buster and python 3.7, that worked fine.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Domoticz to Google Assistant integration

Post by Xavier82 »

DewGew wrote: Thursday 30 January 2020 8:32
Xavier82 wrote: Wednesday 29 January 2020 22:47 ...

Please help.
How can I fix this?
Is there anyway to run the script in the background?
I changed the bash script and now I revert it. Back up your config.yaml and smart-home-key.json then delete Domoticz-Google-Assistant folder.
Run the script, now it should update you service.
Thanks for the quick reply.
I removed the folder and reinstalled it.
Now seems to work except on 1 strange thing..

When I set ngrok tunnel to "true" and I enter my ngrok_auth_token I then Save and I do a "restart server" the server dies/stops.
dzga services seems to be running ok only the Domoticz Google Assistant dies/stops.

When rechanging it back to default, and press F5 the server is back online.
Looks like an issue with ngrok but it is installed:

Code: Select all

pi@raspberrypi:~/Domoticz-Google-Assistant $ pip install ngrok
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: ngrok in /home/pi/.local/lib/python3.7/site-packages (0.0.1)
Oh and also the logging remains empty.
"Logs Loglevel: Debug"
"Problem opening this file"

When pressing "Sync devices" I get this error:
"Page not found!: 500 Server Error: Internal Server Error for url: https://homegraph.googleapis.com/v1/devices:requestSync"
The "Smart-home-key.json" exists in the config folder.

btw: Running this on a PI3b, with Raspbian Buster and Python3.7 and 2.7 installed.
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Domoticz to Google Assistant integration

Post by Xavier82 »

When pressing "Sync devices" I get this error:
"Page not found!: 500 Server Error: Internal Server Error for url: https://homegraph.googleapis.com/v1/devices:requestSync"
The "Smart-home-key.json" exists in the config folder.
Got it working after recreating API and service account.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Domoticz to Google Assistant integration

Post by pvklink »

It works great. I have only one problem. Each time i change something to my node-red flows, and i do that a lot! the nora connection is corrupt!
I have to disable the nora connection on my home app on my mobile and connect it again.

IS there a solution for this behavior?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
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: Domoticz to Google Assistant integration

Post by DewGew »

pvklink wrote: Friday 31 January 2020 16:35 It works great. I have only one problem. Each time i change something to my node-red flows, and i do that a lot! the nora connection is corrupt!
I have to disable the nora connection on my home app on my mobile and connect it again.

IS there a solution for this behavior?
Dzga has nothing todo with nora and node-red. Only connects to domoticz
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Domoticz to Google Assistant integration

Post by pvklink »

sorry post on the wrong place..
was ment for node-red !
multitasking went wrong...
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
emichiels
Posts: 9
Joined: Tuesday 14 July 2015 11:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by emichiels »

hi there,

I installed DZGA and it has been working perfectly for a period.

But now when i try to sync the devices I get an error.
Page not found!: 500 Server Error: Internal Server Error for url: https://homegraph.googleapis.com/v1/devices:requestSync

also when I give a command to google it says sorry, but it looks like domoticz is not available at the moment, although both domoticz and dzga are running well. Has anyone have an idea what's causing this and how to solve this?
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: Domoticz to Google Assistant integration

Post by DewGew »

Sometimes the test disables in actions on google. Try goto actions on google console and click test.like you did when you set up first time
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
emichiels
Posts: 9
Joined: Tuesday 14 July 2015 11:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by emichiels »

Thanks for your reply dewgew. I tried this earlier or. Tried it again now, but problem remains. Any other idea's?
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: Domoticz to Google Assistant integration

Post by DewGew »

emichiels wrote: Tuesday 04 February 2020 20:54 Thanks for your reply dewgew. I tried this earlier or. Tried it again now, but problem remains. Any other idea's?
Error 500 is usally something with the auth server. Check:
- public urls is correct in actions on google
- reverse proxy server is running correct
- if auth pass and user is changed you might reconnect with google home app
- generate a new smart-home-key.json file
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
GeCoLi
Posts: 3
Joined: Sunday 09 February 2020 12:21
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by GeCoLi »

tage wrote: Saturday 16 November 2019 11:54 Hi

i also have some trouble to get this to work.
domoticz -> raspberry
Domoticz-Google-Assistant -> linux pc
and reverse proxy (pound) same linux pc
router portforward port 443 to linux pc
reverse proxy listen port 443 send that to port 3030 (Domoticz-Google-Assistant)
double check and have make new projects on google console just to make sure that is okey.
when try add "test" project in google home i come to login page and when type username and password i got this in domoticz-google-assistant log :

Code: Select all

192.168.0.10 - - [16/Nov/2019 11:36:10] "POST /login HTTP/1.1" 301 -
192.168.0.10 - - [16/Nov/2019 11:36:11] "GET /login?client_id=574522741018-46vmha139e9vi049mlucupdiq49dp3gt.apps.googleusercontent.com&redirect_uri=https%253A%252F%252Foauth-redirect.googleusercontent.com%252Fr%252Fmitt-projekt-259118&redirect=/oauth&state=AB8b_TOhbrqakbQy04zp9D8Xt-5pgNQmUuVDQiDdFNP4rthBSz9OXZ5Fw1Y8mDAV7Sv7KzgBurXetyTqwrb8T-kRuQ2TdTblyVdUTR_zhffPz5tipNx0EpzUvZzgGe6r3yhtl7ciO5gC5agRvoENE9pYGOEl6tCaW754HqjxM6g8FdjAaXlKWvZpYhqi_19eIKk-tnEeww0QjmXB-OuMDdBJWgi7GGu-C4vu2agewbPHQtBvxGl14rdAAk6WgcOj-U7Jjn2CUHUy8OcP8rKflBm17e7XgYQfQ_GNhz62wL7SC_WBKsWW7ueHlcTheEUc2yIH_2LUsohOaXf1k5zL3ZouS3GmzjyvUDWuproy4NTssaSy0OLniMwJsT5q2r2BUJxqVHIDdWAUVjkPma8scgF1VbwupfDy0UYARNbkm2EP-Ad1aMpoYqLhKN9ibuCEKIbpfpg80rAWg2dbzCtZbRiApVj6S5QiDAjsLe6LVsfo2NSM0YH_mXqmpJ6FgetML4Ae3VaN8uniwe9BhaoylEwfaK2bX1fIyxqE56CsUwQ3G-G48KHi4t8ldnsuQo2qhg89ysNH9OcrrxFczUNxUnhNoYbOpBo-7ayvwJmwlL_35_aeQUcbteA HTTP/1.1" 200 -
and got back to add new device app.
when try again and select my test app this shows up on phone/tablet :

Code: Select all

Page not found!: '/https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fmitt-projekt-259118'
then i have to kill python3 pid and start it again to come to login page when trying again .

/tage
I have the exact same problem as tage.
He replied later he resolved it by replacing the certificate with a new one made with certbot.

I use a certificate from Comodo and created a .crt and .key from a .pfx file and pointed to them in the configuration. When I browse externally to my revers proxy server, it correctyle shows that my website is secure and shows the right certificate.

I tried a self signed certificate, but no luck.

still receiving the 'page not found' error when trying to test with app.

I hope someone can help.

EDIT: I used the manual from Github. So I created a smart-home-key.json and used sampleClientId and sampleClientSecret for authentication.
inzuno
Posts: 13
Joined: Wednesday 22 November 2017 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Lyon FR
Contact:

Re: Domoticz to Google Assistant integration

Post by inzuno »

Hello and thanks a lot for this amazing work! :D

I can control every switch and every shutter with voice without any error.
But in the home app the status is not updated and shows 'no response'
When I ask if the status it says something went wrong and in the dzga log i can see : ERROR - 'Low_battery_limit' every time I ask the status.

Hardware: PI3B+
Domoticz Version: 4.10717
DZGA Version: V1.5.9
Python 3.5.3
Reverse proxy configured on Synology NAS

I have another issue but with my old voice commands with IFTTT as they continue to run, even if they are "disconnected" does anyone have a solution?

Thanks again a lot!
"I never make the same mistake twice. I make it like five or six times, you know, just to be sure."
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: Domoticz to Google Assistant integration

Post by DewGew »

Is ”Low_battery_limit” set in config? Or try set it to 0.

Code: Select all

 Low_battery_limit: 0
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: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

GeCoLi wrote: Sunday 09 February 2020 12:42
tage wrote: Saturday 16 November 2019 11:54 Hi

i also have some trouble to get this to work.
domoticz -> raspberry
Domoticz-Google-Assistant -> linux pc
and reverse proxy (pound) same linux pc
router portforward port 443 to linux pc
reverse proxy listen port 443 send that to port 3030 (Domoticz-Google-Assistant)
double check and have make new projects on google console just to make sure that is okey.
when try add "test" project in google home i come to login page and when type username and password i got this in domoticz-google-assistant log :

Code: Select all

192.168.0.10 - - [16/Nov/2019 11:36:10] "POST /login HTTP/1.1" 301 -
192.168.0.10 - - [16/Nov/2019 11:36:11] "GET /login?client_id=574522741018-46vmha139e9vi049mlucupdiq49dp3gt.apps.googleusercontent.com&redirect_uri=https%253A%252F%252Foauth-redirect.googleusercontent.com%252Fr%252Fmitt-projekt-259118&redirect=/oauth&state=AB8b_TOhbrqakbQy04zp9D8Xt-5pgNQmUuVDQiDdFNP4rthBSz9OXZ5Fw1Y8mDAV7Sv7KzgBurXetyTqwrb8T-kRuQ2TdTblyVdUTR_zhffPz5tipNx0EpzUvZzgGe6r3yhtl7ciO5gC5agRvoENE9pYGOEl6tCaW754HqjxM6g8FdjAaXlKWvZpYhqi_19eIKk-tnEeww0QjmXB-OuMDdBJWgi7GGu-C4vu2agewbPHQtBvxGl14rdAAk6WgcOj-U7Jjn2CUHUy8OcP8rKflBm17e7XgYQfQ_GNhz62wL7SC_WBKsWW7ueHlcTheEUc2yIH_2LUsohOaXf1k5zL3ZouS3GmzjyvUDWuproy4NTssaSy0OLniMwJsT5q2r2BUJxqVHIDdWAUVjkPma8scgF1VbwupfDy0UYARNbkm2EP-Ad1aMpoYqLhKN9ibuCEKIbpfpg80rAWg2dbzCtZbRiApVj6S5QiDAjsLe6LVsfo2NSM0YH_mXqmpJ6FgetML4Ae3VaN8uniwe9BhaoylEwfaK2bX1fIyxqE56CsUwQ3G-G48KHi4t8ldnsuQo2qhg89ysNH9OcrrxFczUNxUnhNoYbOpBo-7ayvwJmwlL_35_aeQUcbteA HTTP/1.1" 200 -
and got back to add new device app.
when try again and select my test app this shows up on phone/tablet :

Code: Select all

Page not found!: '/https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fmitt-projekt-259118'
then i have to kill python3 pid and start it again to come to login page when trying again .

/tage
I have the exact same problem as tage.
He replied later he resolved it by replacing the certificate with a new one made with certbot.

I use a certificate from Comodo and created a .crt and .key from a .pfx file and pointed to them in the configuration. When I browse externally to my revers proxy server, it correctyle shows that my website is secure and shows the right certificate.

I tried a self signed certificate, but no luck.

still receiving the 'page not found' error when trying to test with app.

I hope someone can help.

EDIT: I used the manual from Github. So I created a smart-home-key.json and used sampleClientId and sampleClientSecret for authentication.
Do you reach ui with your public url?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
GeCoLi
Posts: 3
Joined: Sunday 09 February 2020 12:21
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by GeCoLi »

Yes I can reach the UI.
Will tell the steps I perform:

In google Home app select [test] App name
need to fist authenticate reverse proxy
then need to authenticate DZGA (UI)
after login, it redirects me back to the screen where I can select a new account
then I select again [test] App name
need to authenticate again with reverse proxy
then it tells me: Page not found!: '/https://oauth-redirect.googleuserconten ... tion-d8ee4'

I would like to add a screenshot from the log, but don't know how actually. sorry
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: Domoticz to Google Assistant integration

Post by DewGew »

Check your settings in actions on google dont forget to press test button after saving. Next check if certificate is valid. You can try if it works with ngrok.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
GeCoLi
Posts: 3
Joined: Sunday 09 February 2020 12:21
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by GeCoLi »

DewGew wrote: Monday 10 February 2020 18:14 Check your settings in actions on google dont forget to press test button after saving. Next check if certificate is valid. You can try if it works with ngrok.
Excuse me.. I am just an idiot...
Still had my /path/to/.pem commented out :oops:

Still not working, but now I know how to look further. Need to convert my certificate to .pem the right way.
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by Ierlandfan »

Am I correct that everytime I restart dzga (Or actually ngrok) a new ngrok dns is created? So I have to update that in Google console?
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: Domoticz to Google Assistant integration

Post by DewGew »

Ierlandfan wrote: Thursday 20 February 2020 18:29 Am I correct that everytime I restart dzga (Or actually ngrok) a new ngrok dns is created? So I have to update that in Google console?
That is correct, It explained in wiki https://github.com/DewGew/Domoticz-Goog ... nfiguraton
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
jawadde
Posts: 2
Joined: Saturday 22 February 2020 0:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by jawadde »

Hi,

I'm having some trouble to get dzga working.
I'm using nginx as a reverse proxy, which seems to work OK.

However when I try to link my [test] smarthome services, I get the dzga login page, where I can succesfully login. Then you would expect that Google Home would add the devices, which is NOT happening. I just being returned to the list of services.

When I select my [test] service again I get the following error on my smartphone:

Page not found!: '/https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fnumber-17-4679c

This looks to me as I'm receiving a wrong redirect_uri. Note the / before the https

Anybody any idea what the problem could be, I've been looking into this for a couple of days now, without any succes.

Thanks for any hints.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest