mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
3.5 KiB
3.5 KiB
Nightscout Google Home/DialogFlow Plugin
Overview
To add Google Home support for your Nightscout site, here's what you need to do:
- Activate the
googlehomeplugin on your Nightscout site, so your site will respond correctly to Google's requests. - Create a custom DialogFlow agent that points at your site and defines certain questions you want to be able to ask.
Activate the Nightscout Google Home Plugin
- Your Nightscout site needs to be new enough that it supports the
googlehomeplugin. It needs to be version VERSION_NUMBER (VERSION_NAME) or later. See updating my version if you need a newer version. - Add
googlehometo the list of plugins in yourENABLEsetting. (Environment variables are set in the configuration section for your monitor. Typically Azure, Heroku, etc.)
Create Your DialogFlow Agent
- Download the Nightscout agent template for Google Home.
- Sign in to Google's Action Console
- Make sure to use the same account that is connected to your Google Home device, Android smartphone, Android tablet, etc.
- Click on the "New Project" button.
- If prompted, agree to the Terms of Service.
- Give your project a name (e.g. "Nightscout") and then click "Create project".
- Click any of the "development experience" options (it really doesn't matter).
- Click on the "Develop" tab at the top of the sreen
- Click on "Invocation" in the left navigation pane.
- Set the display name (e.g. "Nightscout") and set your Google Assistant voice.
- Unfortunately, the name needs to be two words, and has to be unique across all of Google, even though you won't be publishing for everyone on Google to use. So you'll have to be creative in the name since "Night Scout" is already taken.
- Click "Save" in the upper right corner.
- Navigate to "Actions" in the left nagivation pane, then click on the "Add your first action" button.
- Make sure you're on "Cutom intent" and then click "Build" to open DialogFlow in a new tab.
- Sign in with the same Google account you used to sign in to the Actions Console.
- You'll have to go through the account setup steps if this is your first time using DialogFlow.
- Verify the name for your agent (e.g. "Nightscout") and click "CREATE".
- In the navigation pane on the left, click the gear icon next to your agent name.
- Click on the "Export and Import" tab in the main area of the page.
- Click the "IMPORT FROM ZIP" button.
- Select the template file downloaded in step 1.
- Type "IMPORT" where requested and then click the "IMPORT" button.
- After the import finishes, click the "DONE" button followed by the "SAVE" button.
- In the navigation pane on the left, click on "Fulfillment".
- Enable the toggle for "Webhook" and then fill in the URL field with your Nightscout URL:
https://YOUR-NIGHTSCOUT-SITE/api/v1/googlehome - Scroll down to the bottom of the page and click the "SAVE" button.
That's it! Now try asking Google "Hey Google, ask Nightscout how am I doing?"