# \[ANNOUNCE\] node-red-contrib-onvif-nodes (beta 7 : event streaming)

**URL:** https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437
**Category:** Share Your Nodes
**Created:** [21 March 2020 22:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437 "2020-03-21T22:07:17Z")
**Posts on this page:** 20
**Page:** 1

<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: [21 March 2020 22:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/1 "2020-03-21T22:07:18Z")

</div>

Hi folks,

Due to a lack of time the release of the previous beta version of [node-red-contrib-onvif-nodes](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes) is already 13 months ago 🙄 . But now I finally managed to publish a new **beta 7** version on NPM, which can be installed like this:

```auto
npm install node-red-contrib-onvif-nodes@0.0.1-beta.7

```

This version contains a number of bug fixes, and the _ **Event-node** _ has been implemented 🍾 🥳 This node allows you to _ **listen for an infinite stream of events pushed by your Onvif camera** _:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0c92b7f9ecfa38c3994f7b9d8d656e1682d3a1cf.png)

You can now listen to motion detection events, embedded PIR detector alarms, monitor the CPU, ... (depending on the different kind of events that your device offers).

But I'm afraid I got good news and bad news:

- The good news is that the [onvif](https://github.com/agsh/onvif#readme) library (which I use behind the scenes) is being _ **maintained again** _. Remark: I use their master branch from Github as a [dependency](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/blob/master/package.json#L5) because their NPM version doesn't support events well yet:

```auto
 "dependencies": {
    "onvif": "git://github.com/agsh/onvif.git"
 },

```

- The bad new is that recently president Trump [seems](https://securitytoday.com/articles/2019/10/14/onvif-suspends-dahua-and-hikvision.aspx) to have banned Hikvision and Dahua as members of the Onvif industry forum, because they "_violate human rights_"... Which means that both companies are not allowed to use Onvif anymore in their new devices. [Here](https://ipvm.com/reports/onvif-statement) is more background information for those who have time. But the problem is now that in the majority of the camera's won't support Onvif anymore, so the future of Onvif has become uncertain. Seems the Onvif open standard isn't really open anymore 😡

P.S. the guys from the onvif library have only tested the event streams on Axis and Hikvision cameras, so it might not work for other brands...

**QUESTION:**

- Via the following flow:

- When you start listening to the events, for example the ProcessorUsage event is currently send in the output message like this:

Hope it works fine in your case!  
Bart

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [22 March 2020 08:49 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/2 "2020-03-22T08:49:55Z")

</div>

Hopefully they will keep their cameras compliant even though they will not be able to officially claim compliance, in the hope that they will get back in at some point.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [22 March 2020 13:44 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/3 "2020-03-22T13:44:32Z")

</div>

It seems to be working for me, though I don't think events are something I need, at least at the moment.  
Does the node allow changing the image properties such as Brightness? I can get the current settings with the Imaging node but I can't see how to change the settings.

---

<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: [22 March 2020 20:36 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/4 "2020-03-22T20:36:07Z")

</div>

> [@Colin](#):
>
> though I don't think events are something I need

@colin,  
I have recently bought a Hikvision camera, which is stuffed with lots of nice electronics: microphone, speaker, PIR sensor, IR leds, external input and output, ... So this camera can push an event to your Node-RED flow e.g. when the embedded PIR sensor detects motion, which means you have a complete alarm system in a small device ...

I have replaced the picture (see also my first post above) on my readme page by this one, to explain all these features a bit better:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a9756afb8a9b2c07a31d219e6be188fee4395d27.png)

> [@Colin](#):
>
> Does the node allow changing the image properties such as Brightness? I can get the current settings with the Imaging node but I can't see how to change the settings.

I have now added functionality in the Imaging node to allow you to set the _ **brightness/sharpness/contrast/colorSaturation** _. And an "_Imaging node_" [section](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/blob/master/README.md#imaging-node) has been added to my readme page with some explanation and example flows. So please install this new version ...

Here is a demo that shows switching between the minimum and maximum brightness:

![onvif_demo_brightness](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/4457ce33bd4e51fb920af25c99342f8342307341.gif)

P.S. You are watching a bunch of ethernet cables at my switch 😉

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [22 March 2020 22:01 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/5 "2020-03-22T22:01:36Z")

</div>

I didn't in any way mean that the events feature is not useful, just that it isn't useful to me at the moment.  
On the brightness setting I didn't see the set image settings option in the dropdown in the imaging node so I assumed that was not yet available, so it was with great anticipation that I tried your sample flow. Unfortunately it doesn't seem to work for me. When I try to change the brightness it does nothing, the node sends no message and no errors show in the debug pane. However in the node red log I see  
`Action setImagingSettings is not supported`  
which I guess may mean that my camera does not support it, which is a real shame as if I could do that it would mean I could dispense completely with the manufacturers horrible ActiveX interface that needs to be run in IE. ☹

---

<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: [22 March 2020 22:10 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/6 "2020-03-22T22:10:05Z")

</div>

> [@Colin](#):
>
> On the brightness setting I didn't see the set image settings option in the dropdown in the imaging node so I assumed that was not yet available

Well it wasn't available. Added that functionality today on your request ...

> [@Colin](#):
>
> in the node red log I see  
> `Action setImagingSettings is not supported`

Damn. My fault. This is the only of my nodes that uses beta versions on NPM, so I forgot to publish beta 8 on NPM. Have done it now. Sorry for the confusion!  
So we still have a chance to get rid of your horrible ActiveX control 😉

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [23 March 2020 09:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/7 "2020-03-23T09:07:33Z")

</div>

Yes!! Begone foul ActiveX Control, never to appear on my screen again.  
@BartButenaers You are my hero.

I was a bit confused by your previous post, I wasn't sure whether it meant that you had released another new version or not, and as you say it did not appear on npm.

Even better it means I can now control the brightness from within node-red. I have it watching a Dipper's nest under a bridge and the auto exposure is confused by the bright light at the far end of the bridge and the result is that it is too dark. However at night it is illuminated with the infra red so if I set the brightness for daytime then it is too bright at night. Now I can adjust it based on the time of day, or even possibly based on whether the infra red is on, if I can work out how to tell that. Perhaps there is an event for it, research required. For some reason the stupid bird has decided to build it's nest on top of the box this year rather than inside it.

By the way, if you install using  
`npm install node-red-contrib-onvif-nodes@beta`  
that will always install the latest version from the beta channel.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6cd43e3fbea94cd3423ef81292c7a66538a60f6a.jpeg)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [23 March 2020 11:32 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/8 "2020-03-23T11:32:55Z")

</div>

Nice! I'm happy it isn't your basement 😃  
But maybe the flooding you had earlier in some parts of UK is since long gone. Maybe it did not hit you anyway?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [23 March 2020 11:48 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/9 "2020-03-23T11:48:09Z")

</div>

> [@krambriw](#):
>
> But maybe the flooding you had earlier in some parts of UK is since long gone. Maybe it did not hit you anyway?

The house is well above the stream and we are at an altitude of 200m well up the valley so no danger of flooding of anything important. The stream was up to only a foot or so below the box though, and was what can only be described as a raging torrent. I didn't have the camera in situ then though, I didn't want to risk it getting washed away.

---

<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: [23 March 2020 19:30 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/10 "2020-03-23T19:30:31Z")

</div>

> [@Colin](#):
>
> Yes!! Begone foul ActiveX Control, never to appear on my screen again.

I'm glad it finally works, and that I was able to help you (after you helped solving about a million questions on this forum ...)!

> [@Colin](#):
>
> By the way, if you install using  
> `npm install node-red-contrib-onvif-nodes@beta`  
> that will always install the latest version from the beta channel.

Good tip !!!

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [24 March 2020 11:41 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/11 "2020-03-24T11:41:56Z")

</div>

A bit of an issue with the brightness setting. If I set a value in `msg.brightness` but `msg.contrast` and `msg.colorSaturation` don't exist then it sets the contrast and color to 0. Similarly if I set the contrast but not the brightness then the brightness is set to zero. If I provide a value for all three then it is ok. Is that an issue with the node or the camera?

---

<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: [25 March 2020 22:16 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/12 "2020-03-25T22:16:39Z")

</div>

> [@Colin](#):
>
> A bit of an issue with the brightness setting. If I set a value in `msg.brightness` but `msg.contrast` and `msg.colorSaturation` don't exist then it sets the contrast and color to 0. Similarly if I set the contrast but not the brightness then the brightness is set to zero. If I provide a value for all three then it is ok. Is that an issue with the node or the camera

Hi Colin,  
In the Onvif imaging [specification](https://www.onvif.org/ver20/imaging/wsdl/imaging.wsdl) you will see that all the parameters are _ **optional** _:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2ed5fb7e75fb38b2b3c097892b844388cc2b98b6.png)

And indeed my Hikvision camera behaves like that.  
So I assume you have bought your camera in [poundshop.com](http://poundshop.com) or a similar shop 😉  
I have published a beta 9 version:

- In the Imaging section of the [readme](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/blob/master/README.md#imaging-node) page, I have added a flow at the end that hopefully can workaround your problem.
- A series of extra imaging settings are now supported (depending on the brand).
- Caution: to be able to simply your workaround flow, I now use the payload as input!!! So instead of `msg.brightness` you now need to set `msg.payload.brightness`!

Hopefully this can be of any help to you ...  
Bart

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 March 2020 22:27 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/13 "2020-03-25T22:27:30Z")

</div>

The camera is an XVision X2C4000BMP. I can't complain that it doesn't implement ONVIF correctly because it doesn't even mention ONVIF in the spec. I was surprised to find that it does support a fair amount of the protocol, but that is why I always suggest that it may be the camera that is at fault. I guess that when this camera was produced they were working towards ONVIF but were not fully there yet.  
I have worked around it just by always passing all the parameters, but I thought I should report it in case it was a problem with the node.  
In your example flow in the wiki it seems to suggest that full brightness is 100, but on mine it goes from 0 to 255, but again that may well be an error in the camera.  
Thanks again.

---

<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: [25 March 2020 23:03 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/14 "2020-03-25T23:03:15Z")

</div>

> [@Colin](#):
>
> In your example flow in the wiki it seems to suggest that full brightness is 100, but on mine it goes from 0 to 255, but again that may well be an error in the camera.

I see this in the spec:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8a4aa369851771df5fddf873042000bef847d552.png)  
Which is quite dynamic ...  
Have tried to set a value of 255, but then I get "_invalid brightness value_". So not sure ...

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 March 2020 08:42 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/15 "2020-03-26T08:42:42Z")

</div>

Perhaps 'Valid range of Brightness' means that it is up to the camera to decide what range to use.

---

<div class="post-metadata">

### Author: ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)
#### Post date: [26 March 2020 11:31 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/16 "2020-03-26T11:31:35Z")

</div>

> [@BartButenaers](#):
>
> I have recently bought a Hikvision camera, which is stuffed with lots of nice electronics: microphone, speaker, PIR sensor, IR leds, external input and output, ... So this camera can push an event to your Node-RED flow e.g. when the embedded PIR sensor detects motion, which means you have a complete alarm system in a small device

Hi Bart,  
could you please let me know the type/name/product ID of the Camera. I like to buy one as well.  
thanks in advance  
Johannes

---

<div class="post-metadata">

### Author: ![SuperNinja](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superninja/32/5761_2.png) [@SuperNinja](https://discourse.nodered.org/u/SuperNinja)
#### Post date: [26 March 2020 13:38 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/17 "2020-03-26T13:38:16Z")

</div>

> [@BartButenaers](#):
>
> I have published a beta 9 version:

Hi Bart, i want to update my Beta 6 to Beta 9 by downloading the zip :  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e068650613998abafc9f6ee37822fccf5a8ee5d4.png)  
**BUT** when i open the `package.json` it's still the beta 7 :  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/f/dfeedbd59a7cad5119b47a24a4bdbd837043d133.png)

---

<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: [26 March 2020 16:23 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/18 "2020-03-26T16:23:16Z")

</div>

Hi Johannes (@juntiedt),  
Ii is a Hikvision [DS-2CD2442FWD-IW](https://www.hikvision.com/es-la/Products/Network-Camera/EasyIP-2.0/4MP/DS-2CD2442FWD-IW), which I bought last year on aliexpress for 88 Euro. But then customs intercepted it and added an extra 45 euro. But it seems that prices have gone upwards since then. Perhaps there is a successor for this device already. Don't know....

---

<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: [26 March 2020 20:37 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/19 "2020-03-26T20:37:25Z")

</div>

> [@SuperNinja](#):
>
> **BUT** when i open the `package.json` it's still the beta 7 :

Hi Chris (@SuperNinja),  
Cannot explain that. When I use the "Clone or download" button, then the content of the package.json file inside the zip looks fine:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe78b47e613e1c08617634a5ed3e9a4889ac8939.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 March 2020 21:12 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437/20 "2020-03-26T21:12:16Z")

</div>

> [@SuperNinja](#):
>
> i want to update my Beta 6 to Beta 9 by downloading the zip

Having downloaded it what did you do with it?

[Next page](https://discourse.nodered.org/t/announce-node-red-contrib-onvif-nodes-beta-7-event-streaming/23437.md?page=2)
