rtsp camera in domoticz

Moderator: leecollings

dutchnld
Posts: 20
Joined: Friday 23 October 2015 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5974
Location: Amsterdam, Netherlands
Contact:

Re: rtsp camera in domoticz

Post by dutchnld »

Minglarn wrote:It was solved by using snapshots rapidly with php (kinda the same way Domoticz do it).
So in other words your cam must have snapshot function.
My ANRAN ipcam is not supporting JPG snapshots. But there is an undocumented way..

Try:

Code: Select all

http://IP_TO_CAM/webcapture.jpg?command=snap&channel=1
Minglam, you just made my day!

I gave up a year ago tyring to connect my cheap Aliexpress IP-Cam to Domoticz. This week I bought another (PoE this time) camera and tried again. Your suggestion works just out of the box with both cams!

Just add the cam in Domotics with your url (http://IP_TO_CAM/webcapture.jpg?command=snap&channel=1) and get going! No need for scripts or any other fancy stuff.

I don't know the type/brand of the first cam i bought (black), but on my new cam (white) there is a sticker with 'Unitoptek - model IPCX-HC2850B1080-POE' Its a 2MP cam. Both cams came in the same red/white standard box. I think they use the same box for all kinds of camera's, so nothing to read on it about brands / models.

Hopefully this helps out others struggling with cheap RSTP IP cams from China!

Thanks again Minglam!
-----
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
gajotnt
Posts: 70
Joined: Monday 06 February 2017 12:48
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.9700
Location: Azores
Contact:

Re: rtsp camera in domoticz

Post by gajotnt »

12345caravan wrote:EDIT: cam is HI3516C
See image, onvif compatible, 1080P, 3 streams.
Viewable through the danale app on android.....
In a browser I can view the cam, and also vlc is displaying perfectly. Even in synology surveillance station he is working good.
But not in Domoticz.
Hope anyone can help.
URLs work with Escam QD300 (its an HI3510) but i only get 1 second of video in domoticz then it shows nothing.

MJPEG streaming :
http://IP_ADRES_CAMERA:PORT/cgi-bin/hi3510/snap.cgi?&-getstream&-chn=1
Snapshot :
http://IP_ADRES_CAMERA:PORT/web/cgi-bin/hi3510/param.cgi?cmd=snap&-chn=1&-continue=0&-getpic
chn=2 to get substream size
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: rtsp camera in domoticz

Post by woody4165 »

gajotnt wrote:
MJPEG streaming :
http://IP_ADRES_CAMERA:PORT/cgi-bin/hi3510/snap.cgi?&-getstream&-chn=1
Snapshot :
http://IP_ADRES_CAMERA:PORT/web/cgi-bin/hi3510/param.cgi?cmd=snap&-chn=1&-continue=0&-getpic
chn=2 to get substream size
I cannot see the complete links, can you save the message with link set as HTML link?

Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
User avatar
proohu01
Posts: 95
Joined: Friday 17 October 2014 12:20
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: rtsp camera in domoticz

Post by proohu01 »

[url]http://IP_ADRES_CAMERA:PORT/cgi-bin/hi3510/snap.cgi?&-getstream&-chn=1[/url]
[url]http://IP_ADRES_CAMERA:PORT/web/cgi-bin/hi3510/param.cgi?cmd=snap&-chn=1&-continue=0&-getpic[/url]
Pi 2 B | Pi Camera | PiFace 2 | RFXtrx433E (KaKu + Oregon Scientific) | Plugwise (9 Circles) | Aeon Z-Wave stick (Fibaro - dimmers, sockets, RGB, screens/blinds) | RFXMeter (Kwh/water/gaz) | WOL | Onkyo Receiver | RTC | Hikvision | Netatmo | Satel Integra
alexunderboots
Posts: 1
Joined: Wednesday 17 July 2019 17:50
Target OS: Windows
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by alexunderboots »

with my ip cameras (rtsp), i went the other way - i have a server that records all ip cameras and it can provide jpeg on demand
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: rtsp camera in domoticz

Post by EdwinK »

alexunderboots wrote: Wednesday 17 July 2019 17:54 with my ip cameras (rtsp), i went the other way - i have a server that records all ip cameras and it can provide jpeg on demand

Care to explain (how to)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Prutsium
Posts: 92
Joined: Monday 18 June 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany / Netherlands
Contact:

Re: rtsp camera in domoticz

Post by Prutsium »

Have a look at Motion with MotionEye or alternative MotionOs.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: rtsp camera in domoticz

Post by EdwinK »

Thanks, works like a charm, even with my cheap *** Digoo camera.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
mort
Posts: 3
Joined: Tuesday 22 October 2019 7:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by mort »

Hi guys. I am a complete newbie in matters related to Rasprberry Pi and Domoticz, but I already bought RPi 3b + and installed Domoticz on it. I plan to create a smart home control system. As a control panel I plan to use the original RPi screen. Among other things, I want to implement a video door system in the door: to see on the screen who is ringing the door. Is it possible to implement this in Domoticz? Could you sugest how? Unfortunately I can not find a suitable camera for these purposes. Tell me, is this suitable: https://ru.aliexpress.com/item/32903314 ... 2e0e7sqMUH
Thank you in advance.
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by Geitje »

Hi mort,

I use this: https://www.domoticz.com/forum/viewtopi ... =6&t=11345

I have a regular IPcam above my front door.

Works excellent with any IP camera with snapshot functionality. It takes some time to setup. You have to setup the Telegram bot, setup the cam in Domoticz, and make the script work. You can find all info on the forum.

Good luck!
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
mort
Posts: 3
Joined: Tuesday 22 October 2019 7:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by mort »

Geitje, thanks.
Before asking a question, I read the forum and I understood the general requirement for the camera, but I want to make sure that the camera does not catch the eye. That's why I’m looking for a ready-made solution for the camera. Unfortunately, I can’t say looking at the specification in advance if camera has a snapshot functionality. Aliexpress sellers also find it difficult to answer this question. The cost of the camera is not the lowest so I don’t really want to buy a "pig in a poke" for experiments
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by Geitje »

I think it should be mentioned in the manual of the cam? I see in the description it can send snaps to a FTP server, so should be able to retrieve those also (although you need scripting skills then).
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
mort
Posts: 3
Joined: Tuesday 22 October 2019 7:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by mort »

as I said earlier, I understand little about this, so I want to clarify: what will give me the opportunity to receive screenshots that the camera sends to FTP? I have a task to get streaming video on the RPi screen when someone rings my doorbell. until I plan to send myself notifications to the phone via telegram
for example pic attached
2080fd8472aabcb4f8ef76fc64d58206.jpg
2080fd8472aabcb4f8ef76fc64d58206.jpg (24.48 KiB) Viewed 5073 times
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by Geitje »

In the description of the cam you mentioned, it says FTP snaps can be enabled. I think it then also supports snapshot via a link. If not: you can make a script (a variant to the one I posted before) which retrieves the snaps from the FTP server, and sends it to Telegram. It won't need many changes to the script I refered to. However, I am not very well with scripts, so I cannot do the scripting for you.
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
lost
Posts: 616
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by lost »

mort wrote: Tuesday 22 October 2019 14:18 as I said earlier, I understand little about this, so I want to clarify: what will give me the opportunity to receive screenshots that the camera sends to FTP?
I have such a setup, with all cams sending to a dedicated subdirectory on a FTP server installed on the PI that also hosts Domoticz. This FTP use a tmpfs in RAM not to wear the uSD card, just the time for captures to be post-processed by a service I wrote that kicks-in every 10s to:

If files are present, post-process them to get rid of (almost) black images (I have some external lights that kicks in on moves at night and, at switch-off, trigger some black captures before switching back to night mode), cypher-compress and email them to a dedicated gmail account, erase local captures (or store them on SD if send failed, not so often).

Problem is if you don't understand so much about it, as installing configuring the FTP server and building your own setup needs some understanding (not really a click to setup thing!), it's IMO out of reach.

At least if you have snapshot URL you'll be able to trigger some easily from Domoticz, but without internal camera capture setup sending as much at is can you'll IMO miss 90% of the information that may be of interest.

As well, using different camera brands may turn to an headache: FTP clients in the cam almost never work exactly in the same way (create dated subdirs, add other informations on top of captures, may use FTP commands incompatible with some servers). So a working solution for me may not work without updates for you! As well, you have a problem of independent writers/readers here FTP servers are not made to manage: You'll sometimes read partially written files that can't be used. I used vsftpd for years without so much trouble with low resolution (thus small capture files with less probability to have issues) cams but now, you'll get HD cams only on the market and there was at least a bad image in every 10s capture frame. Had to change for proftpd that have a nice "hiddenstore" feature even if, basically, reason for change was integration of new Dahua IP cams that were using an outdated allocate command (to check in advance FTP server side can handle the file to be uploaded) unsupported by vsftpd.

So my advice, if you can't do this yourself, is to use some ready made DVR that'll process video streams for you and manage motion capture in the same way for each camera. Problem is this'll use a large bandwith on your LAN continuously, but every camera working it's own way does not allow commercial solutions to make best use of their internal features.

FTP change to handle a new brand is always a pain: Finding what cause problems (using some tcpdump to figure out what is on the wire because cam side is almost a black box, cross-checking with server side logs), testing other servers for one that works for new cam as well as old ones, thus learning their configuration scheme... On file-system side, you need as well to bypass the PI storage flaw with some configuration again...

Even with some background and understanding, this is time consuming. Happily, I don't setup a lot of new devices now my system is built.

=> Buy cheap cams, checking supported video streams standard & keep the money for a compatible DVR.
Chelsea64
Posts: 4
Joined: Saturday 12 November 2016 23:45
Target OS: -
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by Chelsea64 »

Sorry for an stupid question. I see some of you have script that store an image to domoticz/www/snapshot folder.
I have no snapshot folder in my installation under domoticz/www/

I have sill no cameras installed in my setup (yet).
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: rtsp camera in domoticz

Post by Geitje »

I do not have this folder. You can retrieve an snapshot from any cam in Domoticz anytime with this link:
IPDOMOTICZ:PORT/camsnapshot.jpg?idx=CAMIDX

If you have secured Domoticz you need to insert the username and password also.
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest