IpCamera: New IP Camera Binding

Hi Matt, Appologies for my lack of clarity. I had manually verified latest firmware against the UK Hikvision download pages.
The URL for the alarm stream I used is the one listed in the logs so I would have expected them to be the same. Your insight has given me a another thing to try, short of setting up Eclipse, which is to elimiate docker. First I will try the other things you mention.

Matt, thank you for your assistance so far, it is much appreciated. It will take me a while to do all of these things and will report back in due course.

KInd regards
Martin

Donā€™t see any error
Only I donā€™t see port in your thing file following this specs
PORT This port will be used for HTTP calls for fetching the snapshot and alarm states.ā€™
In my case I setup this: 80

You donā€™t see any image or stream opening the sitemap tile on your system?

Anyway these are my sitemap entries:

// (Potrebbe avere Peggiore risoluzione) Text label="Cameras Mjpeg Stream" icon="camera"{Video url="http://192.168.1.180:54324/ipcamera.mjpeg" encoding="mjpeg"}
Text label="Snapshot 1FPS Stream" icon="camera"{Video url="http://192.168.1.180:54324/snapshots.mjpeg" encoding="mjpeg"}
// (Minimizza il traffico dati) Text label="autofps Stream" icon="camera"{Video url="http://192.168.1.180:54324/autofps.mjpeg" encoding="mjpeg"}
Text label="HLS Video Stream" icon="camera"{Video url="http://192.168.1.180:54324/ipcamera.m3u8" encoding="hls"}
Text label="HLS Webview Stream" icon="camera"{Webview url="http://192.168.1.180:54324/ipcamera.m3u8" height=15}
Text label="Image using jpg method" icon="camera"{Image url="http://192.168.1.180:54324/ipcamera.jpg" refresh=1000}

Hi Matt,

I am currently facing some ā€œloadā€ issues with my camera as i am accessing it in parallel with my NVR and directly with openhab ipcamera binding.

Iā€™d like to reduce the load openhab is generating (by the ipcamera binding) to only use the xml alarm stream. So to speak: only grab the alarms but NO image data (hence reduce encoding/decoding load of the camera).

Is it possible to run the binding without any binary input stream - so only for the XML alarms and like ā€œdeactivateā€ RTSP/the FFMPEG input?
My NVR is not passing through smart alarms from HIKVISION, thatā€™s why i want to still use those (without the image data).

I would then setup a second ipcamera thing as generic HTTP camera pointing to the NVR for an rtsp passthrough image channel.

Cheers,
Stefan

I inserted port 80 in things configuration, but still no video in PaperUI and openhab app (IOS).
Following conf. camera port.

Schermata 2020-03-30 alle 16.50.50

Do I have to put something in rules?

Jad

No rules as far as I know Francesco for simple video streaming
Anyway we have now to address to Matt suggestion
Sorry I reached my limit but here two more personal suggestion
a) donā€™t even see this entry:

    IP_WHITELIST="DISABLE"

b) enable trace log as Matth always suggest us

Added IP_WHITELIST=ā€œDISABLEā€, but no way here.
Log is enabled, but is very long file and continue to imcrement.
log.pdf (26.7 KB)
The camera has the last FW V5.5.82 build 190220.
Jad

You can stop any fetching of the snapshot with the update image events option as explained in the readme. Then it will only occur on demand when you request something from the server port.

You wont see them in PaperUI with the image updates turned off. I recommend you leave it turned off and instead use the other methods described in the readme. PaperUI is not a user interface.

What is the correct UID, is it 005 or GiardinoPost? your clearly not reading the logs as it will be complaining about that when openhab starts. I am sure you will solve it if you start reading the logs that get created.

Ok, thanks for confirming!

Thanks fr reply, I donā€™t have http mjpeg stream, only RTSP stream from ipcamera, how can I display that?
My camera accessible via VLC on the following address: rtsp://user:password@192.168.1.119:554/onvif1

Skinahā€¦ is there any way to deal with frequently stopping video feed from camera? Iā€™d love to have a solution for refreshing video feed when it stops for some reason. Refreshing the Item is not the solution since you need to wait long to refresh stream and you can miss something. With your knowledge at the moment is there any chance for a solution to detect that camera stream crashed?

I have tried several ip cameras, but canā€™t get this working (( Who can tell me how you display stream from cameras in OpenHAB interface? Is it possible to display RTSP stream in BasicUI interface? Why Iā€™m asking is because all well known browsers block RTSP streamsā€¦
I have tried relatively old camera with HTTP interface- AMOVISION AM-Q6320-WIFI, it supports FFMPEG for sure, however canā€™t geit it to show stream either other than in BasicUI webview window opening on raspbian, not windows.

@zacofunny

What type of steam is stopping?
Snapshots.mipeg
Ipcamera.mjpeg
Ipcamera.m3u8

How long does it run for and can you capture it with trace mode on?

Iā€™m sure I could add a feature that auto Re starts stopped streams if someone requests it and offers to test.

I donā€™t run cameras non stop and only on demand here. Some cameras may stop streams to save power or to clean out ram or do auto reboots. So knowing the root cause will be helpful.

Hoping not bothering may I ask to explain which operation is behind this log messages, please?

9 [vent.ItemStateChangedEvent] - BatuSnapCamera changed from raw type (image/jpeg): 130948 bytes to raw type (image/jpeg): 130950 bytes

2020-04-03 17:10:30.848 [vent.ItemStateChangedEvent] - BatuSnapCamera changed from raw type (image/jpeg): 130950 bytes to raw type (image/jpeg): 131008 bytes

Image channel.
The readme recommend you disable that and use other methods.

New build 2020-04-08

  • Ability to specify ffmpeg motion arguments to filter and crop or whatever you wish. UNTESTED.
  • Ability to change the ffmpeg mjpeg arguments so you can resize or change the FPS. UNTESTED.
  • Fixed a probable thread safe issue.
  • New netty version
  • Less logging to speed things up.
1 Like

Right, I mean in Basic UI or Sitemap on IOS is not working.

Correct, now is all GiardinoPost.

:pensive: Sorry, I need help.
I donā€™t understrand how to use the updateimagenow. :sweat:

Jad

@matt1Thanks for this great binding. I have been digging into it for several days now. Still figuring things out, but it seems to be exactly what I have been looking for. Thanks too for including the ffmpeg motion arguments for filter and crop. I will test as soon as I get my initial setup stable. Probably need to order a newer model of camera first.
Keep up the great work and stay healthy!

1 Like

Per the readme, try FFMPEG_INPUT="rtsp://192.168.x.x:554 in the Things file.

Hello All,

anyone experiencig issue with java heap space caused by ip camera binding?

!!!! Camera possibly closed the channel on the binding, cause reported is: {} java.lang.OutOfMemoryError: Java heap space

Any suggestion how to solve it?

Thx

Y