IpCamera: New IP Camera Binding

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!

From memory the binding asks that only 1 event is reported in each reply to the ā€œPullMessagesā€ request. This means the camera has to only reply with 1 event instead of the binding having to parse multiple events out of the one reply which may contain 1000 events to parse. The binding will keep asking for ā€œPullMessagesā€ and the camera is meant to send 1 at a time until there are no more. Perhaps there is an issue in the way that is working in the cameras firmware. Since the messages were modelled around the ODM software they should be almost identical so very few areas that can cause 1 to work and the other to not.

I managed to modify, build and apply the ipcamera binding. Root cause of the Reolink camera reboot seems to be MessageLimit set to 1. I started with 1000, similar to what the ONVIF DM set the setting to. After proofing this, i went down to 10, and this works as well.
Question to the IpCamera maintainer: Is there any reason to stay with 1? Setting the parameter to e.g. 10 shouldnā€™t harm i assume.
I will communicate the same to Reolink support team. Not sure how fast / whether they will incorporate a fix.
Hence, to be on the safe side, changing the binding might be the best and fastest approach.