Skip to content

Send request to Google Assistant by pushing Amazon Dash Button.

License

Notifications You must be signed in to change notification settings

eholic/dash-assistant

Repository files navigation

dash-assistant

Send request to Google Assistant by pushing Amazon Dash Button.

Preparation

Follow the instruction of Google Assistant SDK.

End of the instruction, you would have DEVICE_MODEL_ID and credentials.json.

Also, you need to install some libraries.

$ sudo apt install tcpdump
$ pip install -r requirements.txt

Usage

Set the following environment values for Google Assistant.

  • DEVICE_ID
  • DEVICE_MODEL_ID Identifier defined by Actions Console
  • CREDENTIALS Path of credentials.json
# example
export DEVICE_ID=`uuid`
export DEVICE_MODEL_ID="my-devices-project-prototype-light-v1"
export CREDENTIALS="/path/to/.config/google-oauthlib-tool/credentials.json"

You could modify config.py directly.

And, please associate your own amazon dash's MAC with Google Assistant request in dashes.yml.

# example of dashes.yml
actions:
  # "dash's mac address": "text request to Google Assistantr"
  "12:34:56:78:90:AA": "Turn on TV"
  "12:34:56:78:90:BB": "Turn off TV"

You can inspect MAC by running amazon_dash.py or use other libraries (e.g. Nekmo/amazon-dash)

Then, run main.py.

$ sudo -E python3 main.py
Ready to press Amazon Dash Button
2020-06-17 21:32:02,384 - root - INFO - 12:34:56:78:90:AA is pressed.
2020-06-17 21:32:02,391 - root - INFO - Turn on TV

References

About

Send request to Google Assistant by pushing Amazon Dash Button.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages