IpCamera: New IP Camera Binding

hi IP camera users.

i have a bit of an issue with my install since going to 4.03.

i did a fresh install of 4.03 because my 3.X was on a previous linux version which didnt support java 17 so i couldnt upgrade.

the restore bring back my ipcamera binding, i have to re-install ffmpeg but about 12hours later my system crashes due to log/memory usage of resources and the only way to get the system back is to reboot and disable ip camera binding.

I have tried to play around with the log42j file (either edit or keep the original from the 4.03 installation but it hasnt made a difference.

does anyone else have similar issues? any ideas on what can be an issue? could it be ffmpeg? somethign with JAva 17 perhaps? something on the logging level that ip camera creates.

appreciate any thoughts/help.

Hi

I have been struggling to get Hikvision NVR and Camera to work.
ISAPI user and password is ok, same as the admin user.
Tested the rtsp url with user and password and works. Illegal login lock is ticked off.

But logs remain:

2023-10-06 17:46:10.085 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'hikvision.things'
2023-10-06 17:46:10.094 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting 192.168.10.135 to ONVIF
2023-10-06 17:46:10.100 [DEBUG] [amera.internal.onvif.OnvifConnection] - Cameras  UTC dateTime is:2023-10-6T14:46:9
2023-10-06 17:46:10.100 [DEBUG] [amera.internal.onvif.OnvifConnection] - Openhabs UTC dateTime is:2023-10-06T15:46:10.100Z
2023-10-06 17:46:10.101 [DEBUG] [amera.internal.onvif.OnvifConnection] - deviceXAddr:http://192.168.10.135/onvif/device_service
2023-10-06 17:46:10.102 [DEBUG] [amera.internal.onvif.OnvifConnection] - eventsXAddr:http://192.168.10.135/onvif/Events
2023-10-06 17:46:10.102 [DEBUG] [amera.internal.onvif.OnvifConnection] - mediaXAddr:http://192.168.10.135/onvif/Media
2023-10-06 17:46:10.102 [DEBUG] [amera.internal.onvif.OnvifConnection] - Camera has no ONVIF PTZ support.
2023-10-06 17:46:10.141 [DEBUG] [amera.internal.onvif.OnvifConnection] - Eventloop is shutdown:true
2023-10-06 17:46:14.100 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Setting up the camera to use Basic Auth and resending last request with correct auth.
2023-10-06 17:46:15.097 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera 192.168.10.135, re-starting it now
2023-10-06 17:46:15.102 [WARN ] [ipcamera.internal.MyNettyAuthHandler] - 403 Forbidden: Check camera setup or has the camera activated the illegal login lock?
2023-10-06 17:46:23.101 [WARN ] [ipcamera.internal.MyNettyAuthHandler] - 403 Forbidden: Check camera setup or has the camera activated the illegal login lock?

Things

Thing ipcamera:hikvision:garages "Garages"
[
    ipAddress="192.168.10.135",
    username="admin",
    password="xxx",
    onvifPort=80, //normally 80 check what it needs
    port=80,
    ffmpegOutput="/openhab/userdata/recordings/Garages/",
    ffmpegInput="rtsp://192.168.10.135/Streaming/Channels/101"
]

Any idea what I am missing ?

Set the log level for ipcamera to TRACE. It will show the url requests.

Hello, FYI
I have an Annke NCD800 here and was able to successfully connect it with Thing ipcamera:onvif
Openhab Version: 3.4.4

2023-10-07 13:46:09.385 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.10.135:80/ISAPI/System/IO/inputs/6/status
2023-10-07 13:46:09.387 [WARN ] [ipcamera.internal.MyNettyAuthHandler] - 403 Forbidden: Check camera setup or has the camera activated the illegal login lock?
2023-10-07 13:46:09.388 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is        :<?xml version="1.0" encoding="UTF-8"?><ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL></requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
</ResponseStatus>
:

Try using hikvision as the thing as the firmware and API calls from annke cameras I have heard are the same as hik are the OEM makers for annke.

If you tripped the illegal lock, you need to power cycle the camera and possibly restart the thing. Its possible your user/pass does not have enough rights for an API call, or your camera is missing a feature for that call. Is there any downsides to the WARN or does everything work?

Does your camera have alarm inputs?

EDIT: remembered this post/thread here which is the same issue?

Yes heard it too.
I first tried it with hikvision but that did not work for me.

Hi, I have Reolink Duo 2 Wifi, I’m wondering with option/switch should I use to enable/disable push and/or e-mail notifications? I was trying to use Enable Motion Alarm but without effect. Other things (at least those which I tried to use) are working for example LED control or Alarm Output (camera siren) are working. I’m using openhab 4.0.2.

I do not have any video coming in.

Hi all, Just a general question regarding video streams and external access: I use the zoneminder binding and this references video streams using the local IP ( Video url=“[http://192.168.1.251/zm/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=12 ]) and yet I am able to view this externally also (also using the app). However if I setup the same camera using the IP Camera binding, I cannot view it externally. What is the zoneminder binding doing differently than this IP Camera binding?

I updated to the snapshot build and video is now working. However when I open the stream the log is spammed with:

[camera.internal.servlet.StreamOutput] - FIFO buffer has run out of space: Queue full

Hi, I found such file with Reolink API: Reolink Camera API User Guide_V8 (Updated in April 2023) | Reolink Community.

Is it possible to add i next release of bunding following functionalities:

  • on/off for auto white led light (probably possible use of SetWhiteLed)
  • on/off for different notiffications of alarm (push, mail) - they are not possible today ?

Please create a more detailed request with a short paste of the api inside a github issue.

Hi I created request :slight_smile:
https://github.com/openhab/openhab-addons/issues/15757

1 Like

Help wanted :wink:

I do have 3 different Reolink IP Cams

  1. Reolink Argus 3 Pro
  2. E1 Zoom
  3. Reolink Duo 2 WiFi

I have create Things manually by getting required configuration from 1 thing created as sample before.

While Things for Cam 2 & 3 are online, I fail to connect to Cam 1 <= probably because this is a Cam running on battery only?? I’m able to connect to Cam using Reolink App at same time when it fails in openHab.

Anyway, Cam 2&3 would be more important to be able to easily turn on/off notification when we are in garden/house instead of using Reolink App in sub-sub-sub-menu :wink:

I also created proper item for e.g. enableFTP or enableMotion but if I do change those items, I do get a HTML error :-/

Configuration

Thing ipcamera:reolink:REO123 “Reolink Duo 2 WiFi” @ “Gartenhaus” [
ipAddress= “192.168.8.100”,
port=“80”,
onvifPort=“8000”,
useToken=true,
username=“MyUser”,
password=“MyPassword”,
mjpegOptions=“-q:v 5 -r 2 -vf scale=640:-2 -update 1”,
updateImageWhen=“0”,
gifPreroll=“0”,
ffmpegLocation=“/usr/bin/ffmpeg”,
ipWhitelist=“DISABLE”,
mp4OutOptions=“-c:v copy -c:a copy”,
pollTime=“1000”,
nvrChannel=“0”,
snapshotOptions=“-an -vsync vfr -q:v 2 -update 1”,
ptzContinuous=true,
onvifMediaProfile=“0”,
hlsOutOptions=“-strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4”,
gifOutOptions=“-r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse”
]

Any chance someone to help or share config for Reolink Cam?

Many thanks
int5749

Correct all the battery reolink cameras do not have the api nor do they have ONVIF support. Use a different model that is not battery powered.

Reolink Doorbell - How to set it up with the IPCamera Binding for button press notifications (visitor at the door).

It took me a bit of hunting to find the correct answer, so I’m adding this in the thread for anyone who looks in the future.

  1. Setup your Reolink Doorbell as per Reolink’s instructions.
  2. Ensure Push Notifications are enabled in the phone App/Web page for the doorbell “Surveillance > Push”.

This is Push notifications as in "make the doorbell PUSH notifications out to other devices e.g. Openhab, your Phone app etc. You will need to have set:

  • The time schedule set its allowed to send push notifications.
  • Visitor on/off (someone pressed the button on the doorbell - YOU WANT THIS ON if you want to know when someone presses the button).
  • Person (AI Detection of a person. You can set the distance/sensitivity it detects at elsewhere in the interface)
  • Any Motion (AI Detection of anything else moving)
  1. In Openhab (I used V4) install the IPCamera Binding.
  2. Add a Thing type of IPCamera Binding and then Reolink Camera with API, inputting your admin name, password and the IP address/network name.
  3. Go to the Thing you have created (e.g. Reolink Camera with API) and go to the Channels page.
  4. Click the Show Advanced checkbox and scroll down to Door Bell, expand it and click Add Link to Item then create a new item.

You can now use this item in rules. My testing shows that When Item changes from OFF to ON works well as a trigger. The switch will stay on for about 20 seconds and then go back to OFF.

Another note is you must have “Use API Token” enabled on the thing (this is on as standard).

3 Likes

Should this be added to the Readme for the binding? Thanks for the feedback.

I just double checked+re tested all the settings/setup I mentioned above. Without the Push Notifications set in the Doorbell (or the API setting enabled on the Thing), openhab doesnt receive an event from the doorbell. Id imagine most people will have push notifications enabled…but, maybe not, so worth mentioning.

That aside, I do get an error in the Openhab log every so often, though I think I read elsewhere you mentioned this is fixed in a upcoming update of the IpBinding.

2023-10-25 23:32:04.820 [INFO ] [era.internal.handler.IpCameraHandler] - Your Reolink camera gave a bad login response:

302 Found

302 Found


nginx

It still works fine though! :slight_smile: And there is no regularity/frequency/pattern to the error. Everything still seems to work fine.