Are you trying to run the command from a console/terminal in Linux, or are you trying to run the command from Python using subprocess?Thonny reports a SyntaxError at the quote after the closing }"
If you are trying to grab the output from the command in Python, you could try to use something like:
Code:
from subprocess import check_outputpost_json = '{"command": "sendCameraCommand","cameras": ["GoPro 9464"],"cameraCommand": "startRecording"}'curl_out = check_output(['curl', '-d', post_json, 'http://192.168.0.108:809'])#Do something with "curl_out"
Statistics: Posted by NotRequired — Fri Apr 12, 2024 5:24 pm