bespoken-virtual-user v0.4.0
Bespoken Test Robot
Client
Bill Of Materials (BOM)
Core Kit:
Device | URL | Dimensions (W x H x D inches) |
---|---|---|
CanaKit Raspberry Pi | Link | 2.25 x 4.00 x 1.25 |
Logitech C920S HD Pro Webcam | Link | 1.00 x 3.70 x 1.20 |
Jabra 410 | Link | 4.50 x 4.50 x 1.00 |
Potential Soundproofing options:
- https://www.amazon.com/gp/product/B01KZ5X7KO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Notes
The camera needs to be about five inches off the ground to be at the proper angle for the Echo Show (Initial Model).
QUESTION - how do we ensure we support different form factors?
The camera is approximately five inches from the device (closer definitely seems to work better).
The microphone and speaker are about the same distance (though farther would likely work fine).
Auxiliary Items
- USB Keyboard and Mouse
Additional Necessary Items
Sound-proof casing?
Physical Setup
Follow the directions. Make sure to:
- Install heatsinks
- Install fan
- Attach the USB keyboard and mouse
- Attach to a TV via HDMI
Raspberry Pi
On first launch:
- Launch raspi-config from a terminal -
sudo raspi-config
- Disable GUI
- Enable Wifi
- Enable SSH
You can always get back to the GUI by entering startx
on the command-line.
Restart, and then:
- Plugin the webcam and speaker to the USB ports.
- The Jabra should be plugged into the top-left USB port
- The Webcam should be plugged into the bottom-left USB port
- NOTE from JPK - I'm not certain the position really matters, but it is best to be consistent
- Run
install.sh
to finish setup - Run
npm test speaker
andnpm test watcher
to do sanity checks on the device
Configuration
The configuration is kept in the conf/client.json
.
{
"pollURL": "https://virtual-device-robot.bespoken.io/poll",
"token": "robot-1"
}
The pollURL can also be set with the environment variable POLL_URL.
Deploy
Restart the raspberry pi to see it is running.
That's all there is to it!
Diagnostics
To verify things are running correctly, ssh to the raspi and run this:tail /var/log/daemon.log
You can monitor the log continuously with:tail -f /var/log/daemon.log
To see if the service is running, enter:systemctl status
To restart the test-robot service, run:sudo systemctl restart test-robot
To get info about the USB devices, run lsusb. You should see listed:
GN Netcom
- that is the Jabra speakerLogitech, Inc. Orbicam
- that is the Logitech Webcam
If either is not listed, that is a problem!
Server
Setup
We create a fargate service like so:
fargate service \
--command "node bin/robot-server.js" \
--name test-robot \
--containerPort 3000 \
--image bespoken/test-robot:${CIRCLE_TAG} \
--hostname virtual-device-robot.bespoken.io \
--cpu 256 \
--memory 512
This is all done via the Circle CI config.
New versions are deployed automatically whenever the repository is tagged.
Just run:
npm version patch
That will do the following:
- Increment the version
- Tag the repo
- Push the changes to Github
- Trigger Circle CI to deploy the new version to Fargate
4 years ago