![image](https://user-images.githubusercontent.com/10905891/110368253-b18cf780-8…040-11eb-8ea8-7ef27aae7a76.png)
@gertst
Hey Gert
I've been asked to delivery a solution that makes use of your Velbus nodes.
Could you take a look at the VMB4DC config please?
It seems that it will only allow me to use channel 1, of which the VMB4DC has 4
I've had a look at const.js and that does suggest that the VMB4DC supports 4 channels
`{type: 0x12, name: "VMB4DC", nrOfButtons: 0, nrOfRelays: 0, nrOfDimmers: 4, hasTemperatureSensor: false, requestNameBinary: false},`
```
[
{
"id": "a415a1e4.eead5",
"type": "function",
"z": "28cf0949.18db66",
"name": "inject Date",
"func": "//get the ’date from the payload of the input message\nlet d = new Date(msg.payload);\n\n/*\nThis is how Velbus expects the day values:\nH’00’ Monday\nH’01’ Tuesday\nH’02’ Wednesday\nH’03’ Thursday\nH’04’ Friday\nH’05’ Saterday\nH’06’ Sunday\n*/\n\n/*\nBut the standard Date.getDay() function has the American notation,\nso we have to convert it first:\n*/\n//substract a day to go from Sunday as first day to Monday\nlet day = d.getDay() - 1;\n//if we have Sunday, correct it to 6\nif (day === -1) day = 6;\n\n\n// create a new payload, with the 3 keys\n// we need: day, hour and minute\nlet payload = {\n day: day, \n hour: d.getHours(), \n minute: d.getMinutes()\n}\n\n//replace the old payload with our new one\nmsg.payload = payload;\n\n//return the message\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 590,
"y": 260,
"wires": [
[
"d495b6e1.a5b9c8"
]
]
},
{
"id": "5950590b.4970f8",
"type": "inject",
"z": "28cf0949.18db66",
"name": "each day at 6",
"repeat": "",
"crontab": "00 06 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 360,
"y": 320,
"wires": [
[
"a415a1e4.eead5"
]
]
},
{
"id": "fd789a00.7cc018",
"type": "inject",
"z": "28cf0949.18db66",
"name": "",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 340,
"y": 260,
"wires": [
[
"a415a1e4.eead5"
]
]
},
{
"id": "d495b6e1.a5b9c8",
"type": "velbus-send-raw-bytes",
"z": "28cf0949.18db66",
"name": "Raw Bytes",
"connector": "7814f66e.e42578",
"dataBytes": "{{day}} {{hour}} {{minute}}",
"dataBytesType": "216",
"address": "",
"addressType": "0",
"priority": "251",
"rtr": "0",
"x": 780,
"y": 260,
"wires": []
},
{
"id": "9f292f29.d528f",
"type": "velbus-dimmer",
"z": "28cf0949.18db66",
"name": "Back bedroom Track 1",
"connector": "7814f66e.e42578",
"commands": 0,
"commandsType": "PAYLOAD",
"address": "",
"addressType": "208",
"channel": 1,
"x": 770,
"y": 440,
"wires": [
[
"edee4b6.31b08b8"
]
]
},
{
"id": "f368f09c.4fc3f",
"type": "inject",
"z": "28cf0949.18db66",
"name": "OFF",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 440,
"y": 460,
"wires": [
[
"9f292f29.d528f"
]
]
},
{
"id": "b9ccb22d.aaba1",
"type": "inject",
"z": "28cf0949.18db66",
"name": "ON",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "100",
"payloadType": "num",
"x": 430,
"y": 500,
"wires": [
[
"9f292f29.d528f"
]
]
},
{
"id": "edee4b6.31b08b8",
"type": "debug",
"z": "28cf0949.18db66",
"name": "",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1060,
"y": 440,
"wires": []
},
{
"id": "eecb1af9.b99ec8",
"type": "velbus-dimmer",
"z": "28cf0949.18db66",
"name": "Back bedroom Track 2",
"connector": "7814f66e.e42578",
"commands": 0,
"commandsType": "PAYLOAD",
"address": "",
"addressType": "208",
"channel": 1,
"x": 760,
"y": 540,
"wires": [
[
"8db65259.b5d7"
]
]
},
{
"id": "3116e8c8.494888",
"type": "inject",
"z": "28cf0949.18db66",
"name": "OFF",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 430,
"y": 560,
"wires": [
[
"eecb1af9.b99ec8"
]
]
},
{
"id": "90012ca0.29615",
"type": "inject",
"z": "28cf0949.18db66",
"name": "ON",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "100",
"payloadType": "num",
"x": 420,
"y": 600,
"wires": [
[
"eecb1af9.b99ec8"
]
]
},
{
"id": "8db65259.b5d7",
"type": "debug",
"z": "28cf0949.18db66",
"name": "",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1050,
"y": 540,
"wires": []
},
{
"id": "7814f66e.e42578",
"type": "velbus-connector",
"z": "",
"ip": "127.0.0.1",
"port": "6000"
}
]
```