Cant run commands on Raspberry Pi 3B+
-
Hi !
I successfully setup my Raspberry Pi 3B+ but can't run any commands. My TriggerCMD is linked, too. Alexa is finding the "device" but when I run the command nothing happens. The original commands also didn't work for me.I want to control one LED Strip through Alexa. My config.json looks like following
[ {"trigger":"strip","command":"sudo PYTHONPATH=".:build/lib.linux-armv7l-2.7" python rpi_ws281x/python/examples/strandtest.py -c","ground":"background","voice":"strip","allowParams": "false"} ]The path of the json file is /root/.TRIGGERcmdData/commands.json
Thank you in advance!
-
@rtn17 said in Cant run commands on Raspberry Pi 3B+:
[
{"trigger":"strip","command":"sudo PYTHONPATH=".:build/lib.linux-armv7l-2.7" python rpi_ws281x/python/examples/strandtest.py -c","ground":"background","voice":"strip","allowParams": "false"}
]You need to escape the quotes (using backslashes) in your command because they're inside other quotes (for the json). Please try this instead:
[ { "trigger": "strip", "command": "sudo PYTHONPATH=\".:build/lib.linux-armv7l-2.7\" python rpi_ws281x/python/examples/strandtest.py -c", "ground": "background", "voice": "strip", "allowParams": "false" } ] -
Thank you very much!
I changed the command and added the absolute path.
[ { "trigger": "strip", "command": "sudo python /home/pi/rpi_ws281x/python/examples/strandtest.py -c", "ground": "background", "voice": "strip", "allowParams": "false" } ]Now it's working.
-
@rtn17, awesome. You're welcome.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login