Page 1 of 1
Raspberry Cam on different Pi?
Posted: Friday 26 February 2016 21:59
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
Re: Raspberry Cam on different Pi?
Posted: Friday 26 February 2016 22:22
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.
Re: Raspberry Cam on different Pi?
Posted: Friday 26 February 2016 23:38
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
Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 19:11
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.
Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 20:45
by Egregius
Not the source of the issue but a possible workaround.
copy cam.jpg to camsnapshot.jpg on the cam control www folder.
Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 22:05
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.
Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 22:32
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
Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 22:42
by Xroads
I'm using ver. 3.4834, maybe I should try to upgrade

Re: Raspberry Cam on different Pi?
Posted: Friday 11 March 2016 23:53
by Xroads
Nope, that did'nt help either.
Re: Raspberry Cam on different Pi?
Posted: Saturday 12 March 2016 8:59
by Egregius
These are my settings:
And then the 2 buttons work:

The left icon saves a jpg file, the right opens the stream:

Re: Raspberry Cam on different Pi?
Posted: Monday 14 March 2016 0:02
by Xroads
Finally got it to work
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

Re: Raspberry Cam on different Pi?
Posted: Saturday 19 March 2016 13:30
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.
Re: Raspberry Cam on different Pi?
Posted: Saturday 19 March 2016 17:15
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?
Re: Raspberry Cam on different Pi?
Posted: Tuesday 23 January 2018 17:22
by winand
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..
Re: Raspberry Cam on different Pi?
Posted: Sunday 20 January 2019 18:38
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 ?
Re: Raspberry Cam on different Pi?
Posted: Sunday 20 January 2019 18:52
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