IpCamera: New IP Camera Binding

Tags: #<Tag:0x00007fe06b4f6520> #<Tag:0x00007fe06b4f63b8> #<Tag:0x00007fe06b4f6200>

(Nakh Home) #220


i am trying to add this camera Y203S

(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 ( is the openhab host and 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,

(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

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
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!

(Nakh Home) #230


please could you advise

(Sergey) #231


what camera do You have?

(Nakh Home) #232



(Sergey) #233

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



http://IP ADDRESS:554/onvif1

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


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



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

in every cases, i am getting :slight_smile:

(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