# Onvif-nodes Event node auto start

**URL:** <https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906>\
**Category:** General\
**Created:** [13 May 2024 05:56 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906 "2024-05-13T05:56:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![randall-tech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/randall-tech/32/90876_2.png) [@randall-tech](https://discourse.nodered.org/u/randall-tech)\
**Post date:** [13 May 2024 05:56 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906/1 "2024-05-13T05:56:23Z")

</div>

I am having a play around with a Reolink Doorbell and Onvif-nodes. I can successfully connect to the doorbell and receive Onvif events like person detection and the button press etc but I need a way to start the node listening automatically.  
If, for example there is a network outage or the Doorbell reboots, the event node will report that it has reconnected to the device but it is no longer actively listening to events anymore until you prompt the node again.  
I thought maybe I could use a status node with some if(not listening) logic, but I can't see an easy way to do this as, it only reports "listening" when you first start the node listening but the status just goes back to "connected" after a few seconds.  
I don't have a huge amount of experience with node-red so I am happy to hear any ideas that could make this work.  
Thanks 😄

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [13 May 2024 06:19 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906/2 "2024-05-13T06:19:37Z")

</div>

@randall-tech

Yes indeed I have also used my onvif nodes a few weeks ago to listen for events. And I can confirm that I also had the same issues. But since all my free time is eaten by migration of my ui nodes for the new dashboard, chance is very small that I will be able to fix those. Of course contributions from anybody are always welcome...

A (stupid) workaround is to start the event stream every 60 minutes automatically, via an Inject node:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b082280b1d2438c3317a342196dadd174f2b56a.png)

That seems to fix it for me and another community member...

Bart

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [13 May 2024 06:38 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906/3 "2024-05-13T06:38:38Z")

</div>

Nice doorbel the Reolink, have myself one to. Value for money, no cloud subscription required.  
Integrated the doorbel also in NR with the same Onvif node issue as you have.  
Tried almost everything to make a "decent" way to see if the node still is listening, but ended up with the solution Bart also suggest.

---

<div class="post-metadata">

**Author:** ![randall-tech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/randall-tech/32/90876_2.png) [@randall-tech](https://discourse.nodered.org/u/randall-tech)\
**Post date:** [13 May 2024 06:42 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906/4 "2024-05-13T06:42:40Z")

</div>

Thanks Bart,  
It's funny how when you ask for help sometimes that is what helps you think of a solution.  
I just tried this and it works reasonably well. At least, if there is an issue, it will only be "offline" for the period between status messages (about 5 seconds).

I am using the switch node to test if status is == "connected" or != "connected" and then passing that to the trigger node which is configured to trigger once and then wait for reset.

Seems to work ok?

 ![test](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/172315fbfb399c72492215c7bf9efd217515c654.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 August 2024 06:42 UTC](https://discourse.nodered.org/t/onvif-nodes-event-node-auto-start/87906/5 "2024-08-11T06:42:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
