Nov 19 2016
RPI CAM as WIFI SEC IP CAM
for some time i was working on building a new house and moving in,but now i got the idea to use a old RPI camera project here
my RPI1 and the camera module could be installed as a additional wifi security web cam ( instead of rotting in some box )
-1- use a other SD and start a new JESSIE system setup
the system was still working but i want to do a new setup,
using 2016-09-23-raspbian-jessie.img burn to 8GB sandisk SD
add some custom installations to have my working environment
and fix IP of RPI 1 for eth ...101 and wifi ...201.
as later the camera only work via wifi and never use HDMI.
and it is a old RPI1 so i better free memory by the boot options.

after sudo raspi-config // boot option B1 /

over 100MB less used RAM.
-2- install newer version of camera software from here
and RPI forum here
//new JESSIE
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install
find web code in: /var/www/html/

p.s. a click on the video gives you full screen / and click back.
-3- build it in a camera housing

when i buy the camera system for the house
( 4 * AHD 2M camera + recorder ( 1TB ) for 340euro incl. installation)
i got a additional alu camera housing for 10euro.

and a small change in
/RPi_Cam_Web_Interface/www/config.php
change "mycam" to "gate_cam"
and run installer ./RPi_Cam_Web_Interface_Installer.sh again
_ 3 configure
__ | 2 upgrade
and some security changes in
/RPi_Cam_Web_Interface/config.txt
security="yes"
user="xxx"
passwd="xxxx"
WEBPORT="4321"
and run again
./RPi_Cam_Web_Interface_Installer.sh
_ 3 configure
__ │3 apache_security
__ │4 apache_port
now must call in browser
http://192.168.1.201:4321
and answer user xxx password xxxx. // and remember in browser
i understand from manual that for motion would need now add changes??
now with fix IP and port ( not 80 ) the router can do a port forward to allow remote access

using browser and ? who am i ? sites or a look in the router can tell you your current public IP
and with that your camera could be called from anywhere by
http://current_public_IP:4321
but that IP could change, mostly on a daily basis, depending on your ISP. ( internet service provider )
here a "DYN DNS service" can help:
in your server ( camera ) need a scheduler to run a update program:
( also many router now allow that function )
that program checks on the actual remote IP ( by using this or any of that services ) and
sends it to the DYN DNS service to store it as your actual IP.
there now that IP is mapped to your subdomain so your camera can be called by
my_private_gatecam.dyn_dns_service.com
i play with that several times, some i got running, but after a year they changed to paid service,,,
so i build my own dyn dns service.
on a (free) web space what allows php... and free sub domains
for the RPI i make a
- sub domain
OR a
-- sub directory
so the call would be
- rpi1.myowndyndns.com
OR
-- myowndyndns.com/rpi1/
my php tools in there allow 3 different functions:
-1- call
http://rpi1.myowndyndns.com
gives back the redirect to current stored remote IP ( and port )
-2- call IP ( by the scheduled update service of your server option)
http://rpi1.myowndyndns.com/myip.php
just sends back your current remote ip
-3- call update ( by the scheduled update service of your server or manually from browser)
http://rpi1.myowndyndns.com/myip.php?ownerpw=myverylongpassword
and the current remote ip is stored for use by -1-
so you need to adjust the port in the camera code, the router and the myowndyndns server file
settings.php
here the setting for your own dyn dns webserver (subdomain): code
as soon you run the update -3- ( in a browser ) successful your camera is working from remote by:
rpi1.myowndyndns.com
still better do the scheduled update service from RPI:
make a
sudo nano /etc/cron.d/mydns_update.sh
sudo chmod 500 /etc/cron.d/mydns_update.sh
sudo chown root:root /etc/cron.d/mydns_update.sh
sudo nano /etc/cron.d/myCAMcronjob
sudo chown root:root /etc/cron.d/myCAMcronjob
for years i now have a free account at byet.host, not bad
just for this i get a add account making
http://myowndyndns.byethost7.com/
but the way for subdomains is different, instead of making me http://rpi1.myowndyndns.byethost7.com/
it gives me https://rpi1.byethost7.com
you can set it temporary to your own IP by calling
https://rpi1.byethost7.com/myip.php?ownerpw=myverylongpassword
pls, this all works only if your port is 4321 in your camera ( or server ) and router .
some error i see:
