Onvif 2 MQTT?

Grisu2

n3wb
Apr 2, 2019
17
3
Austria
Hello,
in BlueIris, is it possible to forward the incoming ONVIF events from a camera to a MQTT server?

Background:
I want to achieve that if someone has pressed the bell button of the Reolink Doorbell PoE,
pass the event via MQTT to the Smarthome system to perform further actions.
ONVIF: tns1:RuleEngine/MyRuleDetector/Visitor

Thanks for info
 
Apologies in advance if this is not helpful. :rolleyes:

This is a long shot - because I can never remember off the top of my head who the OEM is for Reolink, Amcrest, etc.
But if your Reolink Doorbell's OEM is Dahua and if it is similar enough to the Dahua Doorbells (VTO's) then the DahuaVTO2MQTT app
will allow you to detect button presses. Please see #12 post on this thread:
 
Apologies - I did not read your message carefully enough. I see now that you already know the ONVIF event you want
ONVIF: tns1:RuleEngine/MyRuleDetector/Visitor

In Blue Iris select "Camera Settings..." for the doorbell.
Under the "Video" tab click "Configure..."
You might have to click "Find/inspect...", but ensure that "Get ONVIF trigger events" is checked:

1683771921512.png

Under the "Trigger" tab, ensure that "ONVIF/camera events" is checked:
1683771989554.png

Click the "Configure..." button next to the checkbox and add your ONVIF event to "Listen for:"
ONVIF: tns1:RuleEngine/MyRuleDetector/Visitor

1683772117776.png

(You will probably have to query the ONVIF events with an app called ONVIF Device Manager v2.2.250. to find the Attribute). Here's what my doorbell looks like:
1683772961918.png

Click "Immediate Actions..."

1683772260926.png

Click the big "+" icon and add a "Web request or MQTT"

1683772438439.png


1683772522674.png

Hope that helps get you started.
 
Hello, thank you for the detailed answer,
I was also already active in this direction, and events were forwarded to the MQTT server.

The problem:
Motion detections are also forwarded, hence the question about the filter.

In my case the events look like this, I marked the desired ones in red.
1683787553729.png


Deselecting all others in listen for did nothing in my test.
1683787891693.png

Thanks!

EDIT:
Deselected all others.
1683789682383.png
I have now moved in front of the camera and it is triggered.
1683789330486.png
 
Last edited:
  • Like
Reactions: dmcIPCAM
The problem is that it also triggers when moving. My wish would be that only triggered when the bell button was triggered.

It would be even nicer to have 2 MQTT values for it.
  • On movement
  • When the bell is pressed
 
The problem is that it also triggers when moving. My wish would be that only triggered when the bell button was triggered.

It would be even nicer to have 2 MQTT values for it.
  • On movement
  • When the bell is pressed

Maybe an obvious question, but separately, do you have "Motion sensor" checked:

1683845767560.png

I tested a little more, and now I am not quite sure it is working the way I think it should. I may not be understanding the ONVIF
functionality fully or correctly. Seems straightforward...:idk:
 
  • Like
Reactions: Grisu2
However, the problem would be that I could no longer use the motion detection of Blue Iris.

However, I have found a good working solution, and note you here also on, maybe it helps someone with the Reolink Doorbell PoE in his Smarthome system.

I did not achieve the goal with Blue Iris, but I did with cam2mqtt (in Docker container).
For each event a separate topic! (I don't know if this would be so achievable with Blue Iris)

I now recognize:
  • Movement
  • Person detected
  • Bell pressed
MQTT Events come in my Smarthome
1683883163640.png

cam2mqtt, the config.yml conifguration file
Code:
mqtt:
  host: io.domain.net
  port: 1024
  username: ipcamtalk
  password: bigsecure
  ssl: false

webhook:
  external_url: http://192.168.0.1:8080 # only needed for webhook subscriptions

cameras:
  doorbell:
    host: doorbell1.domain.net
    username: admin
    password: bigsecure
    modules:
      onvif:
        port: 8000
        monitor_events: true
        prefer_webhook_subscription: false

Thanks
 
However, the problem would be that I could no longer use the motion detection of Blue Iris.

However, I have found a good working solution, and note you here also on, maybe it helps someone with the Reolink Doorbell PoE in his Smarthome system.
...
Thanks

Awesome! Sounds like cam2mqtt does something similar to DahuaVTO2MQTT.
 
I took a different approach to this. I have a dumb doorbell on my front gate. I also a have a camera there. So I added a Shelly module. When the doorbell is pressed, the Shelly changes state. I use Homeseer and MQTT. MQTT picks up the change, and I have an event configured in Homeseer that accesses the camera in Blueiris, obtains a still image, and sends an alert + image via pushover to my mobile devices. It works reliably. I usually receive the alert with a 1-2s delay from the doorbell being pressed... at the same time, I also trigger the camera and record the clip, just in case motion detection failed.
 
  • Like
Reactions: dmcIPCAM
However, the problem would be that I could no longer use the motion detection of Blue Iris.

However, I have found a good working solution, and note you here also on, maybe it helps someone with the Reolink Doorbell PoE in his Smarthome system.

I did not achieve the goal with Blue Iris, but I did with cam2mqtt (in Docker container).
For each event a separate topic! (I don't know if this would be so achievable with Blue Iris)

I now recognize:
  • Movement
  • Person detected
  • Bell pressed
MQTT Events come in my Smarthome
View attachment 162711

cam2mqtt, the config.yml conifguration file
Code:
mqtt:
  host: io.domain.net
  port: 1024
  username: ipcamtalk
  password: bigsecure
  ssl: false

webhook:
  external_url: http://192.168.0.1:8080 # only needed for webhook subscriptions

cameras:
  doorbell:
    host: doorbell1.domain.net
    username: admin
    password: bigsecure
    modules:
      onvif:
        port: 8000
        monitor_events: true
        prefer_webhook_subscription: false

Thanks

@Grisu2, thank you so much. I used your recipe here, and my doorbell events are now working like a charm. No BlueIris involved at all ... just Reolink Doorbell --> cam2mqtt --> Home Assistant. It's a beaut