kercre123 / wire-prod-pod

49 stars 9 forks source link

(DEPRECATED) wire-prod-pod

This repository has been archived!! These instructions are old and this code is old. wire-pod, on the other hand, works great with regular production Vectors, and has more features. Please use wire-pod.


Installation

Some general notices for production Vectors:

Prerequisites

Set up the bot

  1. Put your Vector on the charger and hold the button for 15 seconds. The light will turn off after ~5 seconds, that is normal. Just keep holding until he turns back on (This is not the same as clearing user data. Do NOT clear user data).

  2. He should be at a screen that shows anki.com/v. On a computer with Bluetooth support (preferably Windows or macOS), go to https://keriganc.com/vector-epod-setup in Chrome or Edge and follow the instructions. The download may take a few minutes to start.

  3. Wait for that to finish. Once he has rebooted, continue on to the next set of instructions.

Set up wire-pod

wire-pod can be setup either on a Raspberry Pi, pretty much any Linux desktop, or on Windows 10/11 via WSL.

Only do one of the following sets of instructions.

After you have followed one of the installation instructions, continue on to "Finish setting up the bot".

Option one: Raspberry Pi 4

  1. Download and install Raspberry Pi Imager, insert a micro-SD card into your computer/into a reader

  2. Follow along with this video. This is an example of how I would set it up for my network/liking. The only things you should change are the user password (located under pi, change it to anything you want and make sure you remember it) and the network information (you should put your network name instead of AnkiRobits, your network password instead of KlaatuBaradaNikto!)

  3. Insert the SD card into your Pi, wait a few minutes for it to boot up

  4. On your computer, open up a Terminal (or Powershell on Windows) and run the following command:

ssh pi@escapepod
  1. If it gives you a prompt, enter yes. Then enter in the user password you chose in Raspberry Pi Imager (under pi)

  2. The terminal should show pi@escapepod ~ $. If you are there, run the following command:

wget -O - https://keriganc.com/setup-wire-pod.sh | bash
  1. After that completes, open a browser and go to http://escapepod:8080. From there, click on "Set up wire-pod" and do as it says. You do not need to do the part at the bottom where it says Choose file, that is reserved for OSKR/dev bots.

  2. Voice commands should now work!

Option two: (almost) Any Linux system

(Your distribution must have either pacman, dnf, or apt, make sure you have ports 443 and 8080 open)

  1. Open a terminal and run this command:
wget -O - https://keriganc.com/setup-wire-pod.sh | bash

(if it asks for a password, enter it)

  1. Once that has completed, go to http://escapepod:8080 in a browser and click on Set up wire-pod (API keys, STT service, etc). From there, follow the instructions. It should then be set up.

Option three: Windows 10/11 via WSL

TODO: tutorial video

  1. Open up Powershell as administrator

    • Open the start menu, type in Powershell, right click, click "Run as administrator"
  2. Enter the following commands (this will change your computer's name to escapepod):

Rename-Computer -NewName "escapepod"
wsl --install
  1. Reboot your computer.

  2. After the reboot, Ubuntu should install. Wait for it to finish.

  3. The Ubuntu installer should ask for a UNIX username. Enter one. example: wire

  4. It should then ask for a UNIX password. Make sure you remember this! It will not show any indication that you are typing anything, that is normal.

  5. You should now be at an Ubuntu terminal. In that terminal, run the following command:

sudo apt install net-tools
  1. Open up Powershell as administrator

    • Open the start menu, type in Powershell, right click, click "Run as administrator"
  2. In Powershell, run the following command. When it asks for a confirmation, enter Y.

Set-ExecutionPolicy Bypass

  1. In Powershell, the the following commands:
cd ~
curl -o wsl-firewall.ps1 https://keriganc.com/wsl-firewall.ps1
.\wsl-firewall.ps1
  1. Return to the Ubuntu terminal and enter the following command:
wget -O - https://keriganc.com/setup-wire-pod.sh | bash

(if it asks for a password, enter what you entered for the UNIX password earlier)

  1. Once that is finished, run the following command to start the server:
cd ~/wire-prod-pod
sudo ./chipper/start.sh
  1. Go to http://escapepod:8080 in a browser and click on Set up wire-pod (API keys, STT service, etc). From there, follow the instructions. It should then be set up and voice commands should now work on Vector.

(NOTE: You have to keep the Ubuntu terminal open. If you ever reboot, you will have to open Ubuntu again and enter the following commands to start the voice server, because it does not start on system startup:)

cd ~/wire-prod-pod
sudo ./chipper/start.sh

Finish setting up the bot

  1. On a device with Bluetooth (can be the same machine as what wire-prod-pod is running on), go to vector-epod-setup and follow the instructions.

  2. When it gets to a button showing "ACTIVATE", click it. If it shows up again, click on it again.

  3. Enter user settings and press "SUBMIT". Vector should then be fully set up!


Updating

Wire-pod auto-updates once a day. To force an update, run the following commands:

cd ~/wire-prod-pod
sudo ./update.sh

Web interface

Chipper hosts a web interface at port 8080. This can be used to create custom intents and to configure specific bots.

To get to it, open a browser and go to http://serverip:8080, replacing serverip with the IP address of the machine running the chipper server. If you are running the browser on the machine running chipper, you can go to http://localhost:8080


Status

OS Support:

Architecture support:

Things wire-prod-pod has worked on:

General notes:

Current implemented actions:

Credits