Raspberry Cam on different Pi?

Moderator: leecollings

Post Reply
hyla
Posts: 36
Joined: Tuesday 08 September 2015 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Location: Germany
Contact:

Raspberry Cam on different Pi?

Post by hyla »

Hi,

I've got Domoticz on one Pi and my Raspberry Pi Cam on another. How do I add this cam to Domoticz?
On the remote Pi I can run "raspistill -o test.jpg" and get a camera picture for a few moments.
In Domoticz there's the "setup/more options/camera" menu. There I have to enter an IP address.
Which is the one of the remote Pi, not the server Pi, right??

Image URL as per the Domoticz Wiki is raspberry.cgi. And on hitting "Test Connection" nothing happens.
So how is this done correctly? What do I have to do on the remote Pi, how do I add that to Domoticz after that?

Thanks for any help!

Christoph
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius »

Take a look at the rpi cam web interface http://elinux.org/RPi-Cam-Web-Interface
Then you can add ip/cam_pic_new.php as url.

It also provides nice other features.
hyla
Posts: 36
Joined: Tuesday 08 September 2015 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Location: Germany
Contact:

Re: Raspberry Cam on different Pi?

Post by hyla »

Hi,

thanks for Your answer. So now I've got the RPI-Cam interface running. I get a little preview picture and when I hit that a snapshot is downloaded (not displayed). What next?
I am imagining a display of one or maybe various web cam images all displayed from within Domoticz.
Can that be done? And how would one do that?

Christoph
Xroads
Posts: 30
Joined: Thursday 25 February 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads »

Hi
I have another raspberry running the web interface, and the connection made i Domoticz with the following settings.

Cam_1
IP Address: 192.168.1.10
Port: 80
Username: pi
Password: •••••••••
ImageURL: /cam_pic_new.php/

and when I press "test connection", I can se the live video stream. But when I, in the camera menu, press the snapshot icon, there only a blank webpage opening with this adress "http://192.168.1.100:8080/camsnapshot.jpg?idx=1". When I press the livestream icon theres the popup window opening but no stream.

I'm using google chrome as browser

Is there anybody that has an idea to what is wrong.
Raspberry pi 2
Razberry z-wave module with Fibaro dimmer, relay and pir and Dlink pir.
433mhz RFlink with 5 pcs. on/off switches
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius »

Not the source of the issue but a possible workaround.
copy cam.jpg to camsnapshot.jpg on the cam control www folder.
Xroads
Posts: 30
Joined: Thursday 25 February 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads »

Hi

I tried to rename it, but that did'nt help.

It's strange that Domoticz is using the wrong path http://192.168.1.100:8080/camsnapshot.jpg instead of the path to the camera http://192.168.1.30/camsnapshot.jpg.

192.168.1.100 is Domoticz own ip adress.
Raspberry pi 2
Razberry z-wave module with Fibaro dimmer, relay and pir and Dlink pir.
433mhz RFlink with 5 pcs. on/off switches
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius »

My RPi camera wasn't in Domoticz.
Just added to test with cam.jpg as url and both snapshot as stream work for me.
Domoticz version 3.4921
Xroads
Posts: 30
Joined: Thursday 25 February 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads »

I'm using ver. 3.4834, maybe I should try to upgrade ;)
Raspberry pi 2
Razberry z-wave module with Fibaro dimmer, relay and pir and Dlink pir.
433mhz RFlink with 5 pcs. on/off switches
Xroads
Posts: 30
Joined: Thursday 25 February 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads »

Nope, that did'nt help either.
Raspberry pi 2
Razberry z-wave module with Fibaro dimmer, relay and pir and Dlink pir.
433mhz RFlink with 5 pcs. on/off switches
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius »

These are my settings:

Image

And then the 2 buttons work:
Image
The left icon saves a jpg file, the right opens the stream:
Image
Xroads
Posts: 30
Joined: Thursday 25 February 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads »

Finally got it to work :D
I gave up on the Domoticz settings, and made my own little bash script. This script copied the cam.jpg to the Domoticz folder "/var/www/scripts, and I was sattisfied with this. By chance I went into the Domoticz camera settings, to discover that there suddenly was a preview picture in the left side and the snapshot and liveview buttons is working.
So if your camera is not working, try to create a cam.jpg file in that diretory. Then it seems to be okay :D
Raspberry pi 2
Razberry z-wave module with Fibaro dimmer, relay and pir and Dlink pir.
433mhz RFlink with 5 pcs. on/off switches
Martinq
Posts: 19
Joined: Wednesday 09 March 2016 17:20
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Raspberry Cam on different Pi?

Post by Martinq »

I use MotionPie on some other Raspberry's and it's working great. https://www.squirrelhosting.co.uk/hosti ... .php?id=94

In Domoticz you have to set it like this:

IP address: the address from the Pi with MotionPie
Port: 80
ImageUrl: picture/1/current/

If you click on the connection button you should see shortly the cam. It only shows in a flash, and then shows again the default pic. But that's ok. Then save. If all went well you will see a small snapshot on the left. If you click on the camera Icon a popup opens and will show the stream. Sometimes it is not working if you tried already other settings. If that's the case, delete the camera from Domoticz, visit another page (to refresh the page, sometimes Domoticz keeps the page cached and then it's not working) and go back to add the camera again.
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius »

@Martinq:
Do you use motionPie or MotionEyeOS?
I believe motionPie is no longer developped and replaced by MotionEyeOS.
Does it give the full resolution jpg image or the cropped videostream?
Can it use a mask to block parts of the image?
winand
Posts: 1
Joined: Tuesday 23 January 2018 17:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by winand »

Xroads wrote: Friday 11 March 2016 22:05 It's strange that Domoticz is using the wrong path http://192.168.1.100:8080/camsnapshot.jpg instead of the path to the camera http://192.168.1.30/camsnapshot.jpg.
192.168.1.100 is Domoticz own ip adress.
I was pulling my hair out on this one too. The IP address is correct however, it SHOULD BE the IP address of the domoticz server(!)
(camsnapshot.jpg is a Domoticz script which is called with parameter idx)

SOLUTION :
It turned out that there was something wrong with the database record of camera with idx 2 in my case. I could edit the settings over and over again to try different things, but still no luck.
In the end i added a new camera in Domoticz (which got idx 3) and it worked flawlessly, both downloading a snapshot as the live view.
(and yes, the IP address points to the Domoticz server: http://192.168.2.200:8080/camsnapshot.jpg?idx=3 )

The 'broken camera' with idx 2 can be deleted, but chances are that idx 2 is being re-used if you add a camera later, so you better rename it to 'broken camera' and uncheck 'enabled' in the settings..
iMoi
Posts: 6
Joined: Monday 14 January 2019 12:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by iMoi »

Hello everybody
I'm desperately trying to add my Raspberry Cam to Domoticz (installed on my Synology NAS).
In installed Rpi-cam-web-interface on the Rpi and I can access the cam's video streamon my browser.
Question is : what are the settings to add the cam to Domoticz ?
Domoticz (domoticz_apollolake-6.2_4.0.9700-7.spk)
installed on a Synology NAS DS 218+ (INTEL Celeron J3355)
under DSM 6.2.1-23824 Update 4
Raspberry Pi B+ with official cam
+ Android smartphone with IP Webcam
iMoi
Posts: 6
Joined: Monday 14 January 2019 12:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by iMoi »

Hi, I'm trying to add my Raspberry Cam (under RPi Web Cam Interface) to Domoticz : nothing shows in the Add camera/preview window, whether with /cam_pic_new.php/ in the URL field, or any other seen on this forum.
(For what it's worth, the cam show fine in my browser when I directly access it through its html web page)
Any idea ?

Thanks a lot !
  • OS : Raspbian Stretch Lite - Version:November 2018 - Release date:2018-11-13 - Kernel version:4.14
  • RPi Web Cam Interface 6.4.40
  • Domoticz V4.9700
Domoticz (domoticz_apollolake-6.2_4.0.9700-7.spk)
installed on a Synology NAS DS 218+ (INTEL Celeron J3355)
under DSM 6.2.1-23824 Update 4
Raspberry Pi B+ with official cam
+ Android smartphone with IP Webcam
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest