Created
April 24, 2017 15:09
-
-
Save leth/b95fae5cdd079e8f5c71556cb13f9aaa to your computer and use it in GitHub Desktop.
sony-pm-alt sync setup
This file contains hidden or 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
FROM python:2-alpine | |
RUN apk add --no-cache gphoto2 | |
RUN pip install --no-cache requests | |
RUN mkdir /root/.gphoto | |
ADD gphoto-settings /root/.gphoto/settings | |
ADD sony-pm-alt/sony-pm-alt.py /sony-pm-alt.py | |
VOLUME /var/lib/Sony | |
CMD exec python /sony-pm-alt.py |
This file contains hidden or 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
gphoto2=port=ptpip:192.168.0.32 | |
gphoto2=model=PTP/IP Camera | |
ptp2_ip=guid=00:00:00:00:00:00:00:00:ff:ff:08:00:27:f5:16:4f |
This file contains hidden or 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/sh | |
set -ex | |
docker build --tag=sony-pm-sync --pull . | |
if docker kill -s INT sony-pm-sync; then | |
docker wait sony-pm-sync | |
docker rm sony-pm-sync | |
fi | |
docker run \ | |
-d \ | |
--restart=always \ | |
--name=sony-pm-sync \ | |
--net=host \ | |
-v /mnt/Tank/Photos/Incoming:/var/lib/Sony \ | |
sony-pm-sync |
This file contains hidden or 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
diff --git a/sony-pm-alt.py b/sony-pm-alt.py | |
index 56255d9..1d0fe80 100644 | |
--- a/sony-pm-alt.py | |
+++ b/sony-pm-alt.py | |
@@ -13,7 +13,7 @@ from shutil import move | |
#Probably don't want to change: | |
BCAST_IP = "239.255.255.250" #standard upnp multicast address--don't change | |
UPNP_PORT = 1900 #standard upnp multicast port--don't change | |
-GPHOTO_CMD_ARGS = ["/usr/local/bin/gphoto2","-P","--skip-existing"] | |
+GPHOTO_CMD_ARGS = ["gphoto2","-P","--new", "--skip-existing"] | |
GPHOTO_SETTINGS = "~/.gphoto/settings" #default location gphoto2 uses | |
CUSTOM_LD_LIBRARY_PATH = "/usr/local/lib" #common path if self-compiled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
--new
didn't seem to do anything with my camera, I was just trying it out