Setting up Actions on Google

Step 1: Configure a Developer Project

Follow instructions on this link to create a project, enable Google assistant API, enable OAuth consent, register a new device and download client-secrets.json

https://developers.google.com/assistant/sdk/guides/service/python/embed/config-dev-project-and-account

Note: On the OAuth consent page, make sure your project is selected from the top dropdown, then just fill in “Support email” and click “Save” at the bottom to enable.

Step 2: Generate credentials

Follow these instructions to install google-auth-oauthlib, and generate userCredentials.json from client-secrets.json https://developers.google.com/assistant/sdk/guides/service/python/embed/install-sample

Note: Rename the generate credentials.json to userCredentials.json.

Step 3: Ohmni configurations

  1. Disable file unpack so your changes are not overwritten touch /data/data/com.ohmnilabs.telebot_rtc/files/.isunpack
  2. Save userCredentials.json to /data/data/com.ohmnilabs.telebot_rtc/files/assets/node-files/node_modules/ohmni-assistant/userCredentials.json
  3. Go to Ohmni developer’s settings (Tap Version 7 times to enable developer settings) to fill in Voice Assistant Model with the device model you registered.

Step 4: Register Custom Device Actions

Follow the instructions here to define and register custom device actions. You can use the sample actions.json in /data/data/com.ohmnilabs.telebot_rtc/files/assets/node-files/node_modules/ohmni-assistant-system-actions/actions/ https://developers.google.com/assistant/sdk/guides/service/python/extend/custom-actions Note: Do not need follow steps in the last section “Modify the sample”

Step 5: Test it out

  1. Make sure “Enable OhmniLabs Voice Assistant” is checked in Ohmni’s developer settings menu.
  2. Say “Hey Ohmni” to wake Ohmni
  3. When Ohmni response with “Hey”, say your custom command.

Note: check logcat to see if there are errors.