Last active
October 2, 2023 12:47
-
-
Save thinkier/db2ddfc42dd933d4ff2996f7f48de76c to your computer and use it in GitHub Desktop.
Upload a libcamera-jpeg snapshot to Prusa Connect using this shell script and curl!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOKEN='YOUR_TOKEN_HERE' | |
FINGERPRINT=$(hostname | sha1sum) | |
IMAGE_PATH='/tmp/snapshot.jpg' | |
libcamera-jpeg -n --rotation 180 -o "$IMAGE_PATH" | |
curl -X PUT \ | |
-H "Token: $TOKEN" \ | |
-H "Fingerprint: $FINGERPRINT" \ | |
--data-binary "@$IMAGE_PATH" \ | |
https://webcam.connect.prusa3d.com/c/snapshot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment