Domoticz to Google Assistant integration

Alexa, Google Home and Siri

Moderator: leecollings

frankdep
Posts: 12
Joined: Saturday 14 September 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by frankdep »

Thanks man!
That was quick.
1.4.10 is working fine.
rvanderven
Posts: 3
Joined: Wednesday 11 July 2018 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by rvanderven »

DewGew wrote: Tuesday 17 December 2019 10:10
rvanderven wrote: Monday 16 December 2019 19:34 Does anyone have a complete uptodate description of the creation of the Google Action credentials and API keys?
To me it looks like things on the Google site have changed since the description is created.
Eg. When enabling HomeGraph for my project I could't create an API key via the credentials, only by going back to https://console.cloud.google.com/apis/c ... roject=<My project>
When clicking Test and entering a phrase I received the message that it was not possible to use this in the webbrowser.

After entering all details in config.yaml I started dzga service and after login with the /settings url I was able to login.
Clicking on the Sync devices resulted in the message: "Homegraph API key not valid!"
The dzga.log mentions error 404
2019-12-16 19:10:00 - ERROR - {
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
}

I tried all kinds of things, but I am completely stuck.
I have setup my own domain and installed a reverse proxy on my synology encrypted with Letsencrypt.
I can reach the dzga installation from outside and am able to login.
Maybe you missed to enable the Homegraph API

Edit: I updated wiki
I did enable the HomeGraph API: I followed your wiki, encountered the error and found a reference to the HomeGraph API. Removed everything and started all over. I didn't see other API keys, so I assume just enabling this should be ok.
Didn't have time since I posted this: will try again with your updated wiki.
lzwfkv
Posts: 37
Joined: Sunday 11 August 2019 16:54
Target OS: -
Domoticz version:
Contact:

Updated status in Google assistant - bug

Post by lzwfkv »

Hello DewGew, i think i have found a bug in the update switch (OnOff trait devices) status, in that whenever the status of a switch/light/etc. is changed either through google assistant voice command or in Domoticz itself, the updated status is not passed correctly to Google Assistant by DZGA.
In particular, upon investigation i think i have identified the issue in the fact that DZGA does not synch the devices status with Domoticz and keep storing the initial status of the switches that it got from Domoticz upon the latest Sync, therefore DZGA send stale status to Google Assistant after a query from the latter.
The simplest and quickest way, though probably a dirty one, that i have found to fix the issue is to force an update of the Queried device from Domoticz to DZGA whenever a query for device's attributes is submitted to DZGA (Smarthome) by adding the following code line (in bold) in smarthome.py:

def smarthome_query(self, payload, token):
"""Handle action.devices.QUERY request.
https://developers.google.com/actions/s ... vicesquery
"""
devices = {}

for device in payload.get('devices', []):
devid = device['id']
_GoogleEntity(aogDevs.get(devid, None)).async_update()
state = aogDevs.get(devid, None)

if not state:
# If we can't find a state, the device is offline
devices[devid] = {'online': False}
continue

e = _GoogleEntity(state)
devices[devid] = e.query_serialize()

return {'devices': devices}

After some tests the above change seems to work and to fix both the cases described above where i have been able to observe the issue raising.
frankdep
Posts: 12
Joined: Saturday 14 September 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Updated status in Google assistant

Post by frankdep »

Related to the above. I had some issues because GA had a wrong status. I tried to open my garage but GA was telling me that it was already open :(
This issue is not improving with the Report_state feature. So I'm triggering a manual "http://localhost:port/sync" on an important device change or time change event in Domoticz. Had to bypass the userinfo and useragent check in syncDevices and forceDevicesSync routines in smarthome.py.
The status is updating instantly in GA.
I think it is an interesting feature to trigger updates from Domoticz.
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: Updated status in Google assistant - bug

Post by DewGew »

lzwfkv wrote: Sunday 12 January 2020 12:53 Hello DewGew, i think i have found a bug in the update switch (OnOff trait devices) status, in that whenever the status of a switch/light/etc. is changed either through google assistant voice command or in Domoticz itself, the updated status is not passed correctly to Google Assistant by DZGA.
In particular, upon investigation i think i have identified the issue in the fact that DZGA does not synch the devices status with Domoticz and keep storing the initial status of the switches that it got from Domoticz upon the latest Sync, therefore DZGA send stale status to Google Assistant after a query from the latter.
The simplest and quickest way, though probably a dirty one, that i have found to fix the issue is to force an update of the Queried device from Domoticz to DZGA whenever a query for device's attributes is submitted to DZGA (Smarthome) by adding the following code line (in bold) in smarthome.py:

def smarthome_query(self, payload, token):
"""Handle action.devices.QUERY request.
https://developers.google.com/actions/s ... vicesquery
"""
devices = {}

for device in payload.get('devices', []):
devid = device['id']
_GoogleEntity(aogDevs.get(devid, None)).async_update()
state = aogDevs.get(devid, None)

if not state:
# If we can't find a state, the device is offline
devices[devid] = {'online': False}
continue

e = _GoogleEntity(state)
devices[devid] = e.query_serialize()

return {'devices': devices}

After some tests the above change seems to work and to fix both the cases described above where i have been able to observe the issue raising.
frankdep wrote: Sunday 12 January 2020 17:41 Related to the above. I had some issues because GA had a wrong status. I tried to open my garage but GA was telling me that it was already open :(
This issue is not improving with the Report_state feature. So I'm triggering a manual "http://localhost:port/sync" on an important device change or time change event in Domoticz. Had to bypass the userinfo and useragent check in syncDevices and forceDevicesSync routines in smarthome.py.
The status is updating instantly in GA.
I think it is an interesting feature to trigger updates from Domoticz.
Thank you for reporting this. I had similar issue also before on some devices. I look into this
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

I have trouble to get a selector switch working. Can anyone give me the solution?
This the selector in Domoticz: Light/Switch, Switch, Selector And it is working as intended.
Spoiler: show
{
"willReportState": true,
"deviceInfo": {
"model": "Raspberry Pi",
"manufacturer": "Domoticz"
},
"name": {
"name": "Verwarming"
},
"id": "Selector816",
"type": "action.devices.types.SWITCH",
"attributes": {
"availableToggles": [
{
"name_values": [
{
"name_synonym": [
"Off"
],
"lang": "en"
},
{
"name_synonym": [
"Off"
],
"lang": "en"
}
],
"name": "Off"
},
{
"name_values": [
{
"name_synonym": [
"Dagverlenging"
},
{
"name_values": [
{
"name_synonym": [
"Normaal"
],
"lang": "en"
},
{
"name_synonym": [
"Normaal"
],
"lang": "en"
}
],
"name": "Normaal"
}
]
},
"traits": [
"action.devices.traits.Toggles"
]
},
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 »

EddyG wrote: Monday 13 January 2020 10:14 I have trouble to get a selector switch working. Can anyone give me the solution?
This the selector in Domoticz: Light/Switch, Switch, Selector And it is working as intended.
Spoiler: show
{
"willReportState": true,
"deviceInfo": {
"model": "Raspberry Pi",
"manufacturer": "Domoticz"
},
"name": {
"name": "Verwarming"
},
"id": "Selector816",
"type": "action.devices.types.SWITCH",
"attributes": {
"availableToggles": [
{
"name_values": [
{
"name_synonym": [
"Off"
],
"lang": "en"
},
{
"name_synonym": [
"Off"
],
"lang": "en"
}
],
"name": "Off"
},
{
"name_values": [
{
"name_synonym": [
"Dagverlenging"
},
{
"name_values": [
{
"name_synonym": [
"Normaal"
],
"lang": "en"
},
{
"name_synonym": [
"Normaal"
],
"lang": "en"
}
],
"name": "Normaal"
}
]
},
"traits": [
"action.devices.traits.Toggles"
]
},
There is no touch control for selectors in google home app. Only by voice. Just say "Turn on Normaal on Verwarming".
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

I tried that but did not work. I suppose that the problem lies in the language.
If I try it in English, Google does not understand. If I try in Dutch then Google sums up all kind of Firms with Verwarming.
I keep on trying with other names for the Domoticz device.
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 »

EddyG wrote: Monday 13 January 2020 17:16 I tried that but did not work. I suppose that the problem lies in the language.
If I try it in English, Google does not understand. If I try in Dutch then Google sums up all kind of Firms with Verwarming.
I keep on trying with other names for the Domoticz device.
Dzga fetches language from domoticz. Turn on debug log. There you can see if your dzga get the settings from domoticz correct.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

When I reset my Domoticz to NL it works partly.
The action is completed normal but Google responds with an error.
Spoiler: show
2020-01-14 10:05:49 - INFO - Request {
"inputs": [
{
"context": {
"locale_country": "NL",
"locale_language": "nl"
},
"payload": {
"commands": [
{
"execution": [
{
"command": "action.devices.commands.SetToggles",
"params": {
"updateToggleSettings": {
"Normaal": true
}
}
}
],
"devices": [
{
"id": "Selector816"
}
]
}
]
},
"intent": "action.devices.EXECUTE"
}
],
"requestId": "3502827826391958633"
}
2020-01-14 10:05:49 - DEBUG - Starting new HTTP connection (1): 192.168.2.239:8080
2020-01-14 10:05:49 - DEBUG - http://192.168.2.239:8080 "GET /json.htm?type=command&param=switchlight&idx=816&switchcmd=Set%20Level&level=20 HTTP/1.1" 200 51
2020-01-14 10:05:49 - DEBUG - Starting new HTTP connection (1): 192.168.2.239:8080
2020-01-14 10:05:49 - DEBUG - http://192.168.2.239:8080 "GET /json.htm?type=devices&rid=816 HTTP/1.1" 200 761
2020-01-14 10:05:49 - DEBUG - {
"Verwarming": {
"state": "Set Level: 20 %",
"type": "Selector",
"willReportState": true,
"idx": 816,
"nicknames": null
}
}
2020-01-14 10:05:49 - DEBUG - Starting new HTTPS connection (1): homegraph.googleapis.com:443
2020-01-14 10:05:50 - DEBUG - https://homegraph.googleapis.com:443 "POST /v1/devices:reportStateAndNotification HTTP/1.1" 400 None
2020-01-14 10:05:50 - ERROR - 400 Client Error: Bad Request for url: https://homegraph.googleapis.com/v1/dev ... tification
2020-01-14 10:05:50 - INFO - Error handling message {'inputs': [{'context': {'locale_country': 'NL', 'locale_language': 'nl'}, 'payload': {'commands': [{'execution': [{'command': 'action.devices.commands.SetToggles', 'params': {'updateToggleSettings': {'Normaal': True}}}], 'devices': [{'id': 'Selector816'}]}]}, 'intent': 'action.devices.EXECUTE'}], 'requestId': '3502827826391958633'}: {'errorCode': 'unknownError'}
2020-01-14 10:05:50 - INFO - Response {
"payload": {
"errorCode": "unknownError"
},
"requestId": "3502827826391958633"
}
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 »

EddyG wrote: Tuesday 14 January 2020 10:16 When I reset my Domoticz to NL it works partly.
The action is completed normal but Google responds with an error.
Spoiler: show
2020-01-14 10:05:49 - INFO - Request {
"inputs": [
{
"context": {
"locale_country": "NL",
"locale_language": "nl"
},
"payload": {
"commands": [
{
"execution": [
{
"command": "action.devices.commands.SetToggles",
"params": {
"updateToggleSettings": {
"Normaal": true
}
}
}
],
"devices": [
{
"id": "Selector816"
}
]
}
]
},
"intent": "action.devices.EXECUTE"
}
],
"requestId": "3502827826391958633"
}
2020-01-14 10:05:49 - DEBUG - Starting new HTTP connection (1): 192.168.2.239:8080
2020-01-14 10:05:49 - DEBUG - http://192.168.2.239:8080 "GET /json.htm?type=command&param=switchlight&idx=816&switchcmd=Set%20Level&level=20 HTTP/1.1" 200 51
2020-01-14 10:05:49 - DEBUG - Starting new HTTP connection (1): 192.168.2.239:8080
2020-01-14 10:05:49 - DEBUG - http://192.168.2.239:8080 "GET /json.htm?type=devices&rid=816 HTTP/1.1" 200 761
2020-01-14 10:05:49 - DEBUG - {
"Verwarming": {
"state": "Set Level: 20 %",
"type": "Selector",
"willReportState": true,
"idx": 816,
"nicknames": null
}
}
2020-01-14 10:05:49 - DEBUG - Starting new HTTPS connection (1): homegraph.googleapis.com:443
2020-01-14 10:05:50 - DEBUG - https://homegraph.googleapis.com:443 "POST /v1/devices:reportStateAndNotification HTTP/1.1" 400 None
2020-01-14 10:05:50 - ERROR - 400 Client Error: Bad Request for url: https://homegraph.googleapis.com/v1/dev ... tification
2020-01-14 10:05:50 - INFO - Error handling message {'inputs': [{'context': {'locale_country': 'NL', 'locale_language': 'nl'}, 'payload': {'commands': [{'execution': [{'command': 'action.devices.commands.SetToggles', 'params': {'updateToggleSettings': {'Normaal': True}}}], 'devices': [{'id': 'Selector816'}]}]}, 'intent': 'action.devices.EXECUTE'}], 'requestId': '3502827826391958633'}: {'errorCode': 'unknownError'}
2020-01-14 10:05:50 - INFO - Response {
"payload": {
"errorCode": "unknownError"
},
"requestId": "3502827826391958633"
}
Problem seems to be report_state:

Code: Select all

400 Client Error: Bad Request for url: https://homegraph.googleapis.com/v1/dev ... tification
it may caused by some bad coding for selector switches
Try set report state to false in description of you selector device. Add to you device description:

Code: Select all

<voicecontrol>
report_state = False
</voicecontrol>
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

Tnx, that did the trick. :D
Btw. In Dutch it has to be said to Google as: "Set Verwarming to Normal" and as "Turn on Normaal on Verwarming"
Or in Dutch as: "Zet Verwarming op Normaal" That works perfect.
I found out that "Dagverlenging" is too difficult for Google so I had to change that to something shorter like "Overwerk"
ddtpv
Posts: 1
Joined: Thursday 09 May 2019 7:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Russia
Contact:

Re: Domoticz to Google Assistant integration

Post by ddtpv »

Hi all!
Though kill, I can’t understand what’s going wrong.
Copy - paste everything correctly. But Google Home is still a error
client_id xxxxxxxx.apps.googlecontent.com invalid

https://6522467d.ngrok.io/smarthome - not supported
https://6522467d.ngrok.io/oauth - response_type must equal "code"
http://6522467d.ngrok.io/token - Page not found!: '/token'

localhost:3030 has no errors in logfile
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 »

ddtpv wrote: Saturday 25 January 2020 8:42 Hi all!
Though kill, I can’t understand what’s going wrong.
Copy - paste everything correctly. But Google Home is still a error
client_id xxxxxxxx.apps.googlecontent.com invalid

https://6522467d.ngrok.io/smarthome - not supported
https://6522467d.ngrok.io/oauth - response_type must equal "code"
http://6522467d.ngrok.io/token - Page not found!: '/token'

localhost:3030 has no errors in logfile
I guess you already figured this out :)
Remove ClientID and ClientSecret from config.yaml then
change clientid and secret to "sampleClientId" and "sampleClientSecret" in google on actions,
then remove those in config.yaml / restart dzga server then update the urls in actions on google, press 'save' then 'test'
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 »

I need some feedback for docker version. I dont use docker for the moment.
Hopefully someone can test in docker.

https://github.com/DewGew/Domoticz-Goog ... zga-docker
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 »

Hi all,

I'm having some issues with Domoticz Google Assistant integration.
When doing exactly as described on https://www.domoticz.com/wiki/Google_Assistant# the command

Code: Select all

bash <(curl -s https://raw.githubusercontent.com/DewGew/dzga-installer/master/install.sh)
doesn't start the webserver on port 3030.

This is the code after the command:

Code: Select all

!-----------------------------------!
Domoticz-Google-Assistant already installed.

 Check for update...

Geraakt:1 http://archive.raspberrypi.org/debian buster InRelease
Geraakt:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Pakketlijsten worden ingelezen... Klaar
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
libffi-dev is reeds de nieuwste versie (3.2.1-9).
libssl-dev is reeds de nieuwste versie (1.1.1d-0+deb10u2).
python3 is reeds de nieuwste versie (3.7.3-1).
python3-dev is reeds de nieuwste versie (3.7.3-1).
python3-venv is reeds de nieuwste versie (3.7.3-1).
python3-pip is reeds de nieuwste versie (18.1-5+rpt1).
De volgende pakketten zijn automatisch geïnstalleerd en zijn niet langer nodig:
  bluealsa distro-info-data docutils-common fonts-piboto gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gmenu-3.0
  gir1.2-gtk-3.0 gir1.2-pango-1.0 gnome-themes-standard gtk2-engines-clearlookspix gtk2-engines-pixflat libbluetooth3
  libgnome-menu-3-0 libimagequant0 librtimulib-dev librtimulib-utils librtimulib7 lxde-common lxplug-bluetooth lxplug-cputemp
  lxplug-ejecter lxplug-network lxplug-ptbatt lxplug-volume lxsession-logout pi-greeter pishutdown pixflat-icons python-apt-common
  python-olefile python-pil python-rtimulib python-sense-hat rpd-plym-splash rpd-wallpaper sgml-base xml-core xsel
Gebruik 'sudo apt autoremove' om ze te verwijderen.
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 26 niet opgewaardeerd.

 Check github for update...

HEAD is now at 46f3a90 [skip travis]
Already up to date.
/dev/fd/63: regel 78: Domoticz-Google-Assistant/env/bin/activate: Bestand of map bestaat niet

 Installing python packages...

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: certifi>=2019.9.11 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 1)) (2019.11.28)
Requirement already satisfied: chardet>=3.0.4 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: future>=0.18.2 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 3)) (0.18.2)
Requirement already satisfied: idna>=2.8 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 4)) (2.8)
Requirement already satisfied: PyYAML>=5.1.2 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 5)) (5.2)
Requirement already satisfied: requests>=2.22.0 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 6)) (2.22.0)
Requirement already satisfied: urllib3>=1.25.7 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 7)) (1.25.8)
Requirement already satisfied: GitPython>=3.0.5 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 8)) (3.0.5)
Requirement already satisfied: google-auth>=1.8.1 in ./.local/lib/python3.7/site-packages (from -r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (1.11.0)
Requirement already satisfied: gitdb2>=2.0.0 in ./.local/lib/python3.7/site-packages (from GitPython>=3.0.5->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 8)) (2.0.6)
Requirement already satisfied: setuptools>=40.3.0 in /usr/lib/python3/dist-packages (from google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (40.8.0)
Requirement already satisfied: rsa<4.1,>=3.1.4 in ./.local/lib/python3.7/site-packages (from google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (4.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in ./.local/lib/python3.7/site-packages (from google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (4.0.0)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (1.12.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./.local/lib/python3.7/site-packages (from google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (0.2.8)
Requirement already satisfied: smmap2>=2.0.0 in ./.local/lib/python3.7/site-packages (from gitdb2>=2.0.0->GitPython>=3.0.5->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 8)) (2.0.5)
Requirement already satisfied: pyasn1>=0.1.3 in ./.local/lib/python3.7/site-packages (from rsa<4.1,>=3.1.4->google-auth>=1.8.1->-r Domoticz-Google-Assistant/requirements/pip-requirements.txt (line 9)) (0.4.8)

  Login to Domoticz Google Assistant Server UI at: http://ip.address:3030/settings
  Default username is admin and default password is admin
  or
  Goto Domoticz-Google-Assistant folder and Edit config.yaml and then
  restart dzga.server e.g 'sudo systemctl restart dzga'
When going to http://ip.address:3030/settings (changed the IP address to the server) I receive a "site unreachable" error.

If I do "'sudo systemctl restart dzga'" and then "'sudo systemctl status dzga" I get this error:

Code: Select all

 sudo systemctl status dzga
● dzga.service - Domoticz-Google-Assistant Service
   Loaded: loaded (/etc/systemd/system/dzga.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-01-29 22:21:43 CET; 38s ago
  Process: 9234 ExecStart=/home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/ (code=exited, status=
 Main PID: 9234 (code=exited, status=203/EXEC)

jan 29 22:21:43 raspberrypi systemd[1]: dzga.service: Service RestartSec=100ms expired, scheduling restart.
jan 29 22:21:43 raspberrypi systemd[1]: dzga.service: Scheduled restart job, restart counter is at 5.
jan 29 22:21:43 raspberrypi systemd[1]: Stopped Domoticz-Google-Assistant Service.
jan 29 22:21:43 raspberrypi systemd[1]: dzga.service: Start request repeated too quickly.
jan 29 22:21:43 raspberrypi systemd[1]: dzga.service: Failed with result 'exit-code'.
jan 29 22:21:43 raspberrypi systemd[1]: Failed to start Domoticz-Google-Assistant Service.
BUT
when I do:
pi@raspberrypi: cd /home/${USER}/
pi@raspberrypi: python3 Domoticz-Google-Assistant

The webserver becomes available and everything works.
When shutting down the Putty session or exiting the running script the webserver dies.

Please help.
How can I fix this?
Is there anyway to run the script in the background?
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 »

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.
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 »

Does this Google assistant integration works on raspbian buster on a rpi 4?

If you used The google sdk library for your integration, this not supported anymore on buster and rpi 4.
Only the sdk service version is supported, and lacks lots off options that the old sdk-lib had...
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: Thursday 30 January 2020 13:06 Does this Google assistant integration works on raspbian buster on a rpi 4?

If you used The google sdk library for your integration, this not supported anymore on buster and rpi 4.
Only the sdk service version is supported, and lacks lots off options that the old sdk-lib had...
Its not depending on the sdk library. Its python 3.7 in buster that might be an issue.
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 »

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...
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest