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
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
- Disable file unpack so your changes are not overwritten
- Save userCredentials.json to /data/data/com.ohmnilabs.telebot_rtc/files/assets/node-files/node_modules/ohmni-assistant/userCredentials.json
- 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
- Make sure “Enable OhmniLabs Voice Assistant” is checked in Ohmni’s developer settings menu.
- Say “Hey Ohmni” to wake Ohmni
- When Ohmni response with “Hey”, say your custom command.
Note: check logcat to see if there are errors.