I’m on version 0.91.1
I’m using DynDNS for my DDNS service.
I’m using Lets Encrypt for my cert. (cert valid until May)
I have a reverse proxy server (nginx) forwarding incoming traffic to my HASS server
Successful commands on my google home:
Me - Ok Google, sync devices.
Response - You got it, syncing devices for “the name of my google actions” and Nest.
Not Successful commands on my google home:
Me - Ok Google, turn on the family room lights.
Response - Sorry, there was an error for the family room lights.
I can turn on/off the family room lights from HASS web ui.
Here is my reverse proxy (nginx) config snippet:
server {
# Update this line to be your domain
server_name ha.<myDDNS domain>;
# These shouldn't need to be changed
listen [::]:80 default_server ipv6only=off;
return 301 https://$host$request_uri;
}
server {
# Update this line to be your domain
server_name ha.<myDDNS domain>;
# Ensure these lines point to your SSL certificate and key
ssl_certificate /etc/letsencrypt/live/ha.<myDDNS domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ha.<myDDNS domain>/privkey.pem;
# Ensure this line points to your dhparams file
# ssl_dhparam /etc/nginx/ssl/dhparams.pem;
# These shouldn't need to be changed
listen 443 ssl ipv6only=off http2; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
proxy_buffering off;
location / {
proxy_pass http://<IP of HASS>:8123;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Here is some of my HASS Google Assistant snippet:
google_assistant:
project_id: !secret google_assistant_project_id
api_key: !secret google_assistant_api_key
exposed_domains:
- switch
- light
- group
entity_config:
###INCLUDE:
light.family_room_lights:
name: Family Room Lights # Google - Family Room Group
expose: true
light.upstairs_lights:
name: Upstairs Lights # Google - Upstairs Group
expose: true
light.living_room_lights:
name: Living Room Lights # Google - Living Room Group
expose: true
light.foyer_light:
name: Foyer Light
expose: true
light.downstairs_lights: # Google - Downstairs Group
name: Downstairs Lights
expose: true
light.common_lights: # Google - No Group
name: Common Lights
expose: true
light.dining_room_light: # Google - Dining Room Group
name: Dining Room Light
expose: true
switch.chandelier:
name: Chandelier
expose: true
Here is the “home-assistant.log” log entry when I perform the following command:
Me - Ok Google, turn on the family room lights.
Response - Sorry, there was an error for the family room lights.
2019-04-06 10:04:54 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Unexpected error
Traceback (most recent call last):
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 240, in _process
'requestId': data.request_id,
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 367, in handle_devices_execute
if state is None:
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 190, in execute
"""Execute a command.
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/components/google_assistant/trait.py", line 245, in execute
fan.DOMAIN,
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 188, in handle_service
self._platforms.values(), func, call, service_name
File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/helpers/service.py", line 298, in entity_service_call
permission=POLICY_CONTROL
homeassistant.exceptions.Unauthorized: Unauthorized
2019-04-06 10:04:54 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Error handling message {'inputs': [{'context': {'locale_language': 'en'}, 'intent': 'action.devices.EXECUTE', 'payload': {'commands': [{'devices': [{'id': 'light.family_room_lights'}], 'execution': [{'command': 'action.devices.commands.OnOff', 'params': {'on': False}}]}]}}], 'requestId': '3459004193181281431'}: {'errorCode': 'unknownError'}