IpCamera: New IP Camera Binding

Hi @matt1 , I’ve read through several threads, your git commits, the docu etc.

I cannot finde any reason or issue, just read and followed the 3.2 addon docu carefully…
Nevertheless, it’s not working for me, that’s why I’m asking here…

EDIT:
Seems that I found the issue…
UUID is not “ipcamera:generic:esp32cam” it’s just “esp32cam”…

thx.

how to get rid off errors in the logs for Video URL ? I have Dahua cam which has 3 streams and for 3rd one I configured in cam as mjpg which want to show in a sitemap:
`

Video url=“http://xxx:xxx@xxx.xxx.xxx.xxx/cgi-bin/mjpg/video.cgi?channel=1&subtype=2” encoding=“mjpeg”

`
errors when opening or refreshing a sitemap:

2022-03-03 12:06:23.065 [ERROR] [java.net.CookieManager ] - Invalid cookie for http://xxx.xxx.xxx.xxx/cgi-bin/mjpg/video.cgi?channel=1&subtype=2: secure; HttpOnly
2022-03-03 12:06:23.065 [ERROR] [java.net.CookieManager ] - Invalid cookie for http://xxx.xxx.xxx.xxx/cgi-bin/mjpg/video.cgi?channel=1&subtype=2: secure; HttpOnly

Also strange that on PC I can see video and on android phone with Openhab App no way… Still on OH 2.5, plan to upgrade to 3.2 later this year.

Your using the camera directly and not the binding, so I am confused why your posting in this thread? Read the bindings documentation and then open your own new thread.

actualy I’am using the binding for other camera and for dahua I want to show mjpeg stream directly from it :wink:

Hi Matt

Yesterday my livestream of the Reolink stopped again - time on the camera was 23:23:07.

These are the logs around this period.

I think it has nothing to do with your binding or openhab (As the TP Link works most of the time), but maybe someone had the same issue and can tell me what wo change on the camera.
openhab_log_20220304.txt (50.9 KB)

Thank you

Your log shows the FIFO is full, so read the problem and the fix to try here:

Https video stream not possible - potentially problem with self signed certificate? - Add-ons / UIs - openHAB Community

Hi @matt1
Would if be possible to get a switch to reboot hikvision thru api /System/reboot?

If I am correct, channels are for when there is a STATE like a light globe is ON or OFF, and rebooting does not have a state, as it is something that you trigger to occur. It is only temporary and you are not able to know the difference between rebooting and the camera being offline. I believe what would be considered the correct way to do it, is implement it as an ACTION which would require you to setup a rule to trigger the action when the switch is moved.

This then makes it almost just as easy to create a script and call the script when the switch is moved with a rule. To be clear I don’t like this answer I am giving and wish it was simple to create a switch for an action that takes zero arguments. It should be simple, to just add a camera and get advanced actions available in the main UI without the need to research and spend 20+ minutes setting it up when it should be available to add when your creating some equipment in the model.

Sadly after a quick github search it appears that actions still are not fully supported by mainUI/core

[automation] Binding actions cannot be configured by UIs · Issue #1745 · openhab/openhab-core (github.com)

This is something which is best raised as a request in github, especially as I am busy on another binding at the moment and a post in this long thread is only going to get lost.

1 Like

Hi

Since I always had problems with the Livestream, I have now test an own Rasperry PI in use for the IP Camera Binding. The only binding installed is the IP Camera binding.
Nevertheless, the stream stops after some time.
However, the binding shows me both cameras as online.
I have a copy from the live logging attached as well as the logfile from this afternoon. According to the camera image, the stream stopped at 17:51. Im am running on openhab 3.3 snapshot

Logfile_Live.txt (55.9 KB)

Logfile during end of stream (OneDrive)

When I disable and then enable the binding, it works again.

Cameras
TP Link Tapo and Reolink

BR
Daniel

Have you tried to connect the cameras with lan cable?
I have problems with reolink WLAN camera but with cable it works great.

Hi Sebastian

both are connected via LAN.

I thought maybe its due to the powerline, but for test purposes I connected both cameras directly to the switch. At the time of the failure, both were directly connected to the switch

BR

Hey guys.

Does anybody know if the Xiaomi Mi 360° Home Security Camera 2K would work as a Generic camera?

Cheers

See here as you would need a working rtsp or http stream as a minimum for it to work as generic.

That’s what I thought, thanks. Apparently some CfW for the Xiaomi cam offer both RTSP and ONVIF, but as of yet not my model.

Recently i upgraded a Reolink RLC-811A IP camera to the latest FW version v3.1.0.956_22042008. Before, i.e. with FW v3.1.0.764 everything worked like a charme. But with latest FW, camera seems to reboot every ~4 minutes. I don’t even receive any motion indication although there’s mortion.
Critical here, Reolink upgraded ONVIF protocol to version 21.06. Usually standardized protocols are backwards compatible, however with ONVIF device manage 2.2.250 i don’t face any issues and i even receive motion indication messages.
Now i’m wondering, makes ip camera binding use of more and different messages compared to ONVIF DM manager or is there probably a somehow “mailformed” packet send by the binding?

Rational on why i want to stay with recent Reoliunk FW: They introduced and still improve AI to further detail the motion, i.e. person, pet, car.
I’m having discussion with Reolink support team in parallel.
Currently I’m struggling with “log:set TRACE org.openhab.binding.ipcamera” answering “Error executing command: Unable to set level for logger”, hence i don’t have more details yet :-(.

Meanwhile i managed to set the ipcamera binding log level to TRACE. Having had a look into three retries, i noticed “Sending ONVIF request:PullMessages” to be the last output of the binding before camera connection got lost (camera most probably restarts).
Any idea on whether there has been changes in the ONVIF protocol in version 21.06?
Will share the same with Reolink support team.

If switching off the ipcamara binding, does the Reolink camera work as intended (i.e. no reboots at all)?

Yes, in this case camera is stable. Similar to disabling the ONVIF interface/port on camera side.

Just checked: ONVIF DM makes use of “PullMessages” as well.But in contrast to ipcamera binding, the IE “MessageLimit” within the body isn’t <1> but <1000>. Don’t think the other IE “Timeout” with “PT8S” vs “PT1M” makes any difference. Despite that body seems to be identicall for both.

The “PullMessages” answer takes 3 IP fragments with std ethernet (i.e. MTU = 1500). Hope above messages are not treated as IP fragments.
Will next take a tcpdump during misbehaving situation.

I’m not an expert on interpreting ONVIF messages, but what i see in misbehaving situation: from 3 “PullMessages” requests within the short tcpdump, seems just one received an answer.
Kindly let me know what further tests could be done / what to focus on in detail. Thanks a lot!