IpCamera: New IP Camera Binding

camera
ip-cam
onvif
Tags: #<Tag:0x00007fd30f910728> #<Tag:0x00007fd30f9105e8> #<Tag:0x00007fd30f9104a8>

(Tom Beerten) #221

I don’t get any content at the link. Is it possible I need to enter a custom link?


(Skinah) #222

Yes use google to find a link for your camera then. Enter it in.


(Marco Salinardi) #223

Hello, i am very happy about this binding, using it with a Foscam C2. The only problem is that this cam cannot get the setMotionAlarm to work. I think it’s acting differently from the CGI manual, In the manual the comand to set the motion alarm is said to be /cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1 but when i try with the browser i get this info :<CGI_Result> <result>-3</result> </CGI_Result>.
I have not tested all, but other comands are working just fine so does the binding.
If i open the camera UI and i switch the control of the motion detect from there everything is working.
I think in this particular model the comand is another one. Anyone found the proper comand for this camera? I tried to write to the foscam support to have the actual manual. They told they would have send it to me but it’s almost one motnh they are not answering back.


(Szymon) #224

Hi Matt,

thanks for the tip with traffic pickup. I recorder the traffic between my devices (192.168.0.25 is the openhab host and 192.168.0.32 is the cam). The pcap session is attached:

I hoped I would be able to spot the violation, but I am not. Are you able to have a look?

The session looks ok, the host acknowledges the http image transfer with ok status, I cant see where the error is:

Thanks a million,
Szymon


(Skinah) #225

I may have noticed something but I am no expert and this may not be the issue, but it makes sense…

My camera and others that people have posted in this thread have headers that look like this.

HTTP/1.1 200 OK
Content-type: text/plain;charset=utf-8
CONNECTION: close
CONTENT-LENGTH: 18

Another camera of mine

HTTP/1.1 401 Unauthorized
Date: Wed, 06 Jun 2018 19:57:00 GMT
Server: webserver
Content-Length: 178
Content-Type: text/html
Connection: keep-alive
Keep-Alive: timeout=10, max=99

Your camera looks like this.

HTTP/1.1 200 OK
Server: GoaHead
Tue, 12 Jun 2012 01:56:34 GMT
Content-Type:image/jpeg
Content-Length:21003
Connection: close

The first thing I notice is there is no space after the ‘:’ delimiter in the header which may be because your camera creates a header (or netty wrongly IDs it due to a bug) called “Content-Length:21003” instead of a header called “Content-Length” with a value of “21003”

Edit: It could also be the date and time being detected as a header and it has illegal characters in it. I would need to double check it was not an error on my half when I cut and pasted from your logs but the Date: header looks like it breaks convention.

If your camera works in multiple browsers and only fails with this binding then I would report this as a possible bug here. It is an active project, and I believe minecraft uses the library.


(Skinah) #226

New Build 05/06/2018 has following changes:

  • FOSCAM now has some extra functions to support more cameras.
  • Bug fixes and improvements to the backend code that all cameras use.
  • Binding will now ask for multiple snapshots even if the camera has not sent the first one, this means I have much smoother response from HIKVISION with 4K pictures. This is the result of 3+ weeks working towards unlocking full async comms with netty.
  • More logging in debug and less in INFO to keep logging to bare minimum for those that have a working setup.

Great, thanks for taking the time to post what does work as I really need more people that find the binding works to just post a quick “works fine with X camera”.

I think you will find this new build will work with your C2 and enable and disable the motion alarm. I know you will post either way so happy to look into this in a little more depth.


(Marco Salinardi) #227

YESSS!!! Great job! I confirm now motion alarm get activated on my C2 FOSCAM but i get this errors. Everything is working fine though. It reports it continuously @matt1

2018-06-05 14:04:31.997 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - !!!!!!!!!!!!!!!!!!!!!!!!! Could not find the url /cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXX&pwd=XXX when closing channel
2018-06-05 14:04:31.998 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - !!!!!!!!!!!!!!!!!!!!!!!!! Could not find the url /cgi-bin/CGIProxy.fcgi?usr=XXX&pwd=XXX&cmd=snapPicture2 when closing channel

(Sergey) #228

Great job matt,
Alarm crossing the line is work. :+1:
But there are gaps in its operation compared to the fact that the camera itself sends me an e-mail

Tried to connect a NVR - no luck yet :frowning: for some reason after this attempt even hung on the nvr web interface.


(Szymon) #229

Hi Matt,

well-spotted. I tested my cam in chrome, safari, firefox and ie - and it works in all of them. I would appreciate if you could report it.

thanks a lot!
Szymon


(Nakh Home) #230

@matt1

please could you advise


(Sergey) #231

@nakh_Home

what camera do You have?


(Nakh Home) #232

Y203s

https://ipcamtalk.com/threads/meisort-y203s.24661/&ved=2ahUKEwjXrYC0ir3bAhVIfMAKHYedCH0QFjAUegQIBxAB&usg=AOvVaw36H5l-yh1WwAizoL5JKfVm


(Sergey) #233

try the link below in any browser, just put your ip user and passvord

http://[IP]/videostream.cgi?usr=[USERNAME]&pwd=[PASSWORD]

or

http://IP ADDRESS:554/onvif1


My Story : Registered the 12/07/17:)
(Tom Beerten) #234

Matt,

Searched all over google, but cant find one that works. Its an IP-cam from china, do you have any clue or hints?


(Nakh Home) #235

Thanks

image

i have tried admin/blank (which works for rtsp://192.168.1.40:8001/0/avN in VLC)
i have also tried admin/admin

in every cases, i am getting :slight_smile:
image


(Skinah) #236

Since you asked :slight_smile: Buy a better camera with documentation, support and good firmware which will cost more money. Buying a better camera will also mean you get better night vision which in my opinion is worth paying for otherwise a camera which does not work well at night is only working half the time. For “cheap” cameras with rtsp working maybe look at blueiris software which requires a fast windows based computer to run AFAIK.


(Kris K) #237

Has anyone tested this binding with Dahua 5231R cameras? I have 10 of them I want to intergrate :slight_smile:


(Ahmed Saad) #238

please ,How can I install this binding on raspberry pi using “wget” in putty?


(Tom Beerten) #239

ooh ooh I know this one:p

wget http://www.pcmus.com/openhab/IpCameraBinding/ipcamera-01-06-2018-Old%20Backend.zip

Unzip it and place the jar file in: /usr/share/openhab2/addons

Restart Openhab2 sudo /etc/init.d/openhab2 restart


(Skinah) #240

@dastrix80 I have not had anyone who has tested the binding with any model Dahua report back any information either way if it works or does not. This is why in the first post it shows this binding as partly implemented and needing people to test for Dahua cameras. The next build I release should have better support for cameras behind a NVR and each build as people report what issues they find I can improve the support. If testing be sure to try a single camera first and to also try the camera direct to a switch and not behind an NVR if you have issues.