Page 3 of 15

Re: Domoticz to Google Assistan integration

Posted: Friday 12 April 2019 17:24
by EldigoR
DewGew wrote:
EldigoR wrote: Friday 12 April 2019 15:25
DewGew wrote: Friday 12 April 2019 15:00 ”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 againImage
Working!
Thanks

Re: Domoticz to Google Assistan integration

Posted: Saturday 13 April 2019 14:52
by ressof
When I restart the ”Domoticz-Google-Assistant” or restart my server the devices in Google Home are offline. I must do a sync to get them online again.
Is there a way to automatically do a sync when the service start or is there a bug that causes this behavior?

Re: Domoticz to Google Assistan integration

Posted: Saturday 13 April 2019 16:02
by DewGew
I noticed that to. I thought Google homegraph api took care of this maybe somthing missing in the code.
https://developers.google.com/actions/s ... quest-sync

Edit: homegraph api is for force sync but you restart server you have to manuellt sync in Google Home app or force sync with https://YOUR.URL/sync.

I add force sync at startup. Try latest i dont Know if it works
Did not work..

Re: Domoticz to Google Assistan integration

Posted: Tuesday 16 April 2019 9:54
by ressof
DewGew wrote: Saturday 06 April 2019 20:01 I cant make ’ack = True’ to work. Any ideas?
What is this used for?

Re: Domoticz to Google Assistan integration

Posted: Tuesday 16 April 2019 15:46
by DewGew
ressof wrote: Tuesday 16 April 2019 9:54
DewGew wrote: Saturday 06 April 2019 20:01 I cant make ’ack = True’ to work. Any ideas?
What is this used for?
For example I ask "Turn on kitchen lamp", GA replies "Are you sure you want to turn on kitchen lamp? I answere yes or no.
This works great in english. In swedish 1 time of 100

Re: Domoticz to Google Assistan integration

Posted: Thursday 18 April 2019 8:31
by ressof
I think I have found a bug.

When I ask after a temperature I get an old value. When I ask again then I get the actual value.
Same thing happens in the Google Home App. When I push on a temperature I get an old value and when I go back and push the temperature again I get the actual value.

When I do a sync I get the real values but if the temperature has changed since the sync or the last time I check the temperature I get the temperature old temperature. When I check directly again I get the new one.

Does anybody else has this problem?

Edit:
I see now that the same thing happens on the switches and dimmers.

Re: Domoticz to Google Assistan integration

Posted: Thursday 18 April 2019 10:56
by DewGew
ressof wrote: Thursday 18 April 2019 8:31 I think I have found a bug.

When I ask after a temperature I get an old value. When I ask again then I get the actual value.
Same thing happens in the Google Home App. When I push on a temperature I get an old value and when I go back and push the temperature again I get the actual value.

When I do a sync I get the real values but if the temperature has changed since the sync or the last time I check the temperature I get the temperature old temperature. When I check directly again I get the new one.

Does anybody else has this problem?

Edit:
I see now that the same thing happens on the switches and dimmers.
I think the bug is fixed. Check latest.

Re: Domoticz to Google Assistan integration

Posted: Sunday 02 June 2019 20:14
by wewa
Hello,
I can't connect via Google Home app. I find my [test] service, get redirected to the login page where I enter the Oauth credentials and the Google Home app tells me that it is connecting to my [test] service. But this status window disappears after some time and my [test] service ist not connected.

Here is the log of Domoticz-Google-Assistant:

Code: Select all

python3 Domoticz-Google-Assistant/
Started httpserver on port  3030
No user data
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /oauth?response_type=code&client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https://oauth-redirect.googleusercontent.com/r/domoticz-50811&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 307 -
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /login?client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fdomoticz-50811&redirect=/oauth&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 200 -
127.0.0.1 - - [02/Jun/2019 20:06:49] "POST /login HTTP/1.1" 404 -
127.0.0.1 - - [02/Jun/2019 20:06:50] "GET /sync HTTP/1.1" 200 -
127.0.0.1 - - [02/Jun/2019 20:07:01] "POST /login HTTP/1.0" 301 -
127.0.0.1 - - [02/Jun/2019 20:07:02] "POST /token HTTP/1.0" 200 -
{'requestId': '9166339622774814213', 'inputs': [{'intent': 'action.devices.SYNC'}]}
127.0.0.1 - - [02/Jun/2019 20:07:05] "POST /smarthome HTTP/1.0" 200 -
What is the problem here?

Best regards,
wewa

Re: Domoticz to Google Assistan integration

Posted: Monday 03 June 2019 7:27
by DewGew
wewa wrote: Sunday 02 June 2019 20:14 Hello,
I can't connect via Google Home app. I find my [test] service, get redirected to the login page where I enter the Oauth credentials and the Google Home app tells me that it is connecting to my [test] service. But this status window disappears after some time and my [test] service ist not connected.

Here is the log of Domoticz-Google-Assistant:

Code: Select all

python3 Domoticz-Google-Assistant/
Started httpserver on port  3030
No user data
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /oauth?response_type=code&client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https://oauth-redirect.googleusercontent.com/r/domoticz-50811&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 307 -
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /login?client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fdomoticz-50811&redirect=/oauth&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 200 -
127.0.0.1 - - [02/Jun/2019 20:06:49] "POST /login HTTP/1.1" 404 -
127.0.0.1 - - [02/Jun/2019 20:06:50] "GET /sync HTTP/1.1" 200 -
127.0.0.1 - - [02/Jun/2019 20:07:01] "POST /login HTTP/1.0" 301 -
127.0.0.1 - - [02/Jun/2019 20:07:02] "POST /token HTTP/1.0" 200 -
{'requestId': '9166339622774814213', 'inputs': [{'intent': 'action.devices.SYNC'}]}
127.0.0.1 - - [02/Jun/2019 20:07:05] "POST /smarthome HTTP/1.0" 200 -
What is the problem here?

Best regards,
wewa
Check your urls and settings on Actions on Google. Are you running on same machine as domoticz?

Re: Domoticz to Google Assistan integration

Posted: Monday 03 June 2019 16:25
by wewa
DewGew wrote: Monday 03 June 2019 7:27
wewa wrote: Sunday 02 June 2019 20:14 [...]
Check your urls and settings on Actions on Google. Are you running on same machine as domoticz?
I double checked the urls in Actions. All seem correct:
Build - Actions: https://[MYURL]/smarthome
Advanced Options - Account linking - Authorization URL: https://[MYURL]/oauth
Advanced Options - Account linking - Token URL: https://[MYURL]/token

And yes, I run everything on the same machine (a raspberry pi with raspian stretch). Domoticz and Domoticz-Google-Assistant run there and I use nginx on the raspberry as a reverse proxy.

Any suggestions or further hints on how to debug this issue?

Re: Domoticz to Google Assistan integration

Posted: Tuesday 04 June 2019 8:59
by ressof
Ive added an dummy switch with switch type "Blinds" and it is visible in the Google Home App when I do a sync.
But I cannot open it or close it. The icon of the blind in Google Home App show a cogwheel in top right corner and when i push it I only get some information about it. No way of controlling it.
Is there a way to fix this?

Re: Domoticz to Google Assistan integration

Posted: Tuesday 04 June 2019 14:00
by DewGew
ressof wrote: Tuesday 04 June 2019 8:59 Ive added an dummy switch with switch type "Blinds" and it is visible in the Google Home App when I do a sync.
But I cannot open it or close it. The icon of the blind in Google Home App show a cogwheel in top right corner and when i push it I only get some information about it. No way of controlling it.
Is there a way to fix this?
Its a google issue. They haven't released any touch control for this yet. But it works with open/close blind by voice.

Re: Domoticz to Google Assistan integration

Posted: Tuesday 04 June 2019 20:26
by wewa
wewa wrote: Sunday 02 June 2019 20:14 Hello,
I can't connect via Google Home app. I find my [test] service, get redirected to the login page where I enter the Oauth credentials and the Google Home app tells me that it is connecting to my [test] service. But this status window disappears after some time and my [test] service ist not connected.

Here is the log of Domoticz-Google-Assistant:

Code: Select all

python3 Domoticz-Google-Assistant/
Started httpserver on port  3030
No user data
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /oauth?response_type=code&client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https://oauth-redirect.googleusercontent.com/r/domoticz-50811&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 307 -
127.0.0.1 - - [02/Jun/2019 20:06:46] "GET /login?client_id=400836786661-e2h8l5tfrprj8ij90sconshcj9gh0h9c.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fdomoticz-50811&redirect=/oauth&state=CrQCQVBoSlZ2ZWFzdEZrVzd3RGpfamlzS3laWVpMSHpmNHpXUUotM0ZZUG9qejc5cG04bVRueER2RWwySzdEN1BjZjhFallaTThrNEZDSlJOZzVneXJGcXJyT1VFVThfU3A4ZmRVcUZoRnFULWtLQVNIcld2dkJqLWQ0ZWVNUnJRSTRoZ0dsa1pPUWkzZlkyU2FBb2F4VFJYXzdkRTlROElFdmtBYzM5NEJLSVljT215b2FoVGoxNjlsY0laUHlfb0VWLXphOUpVbVp3aVBJNk5DNXhPNUg5ek1pZEpubHZJYm13RUdxUEZUMzRJa1JIeFFxamhpbjhpWXNDYVJ5dW40dDZ1anRkei0tUlVaeGlwV1EyNzB5RjhrY0VDQnRJVVNzTDhLaWs1NDd0dERQVmFPS3hzVUYSHGFzc2lzdGFudC1oYW5kb2ZmOi8vY29tcGxldGUiPWh0dHBzOi8vb2F1dGgtcmVkaXJlY3QuZ29vZ2xldXNlcmNvbnRlbnQuY29tL3IvZG9tb3RpY3otNTA4MTEqEHdld2EwMEBnbWFpbC5jb20yEmRvbW90aWN6LTUwODExX2Rldg HTTP/1.0" 200 -
127.0.0.1 - - [02/Jun/2019 20:06:49] "POST /login HTTP/1.1" 404 -
127.0.0.1 - - [02/Jun/2019 20:06:50] "GET /sync HTTP/1.1" 200 -
127.0.0.1 - - [02/Jun/2019 20:07:01] "POST /login HTTP/1.0" 301 -
127.0.0.1 - - [02/Jun/2019 20:07:02] "POST /token HTTP/1.0" 200 -
{'requestId': '9166339622774814213', 'inputs': [{'intent': 'action.devices.SYNC'}]}
127.0.0.1 - - [02/Jun/2019 20:07:05] "POST /smarthome HTTP/1.0" 200 -
What is the problem here?

Best regards,
wewa
This only seemed to be a temporary issue with the Google Home App. Today I tested again and it works now without any changes.



I only have a problem with the one switch I configured in config.py.
Here I get following log output.

Code: Select all

{'requestId': '15388229233139809990', 'inputs': [{'intent': 'action.devices.EXECUTE', 'context': {'locale_language': 'en'}, 'payload': {'commands': [{'execution': [{'params': {'on': True}, 'command': 'action.devices.commands.OnOff'}], 'devices': [{'id': 'Light/Switch1'}]}]}}]}
Unable to execute action.devices.commands.OnOff for Light/Switch1 - challenge needed
127.0.0.1 - - [04/Jun/2019 20:25:55] "POST /smarthome HTTP/1.0" 200 -
This switch/light is configured like this:

Code: Select all

#Additional nicknames and room configuration
DEVICE_CONFIG = {
    '1' : {
            'nicknames' : ['Licht'],
            'room' : 'Heizung' ,
            'ack' : True}     
}
What I did so far is that I tried with DOMOTICZ_SWITCH_PROTECTION_PASSWD = False. This did not work so I also set 0000 as switch protection password in Domoticz and enabled the protection for this switch and also set the password in config.py with DOMOTICZ_SWITCH_PROTECTION_PASSWD = '0000'. This also did not change anything.

What is the issue here?

Re: Domoticz to Google Assistan integration

Posted: Wednesday 05 June 2019 14:31
by DewGew
Try to set 'ack' : False or remove that line
DOMOTICZ_SWITCH_PROTECTION_PASSWD must be the same as in domoticz settings (works only with numbers).
if you have password protection in domoticz you have to disable this in that device in domoticz for not using a pin in GA.

Re: Domoticz to Google Assistan integration

Posted: Wednesday 05 June 2019 15:34
by DewGew
ressof wrote: Tuesday 04 June 2019 8:59 Ive added an dummy switch with switch type "Blinds" and it is visible in the Google Home App when I do a sync.
But I cannot open it or close it. The icon of the blind in Google Home App show a cogwheel in top right corner and when i push it I only get some information about it. No way of controlling it.
Is there a way to fix this?
I made some changes on OpenClose. Try out latest..

Re: Domoticz to Google Assistan integration

Posted: Monday 10 June 2019 17:39
by wewa
DewGew wrote: Wednesday 05 June 2019 14:31 Try to set 'ack' : False or remove that line
DOMOTICZ_SWITCH_PROTECTION_PASSWD must be the same as in domoticz settings (works only with numbers).
if you have password protection in domoticz you have to disable this in that device in domoticz for not using a pin in GA.
It worked with removing the 'ack' line. Thank you.

Re: Domoticz to Google Assistan integration

Posted: Tuesday 11 June 2019 8:48
by DewGew
wewa wrote: Monday 10 June 2019 17:39
DewGew wrote: Wednesday 05 June 2019 14:31 Try to set 'ack' : False or remove that line
DOMOTICZ_SWITCH_PROTECTION_PASSWD must be the same as in domoticz settings (works only with numbers).
if you have password protection in domoticz you have to disable this in that device in domoticz for not using a pin in GA.
It worked with removing the 'ack' line. Thank you.
This works in my config. Ack is disabled:

Code: Select all

DEVICE_CONFIG = {
    '382' : {
            'nicknames' : ['Dining Room Light'],
            'ack' : False},
}
Ack is enabled:

Code: Select all

DEVICE_CONFIG = {
    '382' : {
            'nicknames' : ['Dining Room Light'],
            'ack' : True},
}
But works only in english. Other languages plans to work sometime around Q3 according to google.
User: turn on the dining room light.
Google Assistant: turning on the dining room light. Are you sure?
User: Yes.
Google Assistant: turning on the dining room light.

Re: Domoticz to Google Assistan integration

Posted: Wednesday 12 June 2019 15:33
by DewGew
New update on github.
Added arm level to security device.
User: Set the security system to armed away.
Google Assistant: Can I have your security code?
User: 1234
Google Assistant: Ok, arming the security system to armed away.
user: Is my security system armed?
Google Assistant: The security system is armed to armed away.
Change this in config.py for user-friendly name for the arm levels in your language:

Code: Select all

ARMHOME = {
    "level_synonym": ["armed home", "low security", "home and guarding", "level 1", "home", "SL1"], # Custom levelnames for armed home
    "lang": "en" # language
    }
          
ARMAWAY = {
    "level_synonym": ["armed away", "high security", "away and guarding", "level 2", "away", "SL2"], # Custom levelnames for armed away
    "lang": "en" # language
    }

Re: Domoticz to Google Assistan integration

Posted: Wednesday 12 June 2019 22:58
by Phantom
Thanks for the update :)

Re: Domoticz to Google Assistan integration

Posted: Friday 14 June 2019 21:58
by GreenSmart01
Hi,

when I follow the instructions (https://www.domoticz.com/wiki/Google_Assistant), I get stuck on step
Select your device app eg: "[test] Your Appname"
Follow the steps to complete setup

my phone / app then says that it cannot execute the command. (could't update setting. check your connection.
nothing is then added.

when i ll go to the ip with /token
in the logs is see;
192.168.11.xxx - - [14/Jun/2019 22:13:42] "POST /token HTTP/1.1" 400 -
a message says there no page.

with the ip adres / oauth
ill get a message;
response_type must equal "code"

with the ip adres / smarthome
ill get a message says;
not supported


Can someone tell me what I did wrong?
Thanks in advance :-)