# How to use this node? Blauberg-Vento

**URL:** <https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893>\
**Category:** General\
**Created:** [8 December 2022 22:21 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893 "2022-12-08T22:21:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![karloslb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karloslb/32/72244_2.png) [@karloslb](https://discourse.nodered.org/u/karloslb)\
**Post date:** [8 December 2022 22:21 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/1 "2022-12-08T22:21:16Z")

</div>

Hello everyone,  
I'm a beginner in node-red. I want to control my ventilationsystem with heat recovery. I found and installed this node:

[https://libraries.io/npm/@michaelkrog%2Fnode-red-contrib-blauberg-vento](https://libraries.io/npm/@michaelkrog%2Fnode-red-contrib-blauberg-vento)

 ![one](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/0/70bab29ff195353408ec66587343fe29912e5a71.jpeg)  
In the settings I can only enter the ID of the device.

The communication via network works because the device emits a sound signal when I start the node.  
You can find a description here:  
[https://libraries.io/npm/blaubergventojs](https://libraries.io/npm/blaubergventojs)

Unfortunately I have no idea how to start. Can anyone help me or give me a 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:** [9 December 2022 14:04 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/2 "2022-12-09T14:04:01Z")

</div>

Since it doesn't even seem to have been released to npm there is not much you can do other than contact the author. Personally I would not use a node that had not been released unless I was confident of the source.

---

<div class="post-metadata">

**Author:** ![karloslb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karloslb/32/72244_2.png) [@karloslb](https://discourse.nodered.org/u/karloslb)\
**Post date:** [13 December 2022 10:36 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/3 "2022-12-13T10:36:36Z")

</div>

I would try anyway. I have nothing to lose. Can someone help me?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2022 11:26 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/4 "2022-12-13T11:26:50Z")

</div>

I would suggest opening an issue on the nodes [GitHub Issues](https://github.com/michaelkrog/node-red-contrib-blauberg-vento/issues) page asking the author ofr some documentation and help.

---

<div class="post-metadata">

**Author:** ![karloslb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karloslb/32/72244_2.png) [@karloslb](https://discourse.nodered.org/u/karloslb)\
**Post date:** [13 December 2022 12:30 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/5 "2022-12-13T12:30:44Z")

</div>

Ok I'll try.

---

<div class="post-metadata">

**Author:** ![karloslb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karloslb/32/72244_2.png) [@karloslb](https://discourse.nodered.org/u/karloslb)\
**Post date:** [17 December 2022 00:01 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/6 "2022-12-17T00:01:52Z")

</div>

Unfortunately, the author does not answer.  
I edited the index file of the node:

```auto
var e,n;
e=this,
n=function(e){module.exports=function(n)
    {
    var d=new e.BlaubergVentoResource;
    n.nodes.registerType('blauberg-vento',(function(e){
        n.nodes.createNode(this,e),this.on('input',(n=>{
            this.id=e.id,null!=this.id&&(this.debug('Receieved message for device id '+this.id),d.findById(this.id).then((e=>{var i,o,t,s;
                if(null!=e){var l=n.payload;
                    e.speed=null!=(i=l.speed)?i:e.speed,e.mode=null!=(o=l.mode)?o:e.mode,
                    e.manualSpeed=null!=(t=l.manualSpeed)?t:e.manualSpeed,
                    e.on=null!=(s=l.on)?s:e.on,
                    this.debug('Sending message to device: '+e),
                    d.save(e)}else this.warn(`Device not found [id=${this.id}]`)
                }
                )
                )
                )
            }
            )
            )
                }
                    )
                    )
                }
                },
                    'object'==typeof exports&&'undefined'!=typeof module?n(require('blaubergventojs')):'function'==typeof define&&define.amd?define(['blaubergventojs'],n):n((e='undefined'!=typeof globalThis?globalThis:e||self).blaubergventojs);
//# sourceMappingURL=index.js.map

```

Can someone explain the code to me? Does it show how to use the node?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [17 December 2022 09:07 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/7 "2022-12-17T09:07:16Z")

</div>

> The communication via network works because the device emits a sound signal when I start the node.

The node appears to work but only accepts preformatted messages, you will have to create them yourself - this is not very simple. [See the protocol specification](https://blaubergventilatoren.de/uploads/download/b133_4_1en_01preview.pdf)  
There are other people who did some heavy lifting already, if you are using mqtt, [this python script](https://github.com/mhbosch/vent_to_mqtt) might help you.

---

<div class="post-metadata">

**Author:** ![karloslb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karloslb/32/72244_2.png) [@karloslb](https://discourse.nodered.org/u/karloslb)\
**Post date:** [17 December 2022 13:51 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/8 "2022-12-17T13:51:56Z")

</div>

The node uses the following script:  
[https://github.com/michaelkrog/blaubergventojs.git](https://github.com/michaelkrog/blaubergventojs.git)  
The description says:

"  
The modules 2 levels of communication:  
A low level client that mimics the communication protocol specified by Blauberg.  
A high level resource that wraps the low level client for easier usage.

## Low level Example

```auto
import { BlaubergVentoClient, FunctionType, Parameter, DataEntry } from 'blaugbergventojs'

const client = new BlaubergVentoClient();

// Find all devices on the local network
const addresses = await client.findDevices();

// Assemble package for reading ON_OFF state
const packet = new Packet(addresses[0].id, '1111', FunctionType.READ, [DataEntry.of(Parameter.ON_OFF)])

// Send package and wait for response.
const response = await client.send(packet, addresses[0].ip);

// Check value
const isOn = response.packet.dataEntries[0].value === 1;

```

## High Level Example

```auto
import { BlaubergVentoResource, FunctionType, Parameter, DataEntry } from 'blaugbergventojs'

const resource = new BlaubergVentoResource();

// Find all devices on the local network
const devices = await resource.findAll();

// Change a device and save it
let device = devices.contents[0];
device.speed = 1;
device = await resource.save(device);

```

"

A "test" folder can be found there. It contains four files:

[https://github.com/michaelkrog/blaubergventojs/blob/main/test/blauberg-vento-client.ispecs.ts](https://github.com/michaelkrog/blaubergventojs/blob/main/test/blauberg-vento-client.ispecs.ts)

[https://github.com/michaelkrog/blaubergventojs/blob/main/test/blauberg-vento-resource.ispec.ts](https://github.com/michaelkrog/blaubergventojs/blob/main/test/blauberg-vento-resource.ispec.ts)

[https://github.com/michaelkrog/blaubergventojs/blob/main/test/packet.spec.ts](https://github.com/michaelkrog/blaubergventojs/blob/main/test/packet.spec.ts)

[https://github.com/michaelkrog/blaubergventojs/blob/main/test/setupJest.js](https://github.com/michaelkrog/blaubergventojs/blob/main/test/setupJest.js)

Can you read something from it?

---

<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:** [15 February 2023 13:52 UTC](https://discourse.nodered.org/t/how-to-use-this-node-blauberg-vento/71893/9 "2023-02-15T13:52:30Z")

</div>

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