One of the great things about the Raspberry Pi is the community that works to create really great projects. I have setup a Raspberry Pi B looking out my windows. It faces the front door so can see anyone coming down the street and toward the door. I had a couple cheap $2 webcams lying around so I set them up looking out the windows. The total cost of the entire setup is about $10, minus the cost of the Pi itself, I also think that the Pi is a little underpowered for the task as occasionally the thing will stop working after several weeks, the camera still records the video, but the web-interface has to be reloaded in order to get the thing working again.
Overall, I’d say that this project was ineffective for its purpose because unfortunately, the cameras would not record movement accurately enough, and sometimes would record several hours of minimal movement. An IP camera would likely be more cost-effective and better suited for the task, the Pi I used was simply underpowered to monitor two webcams and crashed after about 2 weeks of working continuously. Viewing the files showed that although it captured movement and video, some were corrupt, glitch or only captured about 3 usable frames. It did, however, show a good live view of what was going on outside the house, with about a 4-second delay.
Overall I would say that a Raspberry Pi as a webcam security camera on the cheap is not a good idea, the main contributing factor being that it was not able to keep the program running and often would save garbage to the SD card. If I were to do this again I would not use two for definite as it simply did not work effectively enough to actually increase security, It would often record trees moving for hours and sometimes one camera would freeze up entirely.
The new raspberry Pi B+ is a lot faster then it’s predecessor and with that I thought I would try it at running a Plex server, the thing runs, but there are some downsides.
The Raspberry is under-powered for video trans-coding, so to get around this, you have to select the optimize setting on the video and then allow them to render, which for a single film, if the Pi is under load could take a couple hours, so don’t expect to be watching the latest film instantly.
The Pi gets hot, I have used heat sinks to cool it down, but still it’s hot to the touch, a small fan would fix this but it doesn’t overheat or anything so I just let it run hot.
The Pi uses ARM, so things like Plex Requests don’t run without running through a hundred other hoops.
The Pi works well with the apps, however trans coding is not an option, so if you need subtitles or downscaling, you cant.
Other than that, which seems like a lot but its really not, its a fairly nifty machine, it can stream multiple 1080p video streams over WiFi, I’ve not managed to max this out yet, so I suppose thats good, It works well with Sonarr, Couchpotato and Deluge. Overall its a low cost, low power media server with minimal compromise. However, a small Bare bones PC would be my first choose if I was to do it again.
I recently installed php, but when I was unable to save files, I was very stuck, and that’s why I’m posting it here, I want to tell anyone who Googles this problem to find this solution.
The problem was when I used an fopen and fsave within php, the file would always ‘die’ as in the open or die within php. The solution is below
Firstly I looked for the Environment user in phpinfo() in my case it was [box type=”shadow”]www-data[/box] and then I simply typed this [box type=”shadow”]chmod 777 -R www-data /var/www[/box] that, in its simplicity is the solution, but I am thankful that I have found the solution!
To create a phpinfo you need to create a file in your root and insert the following code
and save it as phpinfo.php or whatever you choose, I saved it in my root but you can save it wherever you want, then I browsed to the environments section and that gave me the necessary information for me to create the solution.
Why this works
The problem was that php did not have enough permissions to write to the folder. by giving the user www-data full permission i.e. 777 it can now read write and execute without a problem!