Skip to content

Update Google Assistant services description and request sync timeout#19113

Merged
cgarwood merged 5 commits intohome-assistant:devfrom
edif30:dev
Dec 9, 2018
Merged

Update Google Assistant services description and request sync timeout#19113
cgarwood merged 5 commits intohome-assistant:devfrom
edif30:dev

Conversation

@edif30
Copy link
Copy Markdown
Contributor

@edif30 edif30 commented Dec 8, 2018

Description:

#17415 was merged to dev but not master. Since then the init.py has been updated to reflect other changes. This PR brings the previous PR and current together. Previous #17415 was being tested and I can confirm is valid. @awarecan sorry about the delay and misunderstanding. I have also updated the services.yaml to reflect the correct ID to use. I will submit another PR to update documentation.

Also, the request sync timeout was set to 5s. Routinely the service would sync but throw an error indicating that "Could not contact Google for request_sync". This was not the case. The service did sync and new devices would show up. However Google was not responding within the 5s timeout threshold. I tested up to 10s and sometimes the same thing would happen. A safe value ended up being 15s. I have a very large amount of devices sync'd to GA (200+) and this is likely the reason for Googles response taking longer than 5s.

Related issue (if applicable): fixes #17380

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

request_sync:
  description: Send a request_sync command to Google.
  fields:
    agent_user_id:
      description: "Optional. Only needed for automations. Specific Home Assistant user id (not username, ID in configuration > users > under username) to sync with Google Assistant. Do not need when you call this service through Home Assistant front end or API. Used in automation script or other place where context.user_id is missing."

Checklist:

  • The code change is tested and works locally.

@homeassistant homeassistant added cla-signed small-pr PRs with less than 30 lines. labels Dec 8, 2018
@ghost ghost added the in progress label Dec 8, 2018
@edif30 edif30 changed the title Fix google assistant request sync service call Update Google Assistant services description Dec 8, 2018
Change from 5s to 15s to allow Google to respond.  5s was too short.  The service would sync but the service call would time out and throw the error.
@edif30 edif30 changed the title Update Google Assistant services description Update Google Assistant services description and request sync timeout Dec 8, 2018
@cgarwood cgarwood merged commit fd5b92b into home-assistant:dev Dec 9, 2018
@ghost ghost removed the in progress label Dec 9, 2018
thibmaek added a commit to thibmaek/home-assistant that referenced this pull request Dec 10, 2018
…into feature/nmbs-sensor

* 'dev' of https://github.com/home-assistant/home-assistant: (325 commits)
  Update translations
  Updated frontend to 20181210.0
  Lovelace using storage (home-assistant#19101)
  Update pygtfs to upstream's 0.1.5 (home-assistant#19151)
  Update radiotherm to 2.0.0 and handle change in tstat error detection (home-assistant#19107)
  Upgrade sphinx-autodoc-typehints to 1.5.2 (home-assistant#19140)
  Update geizhals dependency (home-assistant#19152)
  Upgrade mypy to 0.650 (home-assistant#19150)
  Upgrade upcloud-api to 0.4.3
  Upgrade youtube_dl to 2018.12.03 (home-assistant#19139)
  Upgrade slacker to 0.12.0
  Add code support for iAlarm (home-assistant#19124)
  Fixed doorbird config without events (empty list) (home-assistant#19121)
  Remove marking device tracker stale if state is stale (home-assistant#19133)
  Update Google Assistant services description and request sync timeout (home-assistant#19113)
  update edp_redy version (home-assistant#19078)
  Add Philips Moonlight Bedside Lamp support (home-assistant#18496)
  Upgrade Mill library (home-assistant#19117)
  Don't avoid async_schedule_update_ha_state by returning false (home-assistant#19102)
  Fix the Xiaomi Aqara Cube rotate event of the LAN protocol 2.0 (Closes: home-assistant#18199) (home-assistant#19104)
  ...
thibmaek added a commit to thibmaek/home-assistant that referenced this pull request Dec 12, 2018
* origin/dev: (333 commits)
  Add raw service data to event (home-assistant#19163)
  Updated frontend to 20181210.1
  Google assistant fix target temp for *F values. (home-assistant#19083)
  Fix lovelace save (home-assistant#19162)
  Drop OwnTracks bad packets (home-assistant#19161)
  Update translations
  Updated frontend to 20181210.0
  Lovelace using storage (home-assistant#19101)
  Update pygtfs to upstream's 0.1.5 (home-assistant#19151)
  Update radiotherm to 2.0.0 and handle change in tstat error detection (home-assistant#19107)
  Upgrade sphinx-autodoc-typehints to 1.5.2 (home-assistant#19140)
  Update geizhals dependency (home-assistant#19152)
  Upgrade mypy to 0.650 (home-assistant#19150)
  Upgrade upcloud-api to 0.4.3
  Upgrade youtube_dl to 2018.12.03 (home-assistant#19139)
  Upgrade slacker to 0.12.0
  Add code support for iAlarm (home-assistant#19124)
  Fixed doorbird config without events (empty list) (home-assistant#19121)
  Remove marking device tracker stale if state is stale (home-assistant#19133)
  Update Google Assistant services description and request sync timeout (home-assistant#19113)
  ...
@balloob balloob mentioned this pull request Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed small-pr PRs with less than 30 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google_assistant.request_sync at homeassistant start

4 participants