itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Thu Aug 08, 2019 11:32 am

Hi,

I recently dug out my Noir cam and BrightPi, neither have been used in ages.

https://uk.pi-supply.com/products/brigh ... spberry-pi

After some messing about I managed to get BrightPi on / off buttons working fine, the following is all in this thread but spread about and not always confirmed as working, I've just pulled it together...

First install RPi Cam Web Interface and then get BrightPi connected and working, note for what I am doing here you do not need the Python library's...

Add BrightPi buttons, 'picam' should be replaced with whatever you have chosen as your install path

Code: Select all

cd /var/www/picam/
sudo cp userbuttonsD userbuttons
sudo nano userbuttons
Comment out all existing entries and then add the following at the end.

Code: Select all

All On,allon.sh,btn btn-danger btn-lg,style="width:19%" autofocus
White On,whiteon.sh,btn btn-danger btn-lg,style="width:19%" autofocus
IR On,iron.sh,btn btn-danger btn-lg,style="width:19%" autofocus
All Off,alloff.sh,btn btn-success btn-lg,style="width:19%" autofocus
Save

Code: Select all

cd /macros
sudo nano whiteon.sh
Enter the following

Code: Select all

#!/bin/bash
i2cset -y 1 0x70 0x00 0x5a
Save

Code: Select all

sudo nano iron.sh

#!/bin/bash
i2cset -y 1 0x70 0x00 0xa5
Save

Code: Select all

sudo nano alloff.sh

#!/bin/bash
i2cset -y 1 0x70 0x00 0x00
Save

Code: Select all

sudo nano allon.sh

#!/bin/bash
sudo i2cset -y 1 0x70 0x00 0xff
save

Give the apache user access and make the scripts executable

Code: Select all

sudo chown www-data:www-data /var/www/picam/macros/whiteon.sh
sudo chown www-data:www-data /var/www/picam/macros/iron.sh
sudo chown www-data:www-data /var/www/picam/macros/alloff.sh
sudo chown www-data:www-data /var/www/picam/macros/allmax.sh
sudo chown www-data:www-data /var/www/picam/macros/allon.sh
sudo chmod 744 /var/www/picam/macros/whiteon.sh
sudo chmod 744 /var/www/picam/macros/iron.sh
sudo chmod 744 /var/www/picam/macros/alloff.sh
sudo chmod 744 /var/www/picam/macros/allmax.sh
sudo chmod 744 /var/www/picam/macros/allon.sh
This removes the need for sudo in the scripts

Code: Select all

sudo adduser www-data i2c
You should now have a working set of buttons for use with your BrightPi..
Capture.jpg
Capture.jpg (106.17 KiB) Viewed 4115 times

Archer322
Posts: 8
Joined: Wed Jan 11, 2017 4:54 pm

Re: RPi Cam Web Interface

Thu Aug 08, 2019 4:24 pm

ras07 wrote:
Wed Aug 07, 2019 7:57 pm
Fair enough, but understand that the problem is really on your CIFS server's end; it's not Buster that's "broken". Jessie would downgrade to SMBv1 if that was the only thing the server supported; by default, Buster doesn't (for good reasons).

Ideally, you should update whatever is hosting the share to support a more current version of SMB ... but sometimes that's easier said than done. Based on the IP address of 168.192.1.1 that your share is using, I'm going to guess that your router itself is hosting the share. It's worth looking for a current firmware upgrade for your router (always a good practice anyway), but since router manufacturers are notoriously bad about keeping their software up to date, you might be out of luck unless your router is a relatively new model.

Unfortunately, if the router software is so out of date that it only supports SMBv1, you've got to wonder what other vulnerabilities it has. Sadly consumer-grade routers tend to be a very weak link in network security.
Actually after more research it looks like this might be a problem with how fstab binds, or rather the commands I'm using there aren't correct anymore. When I set my router to smbv2 only (usually smbv1+smbv2) I can still connect to the drive just by typing smb://192.168.1.1/picams into file explorer and entering my credentials manually. I couldn't browse there however but I understand that was a smbv1 feature that was disabled. So it looks like my pi and router are fine using smbv2, I just need to figure out how to get the fstab auto mount working again. For me, the fstab instructions as-written don't seem to work with smbv2+. It would be helpful to know if anyone else has this issue with Buster, RPi Cams, and an smbv2 NAS. I'm on the latest release of asuswrt-merlin also.

JohnC25
Posts: 1
Joined: Thu Aug 08, 2019 4:00 pm

Re: RPi Cam Web Interface - real time adjustment of preview parameters

Thu Aug 08, 2019 4:45 pm

Hi All,

This project looks excellent!

I am in the process of trying this as the basis for a multi camera web page I am working on. However I want the mjpeg preview pics to scale fairly dynamically:

1 . The user can select one of multiple views (equal grid, focus on one camera etc etc) or resize the browser window - the preview size should track the final display size .

2. Automatic adjustment of image size/quality to vary bandwidth used, to preserve a minimum display frame rate, with varying net conditions.
The cameras will be displaying live action (one application is in live theatre) - so fluidity of display is important.

The mjpeg project seems ideal, with the continually running camera, fast stream of preview jpg images, and control over the pipe.

The Problem: On issuing the preview quality command "pv" to adjust any of the parameters, the preview jpg sequence stalls for the best part of a second, which is not acceptable in this application. Digging deeper into the mjpeg code (RaspiMCmds.c) it appears that the command is doing a stop_all, then a start_all. I do not see why it needs to tear down and restart the mmal components as the process chain is not changed, only the preview size parameters. Many other commands appear to be able to pass parameters on the fly.

Is there any way round this? I believe that using the still image capture channel would give me worse performance?

Thank you

ras07
Posts: 62
Joined: Tue May 22, 2018 4:04 am

Re: RPi Cam Web Interface

Thu Aug 08, 2019 6:40 pm

Archer322 wrote:
Thu Aug 08, 2019 4:24 pm
Actually after more research it looks like this might be a problem with how fstab binds, or rather the commands I'm using there aren't correct anymore. When I set my router to smbv2 only (usually smbv1+smbv2) I can still connect to the drive just by typing smb://192.168.1.1/picams into file explorer and entering my credentials manually. I couldn't browse there however but I understand that was a smbv1 feature that was disabled. So it looks like my pi and router are fine using smbv2, I just need to figure out how to get the fstab auto mount working again. For me, the fstab instructions as-written don't seem to work with smbv2+. It would be helpful to know if anyone else has this issue with Buster, RPi Cams, and an smbv2 NAS. I'm on the latest release of asuswrt-merlin also.
Ah, asuswrt-merlin - that has a complicated relationship with SMB, to say the least :)

Try vers=2.0 in your fstab line. I think Debian since Stretch defaults to 2.1 and up, but the Merlin codebase might only support up to 2.0. (I'm not sure about Merlin anymore, but it's true for FreshTomato.)

I've no idea why Debian defaults to v2.1 rather than 2.0 - I don't think there are security differences between the two.

Archer322
Posts: 8
Joined: Wed Jan 11, 2017 4:54 pm

Re: RPi Cam Web Interface

Fri Aug 09, 2019 7:53 pm

ras07 wrote:
Thu Aug 08, 2019 6:40 pm
Ah, asuswrt-merlin - that has a complicated relationship with SMB, to say the least :)

Try vers=2.0 in your fstab line. I think Debian since Stretch defaults to 2.1 and up, but the Merlin codebase might only support up to 2.0. (I'm not sure about Merlin anymore, but it's true for FreshTomato.)

I've no idea why Debian defaults to v2.1 rather than 2.0 - I don't think there are security differences between the two.
Sometimes it's the simplest solutions you completely overlook. Adding vers=2.0 to fstab seems to have done the trick, thanks!

samwells2000
Posts: 1
Joined: Sat Aug 10, 2019 1:11 pm

Re: RPi Cam Web Interface

Sat Aug 10, 2019 1:14 pm

hi is there anyway to connect this cammera system to something like ispy (a free cctv system) im runnign the latest version of the Cam software on my Zero w

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Sat Aug 10, 2019 1:52 pm

samwells2000 wrote:
Sat Aug 10, 2019 1:14 pm
hi is there anyway to connect this cammera system to something like ispy (a free cctv system) im runnign the latest version of the Cam software on my Zero w
Yes, very easy, Raspberry comes up on the iSpy wizard or do it manually in the mjpeg tab
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

pendente
Posts: 5
Joined: Sat Aug 17, 2019 2:06 am

Re: RPi Cam Web Interface

Sat Aug 17, 2019 2:10 am

Hello,

I would like to know if it is possible to combine this project with this one https://ginolhac.github.io/posts/diy-ra ... -telegram/ ?

Not only recieve alerts in the Telegram but also send actions from the Telegram.

ras07
Posts: 62
Joined: Tue May 22, 2018 4:04 am

Re: RPi Cam Web Interface

Sat Aug 17, 2019 5:53 am

pendente wrote:
Sat Aug 17, 2019 2:10 am
Hello,

I would like to know if it is possible to combine this project with this one https://ginolhac.github.io/posts/diy-ra ... -telegram/ ?

Not only recieve alerts in the Telegram but also send actions from the Telegram.
That should be very doable. https://quavoce.wordpress.com/2017/09/2 ... i-web-cam/ is a tutorial for sending alerts to Telegram. To send actions from Telegram shouldn't be too hard - controlling RPi-CWI is a simple as writing to a special file; see https://elinux.org/RPi-Cam-Web-Interface#Pipe to get you started. Have fun!

benhendahafed
Posts: 1
Joined: Thu Aug 29, 2019 8:37 am

Re: RPi Cam Web Interface

Thu Aug 29, 2019 8:39 am

you can also check this site for details about your ip address ==> what is my ip address

goudkamp
Posts: 1
Joined: Thu Sep 05, 2019 8:24 am

Re: RPi Cam Web Interface

Thu Sep 05, 2019 8:25 am

Love the RPi Cam Web interface, using it for a couple of projects now.

Can I configure it to also have a preview on the HDMI interface, like raspistill does ?

ras07
Posts: 62
Joined: Tue May 22, 2018 4:04 am

Re: RPi Cam Web Interface

Thu Sep 05, 2019 3:58 pm

goudkamp wrote:
Thu Sep 05, 2019 8:25 am
Love the RPi Cam Web interface, using it for a couple of projects now.

Can I configure it to also have a preview on the HDMI interface, like raspistill does ?
I don't know of an easy way to output the stream directly to HDMI. I believe the best way to do this would be to install a desktop on your Pi and open a browser to view the preview. You may need to adjust the video settings to get the resolution and FPS you want. Take a look at https://github.com/silvanmelchior/RPi_C ... issues/427 for a further discussion on this topic.

If you're using a Pi Zero/ZeroW you might start to run into performance issues when running RPI-CWI, a desktop, and a browser all at the same time, but any other Pi variant shouldn't have any trouble with it.

wpballa1
Posts: 60
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Sun Sep 08, 2019 6:20 pm

Bob,

I just did an update of a stretch installation and got the following error.

raspimjpeg: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by raspimjpeg)

The camera won't start. Strangely, I updated a second system at the same time with no problem.

OK, we now have total failure of RPi_Cam_Web_Interface due to the above error. I used a fresh SD card with a Stretch install and I get the same failure which prevents the camera from starting. Buster does work correctly, but you can't do an OS update from Stretch to Buster via ssh.

Bill
Last edited by wpballa1 on Fri Sep 13, 2019 10:46 pm, edited 2 times in total.

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Wed Sep 11, 2019 12:48 pm

wpballa1 wrote:
Sun Sep 08, 2019 6:20 pm
Bob,
I just did an update of a stretch installation and got the following error.

raspimjpeg: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by raspimjpeg)

The camera won't start. Strangely, I updated a second system at the same time with no problem.

Bill
The problem is mixing Pi and installs causes this, if I recall you cant install on a 3b and then move the SD to a zero etc
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

wpballa1
Posts: 60
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Wed Sep 11, 2019 4:24 pm

But this is a ZeroW with Stretch and has been for years. No attempt to go to Buster.

Ptroll
Posts: 2
Joined: Sun Sep 15, 2019 2:47 pm

Re: RPi Cam Web Interface

Sun Sep 15, 2019 3:05 pm

Hello,
I updated RPi 6.6.5 and now the camera does not work anymore.
It is activated and I can take a picture in ssh. Did you have this problem ?

wpballa1
Posts: 60
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Sun Sep 15, 2019 6:04 pm

As best I can tell, it will work if you are using Buster but not with Stretch with the latest update.

Ptroll
Posts: 2
Joined: Sun Sep 15, 2019 2:47 pm

Re: RPi Cam Web Interface

Sun Sep 15, 2019 7:41 pm

wpballa1 wrote:
Sun Sep 15, 2019 6:04 pm
As best I can tell, it will work if you are using Buster but not with Stretch with the latest update.
Thank you for your answer.
How should I proceed ?

Darkelement
Posts: 1
Joined: Sun Sep 15, 2019 7:53 pm

Re: RPi Cam Web Interface

Sun Sep 15, 2019 7:55 pm

I just go it installed and now it keeps populating this message. Any help would be great. Thank you!

mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied

wpballa1
Posts: 60
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Sun Sep 15, 2019 8:01 pm

Well, I think you should copy anything you want off the Stretch installation, and then start with a fresh Buster install. I did that and the software works fine. Then you can copy things back over. You can't upgrade Stretch to Buster because the /boot partition is a much larger size on Buster and you would need to do some partition resizing which is non-trivial unless you are an expert. I'm hopeful that Bob will come up with a solution for Stretch users in the near future, but the software packages are diverging rapidly.

wpballa1
Posts: 60
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Mon Sep 16, 2019 1:15 am

Ah, the mmal error means you forgot to enable the camera in raspi-config. I've made that mistake before...

jasonesser
Posts: 1
Joined: Mon Sep 23, 2019 8:59 pm

Re: RPi Cam Web Interface -SCHEDULER SETTINGS

Mon Sep 23, 2019 9:11 pm

I have searched through a good number of the 200+ pages of replies, and cannot seem to find what I am looking for, however I have not hit EVERY PAGE...

I would like to schedule a timelapse to start recording at midnight daily and record an image every 15 minutes all day long, with the camera settings controlled by sun based settings. My settings are as shown in the image below.
RPi_WebCamInterface_settings.png
RPi_WebCamInterface_settings.png (55.76 KiB) Viewed 1686 times
However, the timelapse does not automatically start recording at Dawn, and at most, when I manually start the time-lapse, captures 30 images before stopping. Does anyone have suggestion or somewhere to point for additional assistance with using the scheduler?

Sryously
Posts: 7
Joined: Tue Sep 24, 2019 1:38 am

Re: RPi Cam Web Interface

Tue Sep 24, 2019 2:06 am

I'm having trouble with RPI Cam Web Interface on a Raspberry Pi Zero W, it's locking up or something, and it seems to happen only once I've opened up the camera. Following the instructions I installed Raspbian Buster Lite using belenaEtcher, and here is maybe the first problem? Once it finishes there is smaller text that said it had 1 issue under the FINISHED! message on the program, would that be a problem? I've reinstalled it twice and it showed the same thing both times. I loaded up the MicroSD, Enabled SSH, camera, and then installed RPI Cam Web Interface, didn't notice anything odd there. I was actually trying MotionEye before this, but 2fps was not worth it to me. Oh, and incase this means something, when MotionEye was REALLY slow, like barely 1fps for some reason, it was showing a red frame around the video. That doesn't mean it was over heating, does it? Trying to come to the conclusion that it seems to lock up only after loading up the web interface or I think even opening the stream in iSpy, I tried rebooting it, logging into SSH and only checking for CPU and GPU temperatures, did this every 10 minutes for an hour to make sure it was still running. Nothing happened, temperature between 55c-62c. Then I try and open up the camera, I don't think it's even 5 minutes before camera is unresponsive and SSH tells me it's been disconnected. Any ideas? Something I should try different with MicroSD setup or during the RPi Cam Web Interface installation?

I've been using Alfred on an old phone for some time now, heard about Raspberry Pi and thought it'd be nice to make a small security camera. My plan is to replicate Alfred by running RPi Cam Web Interface with defaults basically, take the load of the Pi Zero and have iSpy do the motion sensing, and then use Google's Backup and Sync to send it to Google Drive where I can access it from anywhere.

ras07
Posts: 62
Joined: Tue May 22, 2018 4:04 am

Re: RPi Cam Web Interface -SCHEDULER SETTINGS

Tue Sep 24, 2019 5:42 am

jasonesser wrote:
Mon Sep 23, 2019 9:11 pm
I have searched through a good number of the 200+ pages of replies, and cannot seem to find what I am looking for, however I have not hit EVERY PAGE...

I would like to schedule a timelapse to start recording at midnight daily and record an image every 15 minutes all day long, with the camera settings controlled by sun based settings. My settings are as shown in the image below.
I'm assuming you've read https://elinux.org/RPi-Cam-Web-Interface#Scheduler ? If not, that's the place to start.

I'm pretty sure you need nonzero offsets in DawnStart_Minutes, DayStart_Minutes, DayEnd_Minutes, and DuskEnd_Minutes for the Sun-based DayMode to work correctly, but I've never used that function so I don't know much about it.
Last edited by ras07 on Tue Sep 24, 2019 6:01 am, edited 1 time in total.

ras07
Posts: 62
Joined: Tue May 22, 2018 4:04 am

Re: RPi Cam Web Interface

Tue Sep 24, 2019 5:48 am

Sryously wrote:
Tue Sep 24, 2019 2:06 am
I'm having trouble with RPI Cam Web Interface on a Raspberry Pi Zero W, it's locking up or something, and it seems to happen only once I've opened up the camera.
Make sure the camera connection is solid. Take the cable out, maybe clean the contacts with isopropyl acohol, and re-insert. Do the same on the camera end if your camera allows. Make sure the cable is in the right way, make sure the connector locks, and make sure there isn't any stress on the cable when in use.

If Raspbian works fine until the camera starts I doubt if it is a problem burning the MicroSD.

Return to “Camera board”