Arduino Forum

Community => Bar Sport => Topic started by: Leticiar on Apr 19, 2019, 12:01 am

Title: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 12:01 am
Hello everyone, I am a beginner in coding and I was looking into the eye lock tutorial attached. I wanted to implement the AVS Server into my project but Im struggling to configure it. I was wondering if anyone can further explain the local avs server configuration information in this tutorial. please
https://create.arduino.cc/projecthub/nsci/eye-lock-fd5444?ref=user&ref_id=412906&offset=0#toc-build-notes-2
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 02:08 am
What exactly are you struggling with? That's a fairly large and complicated project to describe in its entirety. Break it into small chunks and focus on one thing at a time.
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 02:19 am
Im struggling with cloning the repository for the AVS sample app. when I put the code into the terminal. it asks for a username and password but I don't think that should be so. The section Im struggling with is where it says Local AVS Server Configuration(the heading is in bold).
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 02:25 am
Im struggling with cloning the repository for the AVS sample app. when I put the code into the terminal. it asks for a username and password but I don't think that should be so.
In order to clone from GitHub you need to setup an account, install Git, and then provide your credentials the first time you try remote cloning. TBH you can probably just download the zip using your browser. You can even do it on your PC, put the zip on a thumb drive and load it onto your RPi like that...
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 02:35 am
yea I made a GitHub account. I also downloaded the zip. Where can I download git though?
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 02:41 am
yea I made a GitHub account. I also downloaded the zip.
Did you put in your credentials when it asked for them?


Where can I download git though?
https://git-scm.com/downloads (https://git-scm.com/downloads)
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 02:45 am
I did and it said folder was empty for some reason
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 02:54 am
it says repository not found. could it be that im missing something. I dont know what it could be though.
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 03:05 am
Can you send a picture/screenshot of your console?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 03:12 am
here it is
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 03:31 am
question does this need to be coded on my raspberry pi or do I need to do it via my terminal on my Mac?
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 03:34 am
Do this instead in your terminal:
Code: [Select]
git clone https://github.com/grahamhoyes/eyeLock2.git eyeLock
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 04:17 am
it worked. thank you
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 04:30 am
Now the second step is giving me problems. for some reason I can run the install script $ alexa-avs-sample-app/automated_install.sh
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 05:12 am
The error is?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 02:59 pm
it says I cannot run the install script $ alexa-avs-sample-app/automated_install.sh
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 07:56 pm
it says I cannot run the install script $ alexa-avs-sample-app/automated_install.sh
Did you try running it as sudo?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 08:03 pm
oh no. let me try
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 08:21 pm
it doesn't work
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 08:48 pm
In the future you need to provide the exact error messages that pop up. I can't see what is on your screen and "it doesn't work" isn't very descriptive.

1.) What is the exact error?
2.) Did you already do "git clone https://github.com/alexa/alexa-avs-sample-app.git"?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 09:05 pm
pi@raspberrypi:~ $ git clone https://github.com/alexa/alexa-avs-sample-app.git
Cloning into 'alexa-avs-sample-app'...
Username for 'https://github.com': leticiarami
Password for 'https://leticiarami@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/alexa/alexa-avs-sample-app.git/' not found

this is what i get when I run the git clone
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 09:13 pm
I am really struggling and I need to complete this project in two days. I dont know what Im doing no more. This is getting really stressful for me
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 09:20 pm
I am really struggling and I need to complete this project in two days. I dont know what Im doing no more. This is getting really stressful for me
I'm sorry about that - I know what that feels like


this is what i get when I run the git clone
Looks like you'll have to download the zip in the same way you downloaded the other repository. You might not've been able to run the .sh because it wasn't there in the first place. If you download the test app zip and extract it, it should be there and able to run
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 09:30 pm
I found this tutorial for the AVS Server Configuration
https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide#2-install-and-configure-dependencies-for-avs-device-sdk-on-your-raspberry-pi

Im going to try to see if I can do it this way
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 10:15 pm
Do you think you can help me with part 2 of the setup your configuration session of the tutorial I just sent please
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 10:42 pm
pi@raspberrypi:~/sdk-folder/sdk-build $ mv ~/Downloads/config.json /home/pi/avs-device-sdk/tools/Install
mv: cannot move '/home/pi/Downloads/config.json' to '/home/pi/avs-device-sdk/tools/Install/config.json': Permission denied
this is what I get after doing step one of setting up my configuration
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 10:50 pm
sudo is your best friend
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 10:51 pm
so how would i use sudo to move the file?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 10:58 pm
ok i did it. Now im struggling with the next step
Run genConfig.sh, including the following as arguments:

bash genConfig.sh config.json {device serial number} \
/{{path to database}} \
/{{path to source folder}}/avs-device-sdk \
{{path to build}}/Integration/AlexaClientSDKConfig.json

i did this and this is what i got
pi@raspberrypi:~/sdk-folder/sdk-build $ bash genConfig.sh config.json {device serial number} \
> /{{path to database}} \
> /{{path to source folder}}/avs-device-sdk \
> {{path to build}}/Integration/AlexaClientSDKConfig.json
bash: genConfig.sh: No such file or directory
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 11:03 pm
Code: [Select]
bash: genConfig.sh: No such file or directory

Looks like you either didn't download the file yet, downloaded it to the wrong place, or specified the wrong path
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:04 pm
i have the file I just found it and its in the right place because its suppose to be in /home/pi/avs-device-sdk/tools/install
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:10 pm
this is what i did
pi@raspberrypi:~/sdk-folder/sdk-build $ cd /home/pi/avs-device-sdk/tools/Installpi@raspberrypi:~/avs-device-sdk/tools/Install $ bash genConfig.sh config.json {device serial number} \
> /{{path to database}} \
> /{{path to source folder}}/avs-device-sdk \
> {{path to build}}/Integration/AlexaClientSDKConfig.json
Usage: genConfig.sh <config.json file> <device_serial_number> <db path> <SDK Source Directory> <output AlexaClientSDKConfig.json file>
1) <config.json file> can be downloaded from developer portal and must contain the following:
  "clientId": "<OAuth client ID>"
  "productId": "<your product name for device>"
2) <device_serial_number> specifies the deviceInfo deviceSerialNumber in the output json file.
3) <db path> specifies the path to where the databases will be located.
4) <SDK Source Directory> specifies the root directory to where the avs-device-sdk source code is located.
5) <output AlexaClientSDKConfig.json file> output file
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 11:11 pm
then why did you try to run it from
Code: [Select]
~/sdk-folder/sdk-build
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:15 pm
I'm a newbie I'm just figuring this out sorry. Do you know how I can create a backup for my AlexaClientSDKConfig.json file?
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 11:20 pm
Doing this all from the terminal can be really difficult for a newbie, can you use the file browser to find/move/backup/etc the file then run the .sh from there? You can launch a .sh from the file browser
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:26 pm
How exactly do i do that though?
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 11:30 pm
https://www.youtube.com/watch?v=Hf5xDsiJdmw (https://www.youtube.com/watch?v=Hf5xDsiJdmw)

You should do some research on how to use Linux before having to do a bunch of Linux stuff for this project
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:34 pm
what command do I use in terminal to back up the file?
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:43 pm
The dd command copies a file converting the file as specified. It is often used to copy an entire disk to a single file or back again. So, for example,  dd if=/dev/sdd of=backup.img will create a backup image from an SD card or USB disk drive at /dev/sdd. Make sure to use the correct drive when copying an image to the SD card as it can overwrite the entire disk.

would this work?
Title: Re: Need help with Local AVS Server Configuration
Post by: Power_Broker on Apr 19, 2019, 11:55 pm
Why do you want to back it up? The two biggest things you need to do is to learn how to move the files into the correct directories and know how to launch bash scripts
Title: Re: Need help with Local AVS Server Configuration
Post by: Leticiar on Apr 19, 2019, 11:58 pm
in the tutorial it says
IMPORTANT: Create a backup of your AlexaClientSDKConfig.json file. Subsequent builds will reset the contents of this file.
this is why I want to back it up. It might not be necessary for my project though so I guess I will just continue on