Node Red integration

To be honest I’m overwhelmed by the splendid work @Stef_Coene did :wink:
This means there’s no excuse anymore to get my hands dirty and implement that JSON file! :stuck_out_tongue:

2 Likes

If you’re looking for text strings to test with, I created these for use within openHAB2.

1 Like

I want to fix this, but I can not replicate it - both work om my relay module :thinking:
Can you have a look at the VelbusLink logger what command is sent in both scenarios?
Tx!

I agree with the logic you explained here but I did not succeed changing those ambient colors :frowning:
Is this command overruled by another settings somehow?
Can you confirm it’s working on your setup?

Yes I can confirm, just tested this code:

[
    {
        "id": "dff627b9.b51c08",
        "type": "velbus-send-raw-bytes",
        "z": "e143c9bc.3a1eb8",
        "name": "Send Raw Bytes",
        "connector": "2a1a837f.ef12bc",
        "dataBytes": "",
        "dataBytesType": "PAYLOAD",
        "address": 0,
        "addressType": "MSG",
        "priority": "251",
        "rtr": 0,
        "x": 840,
        "y": 640,
        "wires": []
    },
    {
        "id": "c77b684.d3bb598",
        "type": "trigger",
        "z": "e143c9bc.3a1eb8",
        "op1": "1",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "-1",
        "extend": false,
        "units": "s",
        "reset": "",
        "bytopic": "all",
        "name": "",
        "x": 140,
        "y": 640,
        "wires": [
            []
        ]
    },
    {
        "id": "f1666b2.98f5f98",
        "type": "random",
        "z": "e143c9bc.3a1eb8",
        "name": "random 2-30",
        "low": "2",
        "high": "30",
        "inte": "true",
        "property": "random",
        "x": 450,
        "y": 640,
        "wires": [
            [
                "40f9a309.bbf99c"
            ]
        ]
    },
    {
        "id": "40f9a309.bbf99c",
        "type": "function",
        "z": "e143c9bc.3a1eb8",
        "name": "format 0xD4 for 0x81",
        "func": "msg.random += 0x60;\nmsg.payload = \"0xD4 0x01 0x0F 0x\" + msg.random.toString(16);\nmsg.address = \"0x81\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 640,
        "y": 640,
        "wires": [
            [
                "dff627b9.b51c08",
                "df67f7bd.267778"
            ]
        ]
    },
    {
        "id": "df67f7bd.267778",
        "type": "debug",
        "z": "e143c9bc.3a1eb8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 830,
        "y": 600,
        "wires": []
    },
    {
        "id": "3b4ad771.20c788",
        "type": "inject",
        "z": "e143c9bc.3a1eb8",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "str",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 350,
        "y": 600,
        "wires": [
            [
                "f1666b2.98f5f98"
            ]
        ]
    },
    {
        "id": "2a1a837f.ef12bc",
        "type": "velbus-connector",
        "z": "",
        "ip": "192.168.1.xxx",
        "port": "yyyy"
    }
]

Can you import this nodes and check?
Change velbus-connector ip/port and your edge address (mine 0x81) in function node code.

Just noticed this active setting:

Alright! It was still not working until I saw that the address was not set right: same issue as you had: once I fill in the address manually, it dit work!
So now I have a test case to find that bug! :wink:

1 Like

Here’s another release of node-red-contrib-velbus v0.2.09!

Mostly bugfixes this time:

  • Bugfix: Some modules had a wrong nr of relays (thanks to MDAR)
  • Bugfix: The first gen. glass panels had no temp sensor (thanks to MDAR)
  • Bugfix: The relay node had no icon in specific circumstances
  • Bugfix: Address was empty when data bytes were parsed from payload (thanks to jorampic)
  • Enhancement: More descriptive default names (but no module names yet, MDAR :face_with_raised_eyebrow:)
2 Likes

Thanks @jorampic, but in the meantime I could fix the bug. There’s a new release 0.2.09 :wink:
At least, I hope you did not see this error in the latest version anymore? :smirk:

1 Like

Error is fix Well done GertSt :cowboy_hat_face:

2 Likes

@GertSt

Hi

I’m trying to select anything other than channel 1 on a VMB4DC and it’s not playing nicely.

I guess you are using the Dimmer node? I’ve implemented the commands for the VMBDMI, as these are the dimmers I have. I checked the docs and indeed, the VMB4DC has some changes in the protocol :face_with_raised_eyebrow:
Another reason to implement @Stef_Coene’s protocol JSON! :blush:

1 Like

I have tried to play with the Dimmer node a bit more and can’t get any joy with a DMI-R or 4DC.
(the channel selection doesn’t seem to want to play ball, but even a DMI-R doesn’t want to play)

Would you like to connect remotely and experiment with either?

I guess it will only work with the older DMI… The DMI-R has a slightly different way of dimming.
So I first have to add those commands and then it would be helpful to test them out remotely.
Thanks for the offer to test remotely - I’ll let you know when I have a something ready!

1 Like

Hey Gert

How are you getting on?

Are you keeping yourself amused ?

Can I put two suggestions forward for your Node-RED nodes?

  • Can you add the Thermostat “button” events to the Button node?
    IE.
    Button 1 of a thermostat base address is Heater
    Button 2 is Cooler
    Button 3 is Pump
    Button 4 is Boost (I think that’s the order)
    Buttons 5 to 8 are the threshold alarms
    (By just allowing the manual entry of the thermostat [sub] address {Address used for the thermostat, not the glass panel})

  • A minor tweak, can you set the default bridge address to 127.0.0.1, instead of raspberrypi.local

Many thanks,

Stuart

I’ll see what I can do. I’m in the middle of another project right now, so I can’t do this right away. For now, you might set the address for the thermostat manually?

1 Like

Hi Gert

There’s no rush.

Unfortunately you’ve been super clever and filtered the Button node to provide a drop down with supported buttons.

Adding a Manual entry option would be great.

@GertSt

Hey Gert

How is life with you and yours?
Are you all well?


Velbus have released a new module to replace the VMB1RYNOS, called the VMB1RYS

So you’d like to think it would be easy enough to edit your const.js file and add in.

{type: 0x41), name: "VMB1RYS", nrOfButtons: 0, nrOfRelays: 5, nrOfDimmers: 0, hasTemperatureSensor: false, requestNameBinary: false}

However… It’s not that simple to get the extra feature they have added.

There is an external input on the module that shows as a button event on channel 6

So where the button events for channels 1 to 5 only show Pressed / Released (ON & OFF), channel 6 shows all three of the classic button states.
Pressed, Long_Pressed & Released

Should I just state that the module has 6 inputs and ignore the first 5, or is there something clever that you can do?

I have had the same issue… Just as a reminder to myself, the modules were recognised after I restarted the node-red service.
dietpi@DietPi:~$ sudo systemctl restart node-red