ONVIF event - not triggering recording

Hi

I’m testing beta version, continous recording, playback, livew view forkw perfect.
But i have problem with ONVIF eventts from camera.
Setting are from documentation
(Use device-specific schedule for this camera.’ and ‘Trigger recording on ONVIF events’)

Camera is Hikvision DS-2CD2045FWD-I, i have configured motion and area events. After motion alarm, no reocrding are available.

Just this lines are in log files. Is something else need to be set? Thanks

Feb 22 21:12:31 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:RuleEngine/FieldDetector/ObjectsInside#012’
Feb 22 21:12:57 kamery bc-server[557]: I(): Last message repeated 3 times!
Feb 22 21:12:57 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:Monitoring/ProcessorUsage#012’
Feb 22 21:13:06 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:VideoSource/MotionAlarm#012’
Feb 22 21:13:06 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:RuleEngine/CellMotionDetector/Motion#012’
Feb 22 21:13:11 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:VideoSource/MotionAlarm#012’
Feb 22 21:13:57 kamery bc-server[557]: I(): Triggered for device 4 with description ‘ONVIF event topic: tns1:Monitoring/ProcessorUsage#012’

I’d like to report that ONVIF event triggered recording is not working in server version 3.1.0-rc8 either. The ONVIF Device Manager clearly indicates that the camera is sending numerous motion detection alerts (screenshot below), but the Bluecherry logs show no indication of receiving these alerts (relevant excerpts below), and consequently, no video recordings are triggered. FYI, I have “Trigger recording on ONVIF events” checked and the schedule filled entirely orange (to trigger record all times of the day, every day).

This is quite a bummer since I really liked a lot of other aspects of Bluecherry while I was giving it a spin over the last few days, and I was very seriously considering purchasing a license. Unfortunately, keeping my CPU usage low is a really high priority for me since I’m controlling the cameras on my HTPC, and high CPU usage spins up the fans, which really disrupts the movie watching experience. So the absence of ONVIF event triggering is unfortunately a deal breaker.

On a side note, under Playback, I only see options to filter Motion and Continuous videos; not Trigger videos. Given that these three terms are used distinctly under Schedule, I would expect there to be a Trigger checkbox in Playback as well, alongside Motion and Continuous.

Jun 27 09:41:38 kaiju bc-server[153819]: I(2/sauron1): Setting up device
Jun 27 09:41:40 kaiju bc-server[153819]: I(2/sauron1): Stream started: Video: hevc (Main), yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 168:95], 1/90000(s) 1/15(c); Audio: aac (LC), 32000 Hz, mono, fltp
Jun 27 09:41:40 kaiju bc-server[153819]: I(2/sauron1): Switching to new recording schedule 'triggered'
Jun 27 09:41:40 kaiju bc-server[153819]: I(2/sauron1): Starting onvif events thread 939521600 for device 2 ...
Jun 27 09:41:40 kaiju bc-server[153819]: I(2/sauron1): Subscribed to ONVIF events at http://10.11.8.75/onvif/Events/PullSubManager_20230626T214141Z_0
Jun 27 09:41:41 kaiju bc-server[153819]: I(2/sauron1): Substream started: Video: h264 (Main), yuvj420p(pc, progressive), 640x360 [SAR 1:1 DAR 16:9], 1/90000(s) 1/30(c)
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): Initializing muxer for rtp streaming failed
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): bc_streaming_setup() failed: Invalid argument
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): Unable to setup live broadcast from substream
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): Initializing muxer for mpegts streaming failed
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): bc_streaming_setup() failed: Invalid argument
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): Unable to setup HLS stream from substream
Jun 27 09:41:41 kaiju bc-server[153819]: W(2/sauron1): Likely timestamping error. Ignoring.
Jun 27 09:49:51 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 09:49:51 kaiju bc-server[153819]: I(): License isn't genuinely activated
Jun 27 09:49:51 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 09:49:51 kaiju bc-server[153819]: I(): License is trially activated
Jun 27 09:49:51 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 09:49:51 kaiju bc-server[153819]: I(): Trial days left: 29
Jun 27 10:07:44 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:44 kaiju bc-server[153819]: I(): License isn't genuinely activated
Jun 27 10:07:44 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:44 kaiju bc-server[153819]: I(): License is trially activated
Jun 27 10:07:44 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:44 kaiju bc-server[153819]: I(): Trial days left: 29
Jun 27 10:07:53 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:53 kaiju bc-server[153819]: I(): License isn't genuinely activated
Jun 27 10:07:53 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:53 kaiju bc-server[153819]: I(): License is trially activated
Jun 27 10:07:53 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:07:53 kaiju bc-server[153819]: I(): Trial days left: 29
Jun 27 10:11:38 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:11:38 kaiju bc-server[153819]: I(): License isn't genuinely activated
Jun 27 10:11:38 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:11:38 kaiju bc-server[153819]: I(): License is trially activated
Jun 27 10:11:38 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:11:38 kaiju bc-server[153819]: I(): Trial days left: 29
Jun 27 10:17:13 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:17:13 kaiju bc-server[153819]: I(): License isn't genuinely activated
Jun 27 10:17:13 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:17:13 kaiju bc-server[153819]: I(): License is trially activated
Jun 27 10:17:13 kaiju bc-server[153819]: I(): A new license request is accepted.
Jun 27 10:17:13 kaiju bc-server[153819]: I(): Trial days left: 29

EDIT: Please note that the time stamps indicated in the ONVIF Device Manager screenshot are 12 hours off from those indicated in the Bluecherry log, since it had my time zone recorded incorrectly.

Can you try to execute /usr/lib/bluecherry/onvif_tool and see if it exists and runs?

@curtishall - Thanks a lot for your prompt response. I’m not quite sure if I’ve nailed the syntax I need to use for it, but I tried the following:

/usr/lib/bluecherry/onvif_tool 10.11.8.75 admin <password> discover

which gave me the following result:

10.11.8.75
type/video_encoder
Profile/Streaming
Profile/G
Profile/T
type/audio_encoder
MAC/24
hardware/DS-2CD2347G2-LSU/SL
name/HIKVISION%20DS-2CD2347G2-LSU/SL
location/city/hangzhou

Try this:

/usr/lib/bluecherry/onvif_tool 10.11.8.75 admin password events_subscribe

I get an error for that:

% /usr/lib/bluecherry/onvif_tool 10.11.8.75 admin <password> events_subscribe
Oops, something went wrong:
SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
"The action requested requires authorization and the sender is not authorized"
Detail: [no detail]

Oddly enough, I used the same username and password with the ONVIF Device Manager on Windows, and that worked just fine.

@curtishall - In response to Webhook not working - #3 by curtishall.

Despite those error messages regarding the substreams in the log, I could view the substreams in LiveView without any issue, at most after a bit of delay in starting. Nevertheless, disabled the substreams as suggested. Only then did I realise that the main streams were H.265+, which I couldn’t view in LiveView. So I had to change them to H.264 to view them. I then enabled ONVIF triggering and found the log flooded with entries like the following:

Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): Starting onvif events thread 1174386240 for device 2 ...
Jun 27 23:30:57 kaiju bc-server[1393352]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393352]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393352]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393352]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): Starting onvif events thread 1157600832 for device 3 ...
Jun 27 23:30:57 kaiju bc-server[1393353]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393353]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393353]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393353]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[1393354]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393354]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393354]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393354]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): Starting onvif events thread 1174386240 for device 2 ...
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): Starting onvif events thread 1157600832 for device 3 ...
Jun 27 23:30:57 kaiju bc-server[1393356]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393356]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393356]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393356]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[1393355]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393355]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393355]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393355]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): Starting onvif events thread 1157600832 for device 3 ...
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): Starting onvif events thread 1174386240 for device 2 ...
Jun 27 23:30:57 kaiju bc-server[1393357]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393357]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393357]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393357]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[1393358]: Oops, something went wrong:
Jun 27 23:30:57 kaiju bc-server[1393358]: SOAP 1.2 fault SOAP-ENV:Sender["http://www.onvif.org/ver10/error":NotAuthorized]
Jun 27 23:30:57 kaiju bc-server[1393358]: "The action requested requires authorization and the sender is not authorized"
Jun 27 23:30:57 kaiju bc-server[1393358]: Detail: [no detail]
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(3/sauron2): Starting onvif events thread 1157600832 for device 3 ...
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): ONVIF events thread exiting...
Jun 27 23:30:57 kaiju bc-server[153819]: I(2/sauron1): Starting onvif events thread 1174386240 for device 2 ...

@curtishall - Happy to file a bug report on Github (Issues · bluecherrydvr/bluecherry-apps · GitHub) about this issue if needed. Please advise.

You can, but please verify a couple things first:

  • Date and time on the server match the date / time on the camera.
  • If you are using special characters for the password (/?!-* etc) try removing them
  • Try creating another user giving them admin access

Yes, the date and time on the server match the camera.

The password has no special characters; only alphabetical characters and numerals.

Just created another ONVIF user with admin access and added it to Device → Settings → Properties → Username and Password. I’m presuming this was the place I had to enter this information at.

Still the same set of errors in the log though. FYI, the camera has ONVIF authentication set to “Digest and ws-username token”. The other option was just “Digest”, which doesn’t seem to work either.

Reported at ONVIF authentication failure · Issue #600 · bluecherrydvr/bluecherry-apps · GitHub