IpCamera: New IP Camera Binding

no, unfortunately

image

Same in basic UI

you have pressed the green refresh button to the right of Camera Image Yes? as the image shows the switch being toggled.

@nakh_Home you can add in to your things file:
POLL_CAMERA_MS=2000 (this will update the image every 2 seconds)
UPDATE_IMAGE=true

@matt1 Has something changed in the binding? My images only update every 10 seconds (exactly) no matter what i set poll to

Thanks, I didnā€™t see the reply. I have switched to a pure HTML solution based on your FAQ for now. Thank you.

i add those parameters but still the same. no image

Yes it only updates 10% of the poll time. This was a recent change. Please see the readme how to use ipcamera.jpg requests instead as this was for a number of reasons which include reducing the load it will place on the myopenhab server. Using the image channel doubled the cpu usage and can create oome issues when you have multiple cameras.
I believe it is possible to create an image item that uses its source from the ipcamera.jpg so it can still be done just in another way.

@matt1 apologies I was using this but as the binding currently wonā€™t select the correct IP for my server I reverted to the image channel for the meantime (didnā€™t realise it was now 10%)

On another note Iā€™m still trying to get the motion working on the Ezviz db1 doorbell (not sure of the onvif url at present and not sure how to discover it either), Iā€™ll update you once I have. Is there anyway to query the the camera for an xml or anything?
I did download onvif device manager and it seems thereā€™s an event stream but again it didnā€™t show me anyway to access it

You only need to know the onvif port and that can be found with the onvif device manager app. Btw a generic onvif camera can not yet use the alarm/event in the binding. I would not be surprised if cheaper onvif cameras donā€™t implement the feature anyway which the ODM program will show if it works on the camera or not. I spent a bit of time looking at using RTSP to generate a motion alarm last night and trying to find a good way that it can be done with lowest cpu possible. How much cpu would you be happy to loose from your server to get the feature?

Yes I can see the image would be handy if the server does not know the right ip, will look into this as there is sure to be a way other bindings do it.

I donā€™t think it would hurt to have rtsp motion available (with big big warnings if you switch this onā€¦)
Until I get the fffmpeg side up and running And load my streams on a couple of panels I donā€™t know how much cpu Iā€™m committed to already (currently about 30% under heavy load on my qnap which is also running a lot of other apps, an Rpi is going to take a big hit though Iā€™d have thought)

Once I look in more detail on the cam Iā€™ll let you know what I find, prob not until the weekend though, motion is not selectable in the Hikvision batch config tool(greyed out)

does anyone know what to enter for server_port for an Axis A8105E doorbell? Trying to configure it under paper UI

Hi,
i am little bit lost. the Thing is online but no image. any help will be appreciated

My thing definition

Thing ipcamera:ONVIF:003
[
    IPADDRESS="192.168.1.40",
    ONVIF_PORT=80,
    PORT=80,
	SERVER_PORT=54321,
	FFMPEG_OUTPUT="/etc/openhab2/html/cameras/cam1/",
	SNAPSHOT_URL_OVERRIDE="http://192.168.1.40/onvif/snapshot",
	USERNAME="admin",
	PASSWORD="",
	POLL_CAMERA_MS=2000,
	UPDATE_IMAGE=true
]

My items:

Switch	Cam003_updateImageNow					{channel="ipcamera:ONVIF:003:updateImageNow"}	
Switch	Cam003_updateGif						{channel="ipcamera:ONVIF:003:updateGif"}	
Image	Cam003_image							{channel="ipcamera:ONVIF:003:image"}	
Dimmer	Cam003_pan								{channel="ipcamera:ONVIF:003:pan"}	
Dimmer	Cam003_tilt								{channel="ipcamera:ONVIF:003:tilt"}	
Dimmer	Cam003_zoom								{channel="ipcamera:ONVIF:003:zoom"}	
Number	Cam003_gotoPreset						{channel="ipcamera:ONVIF:003:gotoPreset"}	
String	Cam003_streamUrl						{channel="ipcamera:ONVIF:003:streamUrl"}	
String	Cam003_rtspUrl							{channel="ipcamera:ONVIF:003:rtspUrl"}	
String	Cam003_imageUrl							{channel="ipcamera:ONVIF:003:imageUrl"}	
String	Cam003_hlsUrl							{channel="ipcamera:ONVIF:003:hlsUrl"}	

The logs:

[WARN ] [ing.ipcamera.handler.IpCameraHandler] - Can't find ch when removing handler 		URL:
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 1 for URL:/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/onvif/snapshot
[ERROR] [ing.ipcamera.handler.IpCameraHandler] - Can not connect with HTTP to the camera at 192.168.1.40:80 check your network for issues!
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.40:80
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Stream Server possible connections are:lily/127.0.1.1
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Alt Ip finder gives:192.168.1.150
[INFO ] [ing.ipcamera.handler.IpCameraHandler] - IpCamera file server for camera 192.168.1.40 has started on port 54321
[INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.1.40 is now online.
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - We sucessfully connected to a ONVIF SERVICE:be.teletask.onvif.models.OnvifServices@136ca4d
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching the number of Media Profiles this camera supports.
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[WARN ] [ing.ipcamera.handler.IpCameraHandler] - Can't find ch when removing handler 		URL:
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 1 for URL:/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/onvif/snapshot
[ERROR] [ing.ipcamera.handler.IpCameraHandler] - Can not connect with HTTP to the camera at 192.168.1.40:80 check your network for issues!
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.40:80
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Stream Server possible connections are:lily/127.0.1.1
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Alt Ip finder gives:192.168.1.150
[INFO ] [ing.ipcamera.handler.IpCameraHandler] - IpCamera file server for camera 192.168.1.40 has started on port 54321
[INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.1.40 is now online.
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - We sucessfully connected to a ONVIF SERVICE:be.teletask.onvif.models.OnvifServices@1f0a481
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching the number of Media Profiles this camera supports.
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot
[DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.40/onvif/snapshot

[WARN ] [ing.ipcamera.handler.IpCameraHandler] - Can't find ch when removing handler 		URL:

New build 2020-01-08 has these changes:

  • New method of detecting host IP and better logging of all combos it finds.
  • Now serves on all NICā€™s so you can ignore it if the IP is wrong as it will still work. @delid4ve give it a try.
  • Upped the Image channel to update 20% of the poll time.
  • New ffmpeg motion detection for httponly cameras. Need to work on better debouncing but should work enough to try it out. Single control allows it to be turned on and off and also adjust how sensitive it is in case you need different settings for night VS day. Very little testing done on it so have fun.
    The lower the FPS and the lower the resolution the less CPU this chews so if you have 30 fps video streams consider dropping it to 10-12.

@matt1

2020-01-08 12:47:51.747 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.3.1
2020-01-08 12:47:51.748 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.5.1
2020-01-08 12:47:51.749 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.6.4
2020-01-08 12:47:51.753 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.3.1
2020-01-08 12:47:51.753 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.5.1
2020-01-08 12:47:51.754 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.6.4
2020-01-08 12:47:51.755 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.3.1
2020-01-08 12:47:51.755 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.5.1
2020-01-08 12:47:51.760 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.3.1
2020-01-08 12:47:51.761 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.6.4
2020-01-08 12:47:51.761 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:10.0.5.1
2020-01-08 12:47:51.761 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.6.4
2020-01-08 12:47:51.806 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - IpCamera file server for camera 192.168.4.2 has started on port 50001 for all NIC's.

cameras working perfectly now

How do i use this? Couldnā€™t find in readme

Not in readme as it needs testing and further work before it is useful. But worth checking out to see what the cpu load is like, the channel is ffmpegMotionControl best linked to a
Slider control.
And the motionAlarm channel will move when it detects movement.

Have it working on a 1080p feed at 10fps on an ARM processor.

Just get this in my events and wont set a value (reverts straight back to null):

2020-01-08 14:14:59.432 [ome.event.ItemCommandEvent] - Item 'Camera5_MOTIONFF' received command 80
2020-01-08 14:14:59.432 [nt.ItemStatePredictedEvent] - Camera5_MOTIONFF predicted to become NULL

@matt1 my bad setup as hikvision and just seen http only

So have done a little testing, waiting for the missus to get home any minute so i get some real motion,

Anything other than 100 i get hundreds of false alerts (even at 1 or 99 - not sure what way the sensitivity goes), even at 100 lots of false alerts, have even turned off the date on the cam image.
CPU usage for 1 camera on a QNAP TS-453 Pro (16gb ram celeron 2ghz) spikes from 1-10% usage to 50-60% usage for openhab only

@matt1 yep definitely too sensitive, so worked out that 0 is off, 1 is most sensitive, 100 least, with no motion (other than a tree in the background i cant even see is moving) and set at 100 its too sensitive still, i dont know how it compares but i think we could do with the slider being 1/10th of what it currently is.

UPDATE: Just had ā€˜real motionā€™ and although iā€™m getting false alerts up at 95-100 its not picking up real motion. Going to disable for now until youve had a good look. Let me know if you want tested or anything

and an error after removing the thing and items (textual):

2020-01-08 16:58:17.336 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:HTTPONLY:5 tried updating channel motionAlarm although the handler was already disposed.

New build tonight 2020-01-09 has these changes:

  • De-bouncing and bug fixes added to the ffmpeg motion detection feature. It is ready for people to test but please ask questions and give feedback in this separate threadā€¦

Hi,

Iā€™ve got a INQMEDIA (Chinese) IP camera that I can access through an android app called Onvifer.
The camera is detected through auto-detect and gives me the following data:

No username/password

The thing in openhab displays ONLINE, yet I canā€™t see an image.
Also the tilt ans pan items arenā€™t working. So I ghuess thereā€™s something wrong with the thing parameters, but what am I missing?

See the readme for how to get trace level logs as only trace will show any responses back from the camera with enough detail to fault find.

Great work again!
Now working with HikVision DS-2CD2712F-I and DS-2CD2512F-IS

Good evening, all,

I have successfully installed the IP Binding and both cameras have been detected. What does not work is that the PIR alarm shows no reaction in OH as soon as the camera detects a motion/person. Does anyone have any idea what I am doing wrong?

Switch Instar_Garten_Bewegung "Bewegung erkannt" { channel="ipcamera:INSTAR:XXX:pirAlarm" }
	rule "Kamera Garten Bewegung"
	
	when
		Item Instar_Garten_Bewegung changed from OFF to ON
	then
			sendNotification ("XXX", "Bewegung im Garten!")
			sendNotification ("XXX", "Bewegung im Garten!")
			
	end

The log only shows that the channel was included. But it does not jump to OFF or similar:

2020-01-10 20:02:37.068 [.ItemChannelLinkAddedEvent] - Link ā€˜Instar_Garten_Bewegung-ipcamera:INSTAR:XXX:pirAlarmā€™ has been added.