Home:ALL Converter>How to run Google Assistant library (on AIY kit), upon startup of Raspberry Pi?

How to run Google Assistant library (on AIY kit), upon startup of Raspberry Pi?

Ask Time:2018-02-25T09:05:13         Author:Johan Sijp

Json Formatter

We set up a voice kit using Raspberry Pi (using "the MagPi essentials AIY Projects" manual). We are able to enable Google Assistant using the command "src/assistant_library_demo.py" in the dev terminal, after Raspberry Pi starts up. We would like to embed the voice kit in a stuffed animal with a portable power supply (i.e., used to charge cell phone on the go). But when the portable power supply is charged, the Raspberry Pi resets. That requires us to go back into the Raspberry Pi, open the dev terminal, and run the Google Assistant file. My question: Is it possible to run a startup script that automatically runs Google Assistant upon Raspberry Pi starting up? How to do this?

Author:Johan Sijp,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/48969249/how-to-run-google-assistant-library-on-aiy-kit-upon-startup-of-raspberry-pi
Kenttleton :

I ended up creating a crontab job after a 10 second wait. Starting right at boot didn't give it enough time for the internet to connect fully. \n\nIn terminal type:\n\ncrontab -e\n\n\nChoose an option if it asks how you want to open/edit the file. Then at the bottom put:\n\n@reboot sleep 10 && /home/pi/pathtofile > /home/pi/cronlog 2>&1\n\n\nSave the file and reboot or pull the cable out and plug it back in. The cronlog helped me troubleshoot this whole process and get feedback on why it didn't work.",
2018-04-09T23:14:33
yy