IpCamera: New IP Camera Binding

I have connected a Reolink E1 Outdoor Pro PTZ camera via the IPCamera Binding. This works without any problems.
I have switched my Openhab installation to HTTPS. To display connected HTTP content in the HTTPS web browser, I have set up the Nginx reverse proxy. This works perfectly for Grafana widgets. The reverse proxy also successfully points to the local IP of the Reolink camera with HTTPS and I get the self-signed certificate displayed.

Unfortunately, I am not able to point the HTTP stream and the onfiv port via the reverse proxy. Do I have to create two separate nginx sites-available server entries for HTTP stream and onvif port?
As soon as I change the IP address in the thing configuration to that of the Openhab host and the HHTP and Onvif port to the nginx ports, the camera thing goes offline.

Has anyone ever implemented something similar and has a rough plan for me on what to do?

What is your goal?
if you want to see the openHAB stream of the camera in a mainui widget or sitemap you can use

/ipcamera/xxxxx/autofps.mjpeg

This works with http and https

Greets

Hi,
I use the ā€œCamera: Live feed with PTZ controlsā€ UI widget. For PTZ control, the Onvif Port 8000 is important für me

It does not need port 8000 as the binding does that locally and directly. Use the relative url in the reply above as suggested and it will work for both http and https. Ptz will still work as it uses channels and items to send the controls back to openhab and the binding.

Hi!
The ipcamera binding is raising the following error since I installed it, even after installing the snapshot 4.3.0.202410271146 :

15:05:32.748 [WARN ] [.netty.channel.DefaultChannelPipeline] - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually mea                                                                              ns the last handler in the pipeline did not handle the exception.
java.lang.NullPointerException: Cannot read field "ver" because "getAbilityResponse[0].value.ability.scheduleVersion" is null
        at org.openhab.binding.ipcamera.internal.ReolinkHandler.channelRead(ReolinkHandler.java:109) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [bundleFile:4.1.104.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) [bundleFile:4.1.104.Final]
        at org.openhab.binding.ipcamera.internal.handler.IpCameraHandler$CommonCameraHandler.channelRead(IpCameraHandler.java:298) [bundleFile:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [bundleFile:4.1.104.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) [bundleFile:4.1.104.Final]
        at org.openhab.binding.ipcamera.internal.MyNettyAuthHandler.channelRead(MyNettyAuthHandler.java:182) [bundleFile:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [bundleFile:4.1.104.Final]
        at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) [bundleFile:4.1                                                                              .104.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) [bundleFile:4.1.104.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) [bundleFile:4.1.104.Final]
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [bundleFile:4.1.104.Final]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) [bundleFile:4.1.104.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) [bundleFile:4.1.104.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) [bundleFile:4.1.104.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [bundleFile:4.1.104.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [bundleFile:4.1.104.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) [bundleFile:4.1.104.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) [bundleFile:4.1.104.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) [bundleFile:4.1.104.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [bundleFile:4.1.104.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [bundleFile:4.1.104.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.104.Final]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.104.Final]
        at java.lang.Thread.run(Thread.java:840) [?:?]

I have currently 3 Reolink cameras all configured with the same default settings:

UID: ipcamera:reolink:camsalon
label: Reolink Camera with API
thingTypeUID: ipcamera:reolink
configuration:
  mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
  ipAddress: 192.168.XX.XX
  updateImageWhen: "0"
  gifPreroll: 0
  onvifPort: 8000
  ffmpegLocation: C:\ffmpeg\bin\ffmpeg.exe
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  useToken: true
  password: XXXXXXXXXXXXXXXXXXX
  port: 80
  nvrChannel: 0
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  ptzContinuous: true
  onvifMediaProfile: 0
  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
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
    -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  username: admin


The only change I made was to try enabling hardware acceleration with parameter -hwaccel in ā€˜FFmpeg Input Options’. But I reverted back to default and cleared that parameter that freezes the stream.

I attached a debug log. The error raises directly when starting the binding.
I wait for your ideas to fix / instructions to investigate as I am not specialist enough to troubleshoot this :-/

openhab_ipcamera.log (195.8 KB)

Dear all, after updating top Openhab 4.3.5 i do have a problem with my INSTAR IN9008. The stream in openhab keeps flickering (picture, white screen, picture, white screen, etc).
In the INSTAR webUI its perfectly fine.

In the log i am getting these messages:

20:34:23.707	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:23.746	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:24.208	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:24.246	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:24.742	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:24.747	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:25.242	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:25.248	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:25.345	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:25.750	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:25.754	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:27.672	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached.
20:34:27.675	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
20:34:34.431	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP:192.168.0.206 and PORT:80 are correct and the camera can be reached

after pausing and starting the topic i am getting this messages in the log:

20:34:34.678	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to UNINITIALIZED (DISABLED)
20:34:53.070	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from UNINITIALIZED (DISABLED) to INITIALIZING
20:34:53.111	INFO	openhab.event.ThingStatusInfoChangedEvent	Thing 'ipcamera:instar:980dac2114' changed from INITIALIZING to ONLINE
20:34:53.136	WARN	org.openhab.binding.ipcamera.internal.onvif.OnvifConnection	Camera at 192.168.0.206 could not auto detect the ONVIF event method the camera supports, try setting the configuration away from auto to remove this message by forcing an option.
20:34:53.145	WARN	org.openhab.binding.ipcamera.internal.onvif.OnvifConnection	Camera at 192.168.0.206 could not auto detect the ONVIF event method the camera supports, try setting the configuration away from auto to remove this message by forcing an option.
20:34:53.147	WARN	org.openhab.binding.ipcamera.internal.onvif.OnvifConnection	Camera at 192.168.0.206 could not auto detect the ONVIF event method the camera supports, try setting the configuration away from auto to remove this message by forcing an option.
20:34:53.367	WARN	org.openhab.binding.ipcamera.internal.onvif.OnvifConnection	Camera at 192.168.0.206 could not auto detect the ONVIF event method the camera supports, try setting the configuration away from auto to remove this message by forcing an option.

This is the config of my topic:

UID: ipcamera:instar:980dac2114
label: Kamera Eingang
thingTypeUID: ipcamera:instar
configuration:
  mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
  ipAddress: 192.168.0.206
  updateImageWhen: "0"
  gifPreroll: 0
  onvifPort: 8080
  ffmpegLocation: /usr/bin/ffmpeg
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  password: xxxxxxx
  port: 80
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  ptzContinuous: true
  onvifMediaProfile: 0
  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
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
    -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  username: simon
channels:
  - id: startStream
    channelTypeUID: ipcamera:startStream
    label: Start HLS Stream
    description: Lower the delay to start casting the camera by creating the files
      non stop in case they are needed.
    configuration: {}
  - id: pollImage
    channelTypeUID: ipcamera:pollImage
    label: Poll Image
    description: This can be used to trigger snapshot updates when an external PIR,
      button or other form of sensor turns this channel ON.
    configuration: {}
  - id: image
    channelTypeUID: ipcamera:image
    label: Image
    description: Low frame rate image from your camera. Recommend this is NOT used
      unless you have large pollTime.
    configuration: {}
  - id: recordingGif
    channelTypeUID: ipcamera:recordingGif
    label: GIF Recording
    description: Indicates how long the recording will occur for and when the file
      is created, the channel will change to 0 by itself.
    configuration: {}
  - id: gifHistory
    channelTypeUID: ipcamera:gifHistory
    label: GIF History
    description: A history of the last GIFs created in a CSV formatted string.
    configuration: {}
  - id: gifHistoryLength
    channelTypeUID: ipcamera:gifHistoryLength
    label: GIF History Length
    description: How many GIFs are stored in the history.
    configuration: {}
  - id: recordingMp4
    channelTypeUID: ipcamera:recordingMp4
    label: MP4 Recording
    description: Indicates how long the recording will occur for and when the file
      is created, the channel will change to 0 by itself.
    configuration: {}
  - id: mp4History
    channelTypeUID: ipcamera:mp4History
    label: MP4 History
    description: A history of the last mp4 recordings created in a CSV formatted string.
    configuration: {}
  - id: mp4HistoryLength
    channelTypeUID: ipcamera:mp4HistoryLength
    label: MP4 History Length
    description: How many mp4 recordings are stored in the history.
    configuration: {}
  - id: lastMotionType
    channelTypeUID: ipcamera:lastMotionType
    label: Last Motion Type
    description: A string that contains the type of motion alarm that was last triggered.
    configuration: {}
  - id: ffmpegMotionControl
    channelTypeUID: ipcamera:ffmpegMotionControl
    label: Control FFmpeg Motion Alarm
    description: Enable/Disable the motion alarm and control the sensitivity.
    configuration: {}
  - id: ffmpegMotionAlarm
    channelTypeUID: ipcamera:ffmpegMotionAlarm
    label: FFmpeg Motion Alarm
    description: FFmpeg has detected motion.
    configuration: {}
  - id: carAlarm
    channelTypeUID: ipcamera:carAlarm
    label: Car Alarm
    description: A car has triggered the Vehicle Detection.
    configuration: {}
  - id: humanAlarm
    channelTypeUID: ipcamera:humanAlarm
    label: Human Alarm
    description: A person has triggered the Human Detection.
    configuration: {}
  - id: animalAlarm
    channelTypeUID: ipcamera:animalAlarm
    label: Animal Alarm
    description: An animal has triggered the object detection.
    configuration: {}
  - id: lastEventData
    channelTypeUID: ipcamera:lastEventData
    label: Last Event Data
    description: A string that contains detailed data on the last alarm that was triggered.
    configuration: {}
  - id: enableMotionAlarm
    channelTypeUID: ipcamera:enableMotionAlarm
    label: Enable Motion Alarm
    description: By using this feature you can stop the camera from sending e-mails
      when you are actually home.
    configuration: {}
  - id: motionAlarm
    channelTypeUID: ipcamera:motionAlarm
    label: Motion Alarm
    description: Motion has been detected.
    configuration: {}
  - id: externalMotion
    channelTypeUID: ipcamera:externalMotion
    label: External Motion
    description: Use any external sensor like a ZWave PIR sensor to flag that the
      camera has motion in its field of view.
    configuration: {}
  - id: enablePirAlarm
    channelTypeUID: ipcamera:enablePirAlarm
    label: Enable PIR Alarm
    description: Enable/Disable the PIR Alarm.
    configuration: {}
  - id: pirAlarm
    channelTypeUID: ipcamera:pirAlarm
    label: PIR Alarm
    description: PIR motion has been detected.
    configuration: {}
  - id: enableAudioAlarm
    channelTypeUID: ipcamera:enableAudioAlarm
    label: Enable Audio Alarm
    description: By using this feature you can stop the camera from sending e-mails
      when you are having a party.
    configuration: {}
  - id: thresholdAudioAlarm
    channelTypeUID: ipcamera:thresholdAudioAlarm
    label: Audio Alarm Threshold
    description: By moving this control you should be able to change how sensitive
      the audio alarm is to soft or loud noises.
    configuration: {}
  - id: audioAlarm
    channelTypeUID: ipcamera:audioAlarm
    label: Audio Alarm
    description: Audio has triggered an Alarm.
    configuration: {}
  - id: enableExternalAlarmInput
    channelTypeUID: ipcamera:enableExternalAlarmInput
    label: Enable Alarm Input 1
    description: Turn the External Alarm Input feature on and off.
    configuration: {}
  - id: textOverlay
    channelTypeUID: ipcamera:textOverlay
    label: Text Overlay
    description: Enter some text you wish to overlay on top of the cameras snapshot
      and video streams.
    configuration: {}
  - id: autoLED
    channelTypeUID: ipcamera:autoLED
    label: Auto LED
    description: Turn the automatic mode for the LED ON and OFF.
    configuration: {}
  - id: pan
    channelTypeUID: ipcamera:pan
    label: Pan
    description: Pan the camera to a new position.
    configuration: {}
  - id: tilt
    channelTypeUID: ipcamera:tilt
    label: Tilt
    description: Tilt the camera to a new position.
    configuration: {}
  - id: zoom
    channelTypeUID: ipcamera:zoom
    label: Zoom
    description: Zoom the camera to a new value.
    configuration: {}
  - id: gotoPreset
    channelTypeUID: ipcamera:gotoPreset
    label: Go To Preset
    description: Move a P.T.Z camera to this ONVIF preset location.
    configuration: {}
  - id: mjpegUrl
    channelTypeUID: ipcamera:mjpegUrl
    label: MJPEG URL
    description: A link you can use in openHAB/HABpanel to fetch a MJPEG video feed
      from the camera.
    configuration: {}
  - id: rtspUrl
    channelTypeUID: ipcamera:rtspUrl
    label: RTSP URL
    description: A link that the camera uses for RTSP.
    configuration: {}
  - id: imageUrl
    channelTypeUID: ipcamera:imageUrl
    label: Image URL
    description: A link you can use to fetch a static image from the camera.
    configuration: {}
  - id: hlsUrl
    channelTypeUID: ipcamera:hlsUrl
    label: HLS URL
    description: A link you can use in openHAB to cast video feeds.
    configuration: {}

Before the Openhab update it worked more or less perfect.
Can someone help :frowning:

Hey… Maybe try a snapshot version of the binding?
greets

Hi,
I got this message when trying to control IR LED for a Reolink RLC-810A camera.

 URL /api.cgi?cmd=SetIrLights is not handled currently by the binding, please report this message

I am getting this message repeatedly at DEBUG level in the log:

 The alarm stream was not running for Reolink camera 192.168.X.XX, re-starting it now

I added the same camera as a generic ONVIF for testing purpose and I get the same message but at INFO level, which suggest there is some issue with my camera setting.

Any idea of what stream ipcamera is expecting and why at this point?

I have this because of weak wifi connection…

I think the onvif connection disconnects and the binding restart the onvif connection

Greets

Thanks for reporting this, will look into it as that is all the info that is needed… I suspect you have older firmware and updating it may solve it. The second issue I will need some time to look into this over the next few days.

It is the stream that gives the alarms/movement alerts. Tick the show advanced box when looking at the thing settings. ONVIF event method, try using one of the other types or auto to see if that fixes it. This option only shows up in the newer 4.3 and 5.x builds. If it is only happening when the camera drops off the wifi, then that is normal and to be expected, you should get some more access points for your wifi. Best to go with wifi6 or wifi7 ones to allow smoother roaming.

@sl4m What firmware version is in the INSTAR IN9008? I have one of those cameras and it is running 3.5.0 firmware and working fine.

This does not make sense. If setup as an INSTAR thing type it uses the instar method for event methods and not ONVIF. Does deleting and re-adding the thing solve it?

Thanks for the quick answer!
Firmwares are up to date. I am running RLC-810A, RLC-420 and an older RLC-410 camera and they are all wired/POE (I do not trust wireless for security stuff :slight_smile: ) I disabled all cameras except the RLC-810A as I am fighting to catch correct human detection reporting and would love to have full control over IR LEDs (to match false motion alarm which occur at LED ON/OFF on older cameras).

I restarted the cams, openHAB and cleared the tmp / cache folder and not getting the issues by now (also had a HTTP400 Bad request error).

By the way, 2 improvements I suggest for the future:

  1. List item in the debug/trace logs, it would be nice to print the camera ip which raises the log entry.
  2. In the documentation, an sample code example with the FULL list of channels available (and the corresponding sitemap) would be a +, considering the number of channels available for a camera thing :slight_smile:

Hello all,

I have tried my best to integrate an Annke N46PCK NVR with the Ipcam binding and did not accomplish much.
I have tried both Hikvision with API and ONVIF without any success.

For Hikvision with API (Annke uses nearly identical UI) I had initially set the NVR on digest/basic authentication and enabled Virtual Host to expose the individual camera ports. The NVR firmware has ISAPI prechecked but no ONVIF option. According to the Tech Support it is enabled by default with same credentials as NVR login. I believe it defaults at port 80. As a test I enabled ONVIF on one of the cameras and used that particular camera’s channel and port in the Thing configuration (tried both file and UI config). I had previously created a ONVIF user/ password to mirror camera login as Administrator. Also disabled the function to lock camera after multiple erroneous loggins.

[
    ipAddress="192.168.x.x",
    username="user",
    password="xxxxxxxxx",
    onvifPort=80, //normally 80 check what it needs
    port=65011,
    nvrChannel=11
]
your code goes here

Thing appears ONLINE
Default Logs

2025-05-30 23:51:16.461 [WARN ] [ipcamera.internal.MyNettyAuthHandler] - 403 Forbidden: Check camera setup or has the camera activated the illegal login lock?

Trace Logs

Sending camera: GET: http://192.168.x.x:65011/ISAPI/System/IO/inputs/11/status
2025-05-30 23:57:28.686 [WARN ] [ipcamera.internal.MyNettyAuthHandler] - 403 Forbidden: Check camera setup or has the camera activated the illegal login lock?
2025-05-30 23:57:28.687 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/System/IO/inputs/11/status contains 	:<?xml version="1.0" encoding="UTF-8"?><ResponseStatus version="2.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL></requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
</ResponseStatus>
:
2025-05-30 23:57:29.620 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Event/notification/alertStream contains 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 551

<EventNotificationAlert version="2.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.254.5</ipAddress>
<ipv6Address>::</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>5c:34:5b:ed:31:5a</macAddress>
<channelID>1</channelID>
<dateTime>2025-05-30T22:57:27-08:00</dateTime>
<activePostCount>1</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName>Large Garage</channelName>
</EventNotificationAlert>

Any thoughts would be greatly appreciated. Thx much!

restart the camera to see if it was the illegal login that has locked the camera, but check your user and password is correct first.

Hi Matt,
Thx much for the reply! Reset the camera, disabled password lock, reset password just to make sure. No success.
Found out that while connecting the camera to the POE port of the NVR, no ONVIF connection to camera, due to the internal address assigned by NVR, despite the exposed port through Virtual Host.
I was then hoping to access the NVR rather than individual camera, and get alerts. Noticed thatsome of the ISAPI commands would work, since the NVR UI mentions ISAPI enabled. Maybe Annke does not offer identical ISAPI capabilities as Hikvision. This is what i was able to extract from NVR:

<?xml version="1.0" encoding="UTF-8" ?>
<DeviceCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
    <SysCap>
        <isSupportDst>true</isSupportDst>
        <NetworkCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <isSupportWireless>false</isSupportWireless>
            <isSupportWAN>false</isSupportWAN>
            <isSupportPPPoE>true</isSupportPPPoE>
            <isSupportBond>false</isSupportBond>
            <isSupport802_1x>true</isSupport802_1x>
            <isSupportNtp>true</isSupportNtp>
            <isSupportFtp>false</isSupportFtp>
            <isSupportUpnp>true</isSupportUpnp>
            <isSupportPNP>false</isSupportPNP>
            <isSupportDdns>true</isSupportDdns>
            <isSupportHttps>true</isSupportHttps>
            <SnmpCap>
                <isSupport>false</isSupport>
            </SnmpCap>
            <isSupportExtNetCfg>true</isSupportExtNetCfg>
            <isSupportNetPreviewStrategy>true</isSupportNetPreviewStrategy>
            <isSupportEZVIZ>true</isSupportEZVIZ>
            <GB28181Cap>
                <isSupportGB28181Service>false</isSupportGB28181Service>
            </GB28181Cap>
            <VerificationCodeModification>
                <verificationCodeType opt="normal,empty">normal</verificationCodeType>
                <isSupportDeclarationURL>true</isSupportDeclarationURL>
                <isSupportPrivacyPolicyURL>true</isSupportPrivacyPolicyURL>
                <verificationCodeModify>true</verificationCodeModify>
                <Hyperlinks>
                    <declarationURL>https://www.annke.com/pages/terms-of-service/</declarationURL>
                    <privacyPolicyURL>https://www.annke.com/pages/privacy-agreement/</privacyPolicyURL>
                </Hyperlinks>
                <isSupportVerificationCodeCheck>true</isSupportVerificationCodeCheck>
            </VerificationCodeModification>
            <isSupportIntegrate>true</isSupportIntegrate>
            <isSupportEZVIZTiming>true</isSupportEZVIZTiming>
            <isSupportResourceStatistics>true</isSupportResourceStatistics>
            <isSupportPOEPortsDisableAdaptiveServer>true</isSupportPOEPortsDisableAdaptiveServer>
            <isSupportGetLinkSocketIP>true</isSupportGetLinkSocketIP>
        </NetworkCap>
        <IOCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <IOInputPortNums>0</IOInputPortNums>
            <IOOutputPortNums>0</IOOutputPortNums>
            <isSupportIOOutputAdvanceParameter>false</isSupportIOOutputAdvanceParameter>
        </IOCap>
        <SerialCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <rs485PortNums>0</rs485PortNums>
            <rs422PortNums>0</rs422PortNums>
            <rs232PortNums>0</rs232PortNums>
            <supportRS232Config>false</supportRS232Config>
        </SerialCap>
        <VideoCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <videoInputPortNums>0</videoInputPortNums>
            <videoOutputPortNums>2</videoOutputPortNums>
            <menuNums>1</menuNums>
        </VideoCap>
        <AudioCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <audioInputNums>1</audioInputNums>
            <audioOutputNums>1</audioOutputNums>
        </AudioCap>
        <isSupportHolidy>true</isSupportHolidy>
        <RebootConfigurationCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
            <RTSP>true</RTSP>
            <HTTP>true</HTTP>
        </RebootConfigurationCap>
        <isSupportSubscribeEvent>true</isSupportSubscribeEvent>
        <isSupportSimpleDevStatus>true</isSupportSimpleDevStatus>
        <isSupportFlexible>true</isSupportFlexible>
        <isSupportTimeCap>true</isSupportTimeCap>
    </SysCap>
    <voicetalkNums>2</voicetalkNums>
    <isSupportSnapshot>false</isSupportSnapshot>
    <SecurityCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <supportUserNums>32</supportUserNums>
        <userBondIpNums>1</userBondIpNums>
        <userBondMacNums>1</userBondMacNums>
        <securityVersion opt="1"/>
        <keyIterateNum>100</keyIterateNum>
        <isSupportUserCheck>true</isSupportUserCheck>
        <isSupportGUIDFileDataExport>true</isSupportGUIDFileDataExport>
        <isSupportSecurityQuestionConfig>true</isSupportSecurityQuestionConfig>
        <isSupportSecurityEmail>true</isSupportSecurityEmail>
        <isSupportGetOnlineUserListSC>false</isSupportGetOnlineUserListSC>
        <SecurityLimits>
            <LoginPasswordLenLimit min="1" max="16"/>
            <SecurityAnswerLenLimit min="1" max="128"/>
        </SecurityLimits>
        <RSAKeyLength opt="512,1024,2048" def="2048"/>
        <WebCertificateCap>
            <CertificateType opt="digest,digest/basic">digest/basic</CertificateType>
        </WebCertificateCap>
        <isSupportConfigFileImport>true</isSupportConfigFileImport>
        <isSupportConfigFileExport>true</isSupportConfigFileExport>
        <cfgFileSecretKeyLenLimit min="1" max="16"/>
        <supportIPCActivatePassword>true</supportIPCActivatePassword>
        <isSupportPictureURlCertificate opt="true,false">false</isSupportPictureURlCertificate>
        <isSupportResetChannelPassword>false</isSupportResetChannelPassword>
    </SecurityCap>
    <EventCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <isSupportHDFull>true</isSupportHDFull>
        <isSupportHDError>true</isSupportHDError>
        <isSupportNicBroken>true</isSupportNicBroken>
        <isSupportIpConflict>true</isSupportIpConflict>
        <isSupportIllAccess>true</isSupportIllAccess>
        <isSupportViException>false</isSupportViException>
        <isSupportViMismatch>false</isSupportViMismatch>
        <isSupportRecordException>true</isSupportRecordException>
        <isSupportRaidException>false</isSupportRaidException>
        <isSupportViResMismatch>false</isSupportViResMismatch>
        <isSupportPOCException>false</isSupportPOCException>
        <isSupportSpareException>false</isSupportSpareException>
        <isSupportHumanRecognition>false</isSupportHumanRecognition>
        <isSupportFaceSnap>true</isSupportFaceSnap>
        <isSupportTriggerCapCheck>true</isSupportTriggerCapCheck>
    </EventCap>
    <RacmCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <isSupportZeroChan>true</isSupportZeroChan>
        <inputProxyNums>16</inputProxyNums>
        <eSATANums>0</eSATANums>
        <miniSASNums>0</miniSASNums>
        <nasNums>8</nasNums>
        <ipSanNums>8</ipSanNums>
        <isSupportRaid>false</isSupportRaid>
        <isSupportExtHdCfg>true</isSupportExtHdCfg>
        <isSupportLogDataPackage>false</isSupportLogDataPackage>
        <isSupportTransCode>false</isSupportTransCode>
        <isSupportIpcImport>true</isSupportIpcImport>
        <isSupportIpcStreamType>true</isSupportIpcStreamType>
        <isSupportIOInputProxy>true</isSupportIOInputProxy>
        <isSupportIOOutputProxy>true</isSupportIOOutputProxy>
        <isSupportPTZRs485Proxy>true</isSupportPTZRs485Proxy>
        <isSupportSMARTTest>true</isSupportSMARTTest>
        <pictureSearchType opt="allPic"></pictureSearchType>
        <recordSearchType opt="CMR,MOTION,ALARM,EDR,ALARMANDMOTION,Command,manual,AllEvent"></recordSearchType>
        <isSupportActivateIpc>true</isSupportActivateIpc>
        <isSupportCheckIpcSecurity>
            <isSupportCheckPassword>true</isSupportCheckPassword>
        </isSupportCheckIpcSecurity>
        <isSupportSyncIPCPassword>true</isSupportSyncIPCPassword>
        <isSupportTransferIPC>true</isSupportTransferIPC>
        <isSupportMainAndSubRecord>false</isSupportMainAndSubRecord>
        <isSupportSmartSearch>true</isSupportSmartSearch>
        <isSupportPOS>false</isSupportPOS>
        <isSupportLinkNum>true</isSupportLinkNum>
        <ExternalDevice>
            <USB>
                <debugLogOutput>true</debugLogOutput>
                <isSupportCapturePackage>false</isSupportCapturePackage>
            </USB>
        </ExternalDevice>
        <customProtocolNums>16</customProtocolNums>
        <isSupportIPCTiming>false</isSupportIPCTiming>
        <isSupportWebPrivatePlaybackByUTC>true</isSupportWebPrivatePlaybackByUTC>
        <isSupportFindCommonFileByUTC>true</isSupportFindCommonFileByUTC>
        <isSupportFindEventFileByUTC>true</isSupportFindEventFileByUTC>
        <isSupportSmartSearchRecordByUTC>true</isSupportSmartSearchRecordByUTC>
        <isSupportMRDSearchByTimeZone>true</isSupportMRDSearchByTimeZone>
        <isSupportSearchRecordLabelByUTC>true</isSupportSearchRecordLabelByUTC>
        <isSupportSearchPictureByUTC>true</isSupportSearchPictureByUTC>
        <isSupportSmartSearchPictureByUTC>true</isSupportSmartSearchPictureByUTC>
        <isSupportFindLogByUTC>true</isSupportFindLogByUTC>
        <isSupportUploadRecordByUTC>true</isSupportUploadRecordByUTC>
        <isSupportPlaybackByUTC>true</isSupportPlaybackByUTC>
        <isSupportFaceDetecttionAlarmByTimeZone>true</isSupportFaceDetecttionAlarmByTimeZone>
        <isSupportRecordSearchByTargetType>true</isSupportRecordSearchByTargetType>
    </RacmCap>
    <PTZCtrlCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <isSupportPatrols>true</isSupportPatrols>
    </PTZCtrlCap>
    <SmartCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <isSupportROI>false</isSupportROI>
        <isSupportFaceDetect>true</isSupportFaceDetect>
        <isSupportIntelliTrace>false</isSupportIntelliTrace>
        <isSupportFieldDetection>true</isSupportFieldDetection>
        <isSupportDefocusDetection>true</isSupportDefocusDetection>
        <isSupportAudioDetection>true</isSupportAudioDetection>
        <isSupportSceneChangeDetection>true</isSupportSceneChangeDetection>
        <isSupportLineDetection>true</isSupportLineDetection>
        <isSupportRegionEntrance>true</isSupportRegionEntrance>
        <isSupportRegionExiting>true</isSupportRegionExiting>
        <isSupportLoitering>false</isSupportLoitering>
        <isSupportGroup>false</isSupportGroup>
        <isSupportRapidMove>false</isSupportRapidMove>
        <isSupportParking>false</isSupportParking>
        <isSupportUnattendedBaggage>true</isSupportUnattendedBaggage>
        <isSupportAttendedBaggage>true</isSupportAttendedBaggage>
    </SmartCap>
    <isSupportEhome>true</isSupportEhome>
    <isSupportStreamingEncrypt>true</isSupportStreamingEncrypt>
    <TestCap>
        <isSupportEmailTest>true</isSupportEmailTest>
    </TestCap>
    <ThermalCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
        <isSupportFireDetection>false</isSupportFireDetection>
        <isSupportThermometry>false</isSupportThermometry>
        <isSupportNVR>true</isSupportNVR>
        <isSupportThermometrySchedule>false</isSupportThermometrySchedule>
        <isSupportTemperatureSchedule>false</isSupportTemperatureSchedule>
        <isSupportFireDetectionSchedule>false</isSupportFireDetectionSchedule>
    </ThermalCap>
    <isSupportGetmutexFuncErrMsg>false</isSupportGetmutexFuncErrMsg>
    <isSupportTokenAuthenticate>true</isSupportTokenAuthenticate>
    <isSupportStreamDualVCA>true</isSupportStreamDualVCA>
    <isSupportChannelEventCap>true</isSupportChannelEventCap>
    <isSupportTokenAuthenticate>true</isSupportTokenAuthenticate>
    <isSupportDiagnosedData>false</isSupportDiagnosedData>
    <isSupportDiagnosedDataParameter>false</isSupportDiagnosedDataParameter>
    <isSupportPictureServer>true</isSupportPictureServer>
    <isSupportEzvizIOAlarmByChannel>true</isSupportEzvizIOAlarmByChannel>
</DeviceCap>

I was able to set httpHosts in the NVR via ISAPI and added OH ipaddress and port. Set up NVR Thing with ONVIF turned OFF since it appeared inaccessible in prior attempts:

2025-06-08 13:01:19.146 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.146 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting  to ONVIF
2025-06-08 13:01:19.146 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetSystemDateAndTime to http:///onvif/device_service
2025-06-08 13:01:19.147 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetCapabilities to http:///onvif/device_service
2025-06-08 13:01:19.147 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.147 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetPresets to http:///onvif/ptz_service
2025-06-08 13:01:19.147 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.148 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.149 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.149 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/101/motionDetection
2025-06-08 13:01:19.149 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/LineDetection/101
2025-06-08 13:01:19.150 [DEBUG] [era.internal.handler.IpCameraHandler] - FieldDetection command
2025-06-08 13:01:19.150 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/FieldDetection/101
2025-06-08 13:01:19.150 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/AudioDetection/channels/101
2025-06-08 13:01:19.151 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/1/overlays/text/1
2025-06-08 13:01:19.151 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF was not connected when a PTZ request was made, connecting now
2025-06-08 13:01:19.151 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting  to ONVIF
2025-06-08 13:01:19.151 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.152 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/101/motionDetection
2025-06-08 13:01:19.152 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetSystemDateAndTime to http:///onvif/device_service
2025-06-08 13:01:19.152 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/LineDetection/101
2025-06-08 13:01:19.152 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetCapabilities to http:///onvif/device_service
2025-06-08 13:01:19.153 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.153 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetPresets to http:///onvif/ptz_service
2025-06-08 13:01:19.153 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.153 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.154 [DEBUG] [era.internal.handler.IpCameraHandler] - FieldDetection command
2025-06-08 13:01:19.154 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/FieldDetection/101
2025-06-08 13:01:19.154 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/AudioDetection/channels/101
2025-06-08 13:01:19.155 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/1/overlays/text/1
2025-06-08 13:01:19.155 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF was not connected when a PTZ request was made, connecting now
2025-06-08 13:01:19.156 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.157 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting  to ONVIF
2025-06-08 13:01:19.157 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetSystemDateAndTime to http:///onvif/device_service
2025-06-08 13:01:19.157 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.158 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetCapabilities to http:///onvif/device_service
2025-06-08 13:01:19.158 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.158 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetPresets to http:///onvif/ptz_service
2025-06-08 13:01:19.158 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.159 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.160 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/101/motionDetection
2025-06-08 13:01:19.160 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/LineDetection/101
2025-06-08 13:01:19.160 [DEBUG] [era.internal.handler.IpCameraHandler] - FieldDetection command
2025-06-08 13:01:19.161 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/FieldDetection/101
2025-06-08 13:01:19.161 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/AudioDetection/channels/101
2025-06-08 13:01:19.161 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/1/overlays/text/1
2025-06-08 13:01:19.161 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF was not connected when a PTZ request was made, connecting now
2025-06-08 13:01:19.161 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting  to ONVIF
2025-06-08 13:01:19.162 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetSystemDateAndTime to http:///onvif/device_service
2025-06-08 13:01:19.162 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.162 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetCapabilities to http:///onvif/device_service
2025-06-08 13:01:19.163 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.164 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetPresets to http:///onvif/ptz_service
2025-06-08 13:01:19.164 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.165 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: localhost/127.0.0.1:80
2025-06-08 13:01:19.165 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/101/motionDetection
2025-06-08 13:01:19.166 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/LineDetection/101
2025-06-08 13:01:19.166 [DEBUG] [era.internal.handler.IpCameraHandler] - FieldDetection command
2025-06-08 13:01:19.167 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/FieldDetection/101
2025-06-08 13:01:19.167 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Smart/AudioDetection/channels/101
2025-06-08 13:01:19.167 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/Video/inputs/channels/1/overlays/text/1
2025-06-08 13:01:19.167 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF was not connected when a PTZ request was made, connecting now
2025-06-08 13:01:19.167 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting  to ONVIF
2025-06-08 13:01:19.167 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetSystemDateAndTime to http:///onvif/device_service
2025-06-08 13:01:19.168 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF message not sent as connection is shutting down
2025-06-08 13:01:19.168 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetCapabilities to http:///onvif/device_service
2025-06-08 13:01:19.168 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF message not sent as connection is shutting down
2025-06-08 13:01:19.168 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: GetPresets to http:///onvif/ptz_service
2025-06-08 13:01:19.168 [DEBUG] [amera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 0, Size: 0
2025-06-08 13:01:19.168 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF message not sent as connection is shutting down
2025-06-08 13:01:19.269 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.269 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Smart/AudioDetection/channels/101 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/Smart/AudioDetection/channels/101</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.282 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.283 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.283 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Smart/LineDetection/101 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/Smart/LineDetection/101</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.283 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Smart/FieldDetection/101 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/Smart/FieldDetection/101</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.288 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.289 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Smart/FieldDetection/101 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/Smart/FieldDetection/101</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.291 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.292 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/System/Video/inputs/channels/101/motionDetection contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/Video/inputs/channels/101/motionDetection</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.294 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.x.x.x gave a reply with a response code of :503
2025-06-08 13:01:19.295 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Smart/AudioDetection/channels/101 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<requestURL>/ISAPI/Smart/AudioDetection/channels/101</requestURL>
<statusCode>2</statusCode>
<statusString>Device Busy</statusString>
<subStatusCode>serviceUnavailable</subStatusCode>
</ResponseStatus>
:
2025-06-08 13:01:19.298 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/System/Video/inputs/channels/1/overlays/text/1 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<TextOverlay version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<id>1</id>
<enabled>true</enabled>
<positionX>100</positionX>
<positionY>64</positionY>
<displayText>ANNKE</displayText>
</TextOverlay>
:
2025-06-08 13:01:19.299 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/System/Video/inputs/channels/1/overlays/text/1 contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<TextOverlay version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<id>1</id>
<enabled>true</enabled>
<positionX>100</positionX>
<positionY>64</positionY>
<displayText>ANNKE</displayText>
</TextOverlay>
:
2025-06-08 13:01:20.166 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/System/IO/capabilities
2025-06-08 13:01:20.167 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera 192.x.x.x, re-starting it now
2025-06-08 13:01:20.167 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.x.x.x:80/ISAPI/Event/notification/alertStream
2025-06-08 13:01:20.172 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/System/IO/capabilities contains 	:<?xml version="1.0" encoding="UTF-8" ?>
<IOCap version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<IOInputPortNums>0</IOInputPortNums>
<IOOutputPortNums>0</IOOutputPortNums>
<isSupportIOOutputAdvanceParameter>false</isSupportIOOutputAdvanceParameter>
</IOCap>
:
2025-06-08 13:01:20.173 [DEBUG] [g.ipcamera.internal.HikvisionHandler] - Camera does not support IO outputs.
2025-06-08 13:01:20.173 [DEBUG] [g.ipcamera.internal.HikvisionHandler] - Camera does not support IO inputs.
2025-06-08 13:01:21.171 [DEBUG] [amera.internal.onvif.OnvifConnection] - Eventloop is shutdown: true
2025-06-08 13:01:29.189 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Event/notification/alertStream contains 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 461

<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.x.x.x</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c0:51:7e:34:6e:62</macAddress>
<channelID>0</channelID>
<dateTime>2025-06-08T13:01:21</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>

```In the end I was mostly interested in the alarm notifications from the NVR since they appear to be faster and did not want to rely on connecting to the Annke platform. Please let me know if there is anything abnormal with this configuration. Much appreciated!

In the end I was mostly interested in the alarm notifications from the NVR since they appear to be faster and did not want to rely on connecting to the Annke platform. Please let me know if there is anything abnormal with this configuration. Much appreciated!

Does it work if the camera is not behind the Nvr? You can connect cameras to any poe switch and then the camera can be seen by the nvr via the Lan port of the nvr. Note that the nvr IP needs to be the same subnet as the camera. The other cameras on the nvr switch ports will be different IP adresss ranges.

Hi Matt,

The camera works as expected through ONVIF when not behind the NVR. I just opted against another POE switch since the NVR offered POE to begin with. In the end, I may have to choose that option, if I cannot query the NVR directly for the alerts I’m interested in.
The binding with HIKVISION API config returns some alerts but I’m also getting the following:

[g.ipcamera.internal.HikvisionHandler] - HTTP Result from /ISAPI/Event/notification/alertStream contains 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 461

<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.63.21</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c0:51:7e:34:6e:62</macAddress>
<channelID>0</channelID>
<dateTime>2025-06-10T13:11:59</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
:

This appears to repeat every 5 sec. Interestingly, all the cameras function well without any video loss. I’ve disabled the binding for now. Did not want to overload logs…Any thoughts why this would happen?

That is normal. A inactive video loss alarm is how the camera says the stream is still alive and working. Refer to the documentation for hik api.

Great, thank you much!