Raspberry Cam on different Pi?

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

Raspberry Cam on different Pi?

Post by hyla » Friday 26 February 2016 22:59

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: 2715
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius » Friday 26 February 2016 23:22

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: 47
Joined: Tuesday 08 September 2015 16:44
Target OS: Raspberry Pi
Domoticz version: current
Location: Germany
Contact:

Re: Raspberry Cam on different Pi?

Post by hyla » Saturday 27 February 2016 0:38

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: 31
Joined: Thursday 25 February 2016 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads » Friday 11 March 2016 20:11

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: 2715
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius » Friday 11 March 2016 21:45

Not the source of the issue but a possible workaround.
copy cam.jpg to camsnapshot.jpg on the cam control www folder.

Xroads
Posts: 31
Joined: Thursday 25 February 2016 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads » Friday 11 March 2016 23:05

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: 2715
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius » Friday 11 March 2016 23:32

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: 31
Joined: Thursday 25 February 2016 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads » Friday 11 March 2016 23:42

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: 31
Joined: Thursday 25 February 2016 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads » Saturday 12 March 2016 0:53

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: 2715
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius » Saturday 12 March 2016 9:59

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: 31
Joined: Thursday 25 February 2016 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by Xroads » Monday 14 March 2016 1:02

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: 18
Joined: Wednesday 09 March 2016 18:20
Target OS: Linux
Domoticz version: 3.8153
Contact:

Re: Raspberry Cam on different Pi?

Post by Martinq » Saturday 19 March 2016 14:30

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: 2715
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Raspberry Cam on different Pi?

Post by Egregius » Saturday 19 March 2016 18:15

@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 18:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Raspberry Cam on different Pi?

Post by winand » Tuesday 23 January 2018 18:22

Xroads wrote:
Friday 11 March 2016 23: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..

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest