Writing /var/lib/dokuwiki/wiki.project-insanity.org/data/meta/avs-alexa.meta failed
avs-alexa
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
avs-alexa [2019/02/14 15:16] – [custom alexa skill] 2a01:4f8:191:327:d4b3:faff:fe55:5d8 | avs-alexa [2021/10/31 10:42] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== alexa sample app ===== | ||
+ | <code bash> | ||
+ | aur sync -c avs-alexa-sampleapp | ||
+ | pacman -S avs-alexa-sampleapp | ||
+ | chown alexa:alexa / | ||
+ | sudo -u alexa / | ||
+ | cp / | ||
+ | </ | ||
+ | <file - ~/ | ||
+ | [...] | ||
+ | load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 | ||
+ | </ | ||
+ | <file - / | ||
+ | default-server = 127.0.0.1 | ||
+ | </ | ||
+ | <code bash> | ||
+ | pulseaudio -k | ||
+ | pulseaudio -D | ||
+ | systemctl start avs-alexa-sampleapp | ||
+ | </ | ||
+ | ===== anbox alexa app ===== | ||
+ | <code bash> | ||
+ | aur sync -c anbox-git anbox-modules-dkms-git anbox-image | ||
+ | pacman -Sy anbox-git anbox-modules-dkms-git anbox-image | ||
+ | modprobe loop | ||
+ | systemctl restart systemd-networkd systemd-resolved | ||
+ | systemctl restart anbox-container-manager | ||
+ | # systemctl --user restart anbox-session-manager | ||
+ | anbox session-manager --gles-driver=host | ||
+ | anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity | ||
+ | adb install | ||
+ | </ | ||
+ | * anbox-image-gapps, | ||
+ | * https:// | ||
+ | * alexa apk | ||
+ | ===== custom alexa skill ===== | ||
+ | <code bash> | ||
+ | aur sync -c python-flask-ask ngrok | ||
+ | pacman -S python-flask-ask ngrok | ||
+ | git clone https:// | ||
+ | cd py-control-arch | ||
+ | python main.py | ||
+ | ngrok http 5000 | ||
+ | </ | ||
+ | alexa skill list: https:// | ||
+ | * create skill | ||
+ | * Skill name: "Arch control" | ||
+ | * Select " | ||
+ | * Select "Self hosted" | ||
+ | * Select "Start from scratch" | ||
+ | * JSON-Editor | ||
+ | |||
+ | * Go to https:// | ||
+ | * Select " | ||
+ | * Select "Your skill" in the upper right corner | ||
+ | * Select "All skills" | ||
+ | * Click on "Arch control" | ||
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | <file - tuxtux.py> | ||
+ | import logging | ||
+ | from flask import Flask | ||
+ | from flask_ask import Ask, statement, question, session | ||
+ | import subprocess | ||
+ | |||
+ | app = Flask(__name__) | ||
+ | app.config[' | ||
+ | ask = Ask(app, "/" | ||
+ | logging.getLogger(" | ||
+ | |||
+ | @ask.intent(" | ||
+ | def suspend(): | ||
+ | subprocess.Popen(" | ||
+ | return statement(" | ||
+ | |||
+ | @ask.intent(" | ||
+ | def suspend(): | ||
+ | subprocess.Popen(" | ||
+ | return statement(" | ||
+ | |||
+ | @ask.intent(" | ||
+ | def suspend(): | ||
+ | subprocess.Popen(" | ||
+ | return statement(" | ||
+ | |||
+ | if __name__ == ' | ||
+ | app.run(debug=True) | ||
+ | </ | ||
+ | * http:// | ||
+ | * https:// |