Yes, I'm trying to access it from anywhere. I want to be able to monitor the cams if I'm away for any length of time.jbeale wrote:Do you mean from a larger subnet, or that you want to get in from anywhere on the internet? Normally your router's NAT (address translation) does not make your Pi visible to the world, so first you need to figure out your IP address as seen from the outside, and also if your ISP allows traffic to whatever port you're forwarding to the Pi.boomlikethat wrote: can't seem to be able to get to my PiKrellCam interfaces from outside my local network.
Even before that though, please consider your security plan... It's not something I've tried myself, because without considerable thought and preparation I know a whole network can be "owned" just boom... like that.
Can you give me some guidance on this? I use port 80 for 2 Pi's with PiKrellCam, and have tried to set destination ports to, say, 10101 and 10102. So I should be able to access it using <public IP address>:10101 or :10102woodside wrote:I was interested to read your comments re security when accessing PiKrellCam via the internet and have to say that I have been doing this on and off for some time using port forwarding on the router.
Are you saying there's a danger in doing this and if so could you please provide more information... I certainly don't want my network going boom!!! Thanks
If you use from outside <public IP address>:10101 then the router must be set up to port forward 10101 to the LAN DHCPboomlikethat wrote:Can you give me some guidance on this? I use port 80 for 2 Pi's with PiKrellCam, and have tried to set destination ports to, say, 10101 and 10102. So I should be able to access it using <public IP address>:10101 or :10102woodside wrote:I was interested to read your comments re security when accessing PiKrellCam via the internet and have to say that I have been doing this on and off for some time using port forwarding on the router.
Are you saying there's a danger in doing this and if so could you please provide more information... I certainly don't want my network going boom!!! Thanks
I have a friend who's helping me test it, but it always times out on him. So something isn't right.
Thanks!
Thanks for the help billw and jbeale. I think I got it, but need to test it.billw wrote:If you use from outside <public IP address>:10101 then the router must be set up to port forward 10101 to the LAN DHCPboomlikethat wrote:Can you give me some guidance on this? I use port 80 for 2 Pi's with PiKrellCam, and have tried to set destination ports to, say, 10101 and 10102. So I should be able to access it using <public IP address>:10101 or :10102woodside wrote:I was interested to read your comments re security when accessing PiKrellCam via the internet and have to say that I have been doing this on and off for some time using port forwarding on the router.
Are you saying there's a danger in doing this and if so could you please provide more information... I certainly don't want my network going boom!!! Thanks
I have a friend who's helping me test it, but it always times out on him. So something isn't right.
Thanks!
assigned address assigned to your Pi by the router. So, if your router has given the Pi say, 192.168.0.104, then the 10101
port has to be port forwarded to 192.168.0.104 in your router configuration. So get your LAN DHCP assigned IP by running
sudo ifconfig -a. Look in the output for something like: inet addr:192.168.0.104 for your interface.
Then log into your router config and set port forwarding of 10101 to 192.168.0.104 or whatever yours is.
I do this for many Pi's but I can't count on my router giving a fixed DHCP IP, so I go through additional steps to set up a
static IP alias on each Pi and I configure the router to port forward to the alias static IP.
But at least you should be able to get it working with the dynamic IPs first. Then worry about that.
And in the pikrellam install script you have to set up using the port 10101.
I've been doing this for ssh (with iptable firewall rules) and for pikrellcam with nginx password set since the beginning and
haven't had any issues yet. But then I don't keep anything valuable on my Pi's and I don't open up ports on my desktop,
so use your own judgment.
Code: Select all
15 * * * * sudo -u pi /home/pi/pikrellcam/scripts/pk-archive 2>&1 | /usr/bin/logger -t PK-Archive
Code: Select all
#!/bin/bash
_ARCHIVE_OLDER_DAYS="-1 Days" # how many days old for media before archiving
# _VOLUME="/dev/sda1" # volume to check for disk space usage
_VOLUME="/dev/root" # volume to check for disk space usage
_USED_SPACE_LIMIT=85 # percent disk space used over which files are deleted
echo "archive_still day `date --date="$_ARCHIVE_OLDER_DAYS" +'%F'`"
# Move _ARCHIVE_OLDER_DAYS stills and video to that date's archive folder
echo "archive_still day `date --date="$_ARCHIVE_OLDER_DAYS" +'%F'`" > /home/pi/pikrellcam/www/FIFO
echo "archive_video day `date --date="$_ARCHIVE_OLDER_DAYS" +'%F'`" > /home/pi/pikrellcam/www/FIFO
# if used space is over threshold, delete old files and directories to save storage space until threshold reached
# this keeps as much as possible files present
_USED_SPACE=`df | grep $_VOLUME | awk '{print $5}' | sed -e "s/\%//g"`
# echo "used space: $_USED_SPACE%"
if [[ ( "$_USED_SPACE" > "$_USED_SPACE_LIMIT" ) ]] ; then
echo -e "used space over $_USED_SPACE_LIMIT%, deleting old files..."
_LOOP=0;
while [[ ( "$_USED_SPACE" > "$_USED_SPACE_LIMIT" ) && ( "$_LOOP" < "100" ) ]] ; do
_OLDEST=`find /home/pi/pikrellcam/media/archive/ -type f -printf '%T+ %p\n' | sort | head -n 1 | cut -d "+" -f 1 | sed -e "s/\-/\//g"`
echo "oldest files:$_OLDEST"
echo "delete oldest folder:/home/pi/pikrellcam/media/archive/$_OLDEST"
rm -rfv "/home/pi/pikrellcam/media/archive/$_OLDEST"
sync
_USED_SPACE=`df | grep $_VOLUME | awk '{print $5}' | sed -e "s/\%//g"`
echo "used space now: $_USED_SPACE%"
_LOOP=$((_LOOP + 1))
done
echo "done"
df
else
echo -e "used space below $_USED_SPACE_LIMIT%, nothing to do!"
fi
Well, I have what I think is the latest version (3.0.7). If not let me know, but I think I know where to bump up the ISO for nighttime. Thanks!jbeale wrote:I've got a NoIR v2.1 running with PiKrellCam. You do want the current version of the S/W so it supports the higher resolutions of the v2 camera, otherwise it just works. Well, with the additional note that for some reason, the v2 camera will not go to either max ISO or max shutter speed in dark conditions all by itself, in the same way the v1 camera did. If you don't realize that, you may conclude v2 is not as good at night as the v1 camera. You can force it in manual mode though and after that, I found the sensitivity is roughly equivalent to v1.
The thumb names can't be configurable so the script is not a user script. But I can add a thumb width variable to pikrellcam.confFox Mulder wrote: Is it possible to override the script "scripts-dist/_thumb" in the "scripts" directory?
For bash scripts:Fox Mulder wrote: So the question is if i could somehow read the state of the motion status like i could change it with the FIFO (motion_enable) command?
Code: Select all
line=`grep motion_enable /run/pikrellcam/state`
motion_state=${line#motion_enable}
That's exactly what i needed.billw wrote: For bash scripts:The motion_state variable will then be "on" or "off". When motion_enable is FIFO changed, the newCode: Select all
line=`grep motion_enable /run/pikrellcam/state` motion_state=${line#motion_enable}
state should show up in the /run/pikrellam/state file within around 100-200 msec.
Code: Select all
daily sunset+60 "@motion_event_gap 20"
daily sunset+60 "@motion_post_capture 19"
daily sunrise "@motion_event_gap 6"
daily sunrise "@motion_post_capture 5"
Code: Select all
[...]
sunrise/sunset times: valid dawn/dusk times: valid
dawn: 6:02
sunrise: 6:29
sunset: 20:06
dusk: 20:32
[...]
21:05:00 : Bad command: [motion_event_gap] [20]
21:05:00 : Bad command: [motion_post_capture] [19]
Code: Select all
daily sunset+60 "@motion event_gap 20"
daily sunset+60 "@motion post_capture 19"
daily sunrise "@motion event_gap 6"
daily sunrise "@motion post_capture 5"
Code: Select all
daily 14:49 "@brightness 50"