Read the statement by Michael Teeuw here.
MMM-GoogleAssistant autostart
-
Looking for some clarifications here. I tried Sam’s suggestion and created a GoogleAssistant.service in /etc/systemd/system. I am a little confused on the command though:
‘/home/pi/MagicMirror/modulesMMM-GoogleAssistant/python3 assistant.py’
The assistant.py file is located in /home/pi/MagicMirror/modules/MMM-GoogleAssistant/pi. And wouldn’t the “python3” command come first? Could someone clarify?
Then, continuing to follow this post, he suggested running:
ps -ef | grep assistant
to find the process id. However, when i try to kill that process id, is says it “No such process”. If I run the same command several times in a row, I get different process ids each time. Is it trying to run via some other pathway and retrying constantly? It wouldn’t surprise me, as I’ve tried to get this working via many methods. How can I track this down?
Thanks for your help!
-
@poopyurinal you are right. python3 should come first.
-
Thanks for clarifying. Any idea on the process id changing with
ps -ef | grep assistant
??
-
@poopyurinal sounds like assistant is ending on its own.
When u do this manually, do you have to be in the module folder?
If you run the python3 path…/assistant.py
When u are NOT in the module folder, does it work, or give an error?
-
I can run the command:
python3 /home/pi/MagicMirror/modules/MMM-GoogleAssistant/pi/assistant.py
as long as I first run:
source /env/bin/activate
It works appropriately after running those two commands. Running the top command in this post without running the bottom command results in an error.
-
@poopyurinal ok, make a two line script to execute both commands, and use that script as the exec script in the service
-
Sorry, can you go into a little more detail on that? How would I create that script?
-
@poopyurinal edit a new file, add the two lines to it, and save.
The do
chmod +x ????
Where ??? is the name of the file you just created
Then make that file name the name of the exec script.
-
Do you mean a shell script? Or a python script?
-
@poopyurinal shell script