cmd-factory #130
Replies: 2 comments 7 replies
-
Example of a filtering node - made for a four-button scene-device: [
{
"id": "e962cbf890d24eb0",
"type": "subflow",
"name": "Z-wave scene",
"info": "Filter anything BUT certain Central Scene Notification",
"category": "ZWave JS",
"in": [
{
"x": 200,
"y": 220,
"wires": [
{
"id": "856e626f7069db5f"
}
]
}
],
"out": [
{
"x": 880,
"y": 220,
"wires": [
{
"id": "0a7bb5f02d804d12",
"port": 0
},
{
"id": "949d9f7feccbc72a",
"port": 0
}
]
}
],
"env": [
{
"name": "button",
"type": "str",
"value": "",
"ui": {
"type": "select",
"opts": {
"opts": [
{
"l": {
"en-US": "1"
},
"v": "001"
},
{
"l": {
"en-US": "2"
},
"v": "002"
},
{
"l": {
"en-US": "3"
},
"v": "003"
},
{
"l": {
"en-US": "4"
},
"v": "004"
},
{
"l": {
"en-US": "Any"
},
"v": "any"
}
]
}
}
},
{
"name": "type",
"type": "str",
"value": "",
"ui": {
"type": "select",
"opts": {
"opts": [
{
"l": {
"en-US": "Pressed"
},
"v": "0"
},
{
"l": {
"en-US": "Held"
},
"v": "2"
},
{
"l": {
"en-US": "Released"
},
"v": "1"
},
{
"l": {
"en-US": "Any"
},
"v": "any"
}
]
}
}
}
],
"meta": {},
"color": "#C0DEED",
"inputLabels": [
"Z-wave scene device"
],
"outputLabels": [
"Anything"
],
"icon": "node-red/link-out.svg"
},
{
"id": "9469e05ea35aa8a7",
"type": "switch",
"z": "e962cbf890d24eb0",
"name": "Button",
"property": "payload.object.propertyKey",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "button",
"vt": "env"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 530,
"y": 220,
"wires": [
[
"0a7bb5f02d804d12",
"949d9f7feccbc72a"
]
],
"outputLabels": [
"Button1"
]
},
{
"id": "856e626f7069db5f",
"type": "switch",
"z": "e962cbf890d24eb0",
"name": "Central Scene",
"property": "payload.object.commandClassName",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Central Scene",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 340,
"y": 220,
"wires": [
[
"9469e05ea35aa8a7",
"0bf56af7f8e2d702"
]
]
},
{
"id": "0a7bb5f02d804d12",
"type": "switch",
"z": "e962cbf890d24eb0",
"name": "SceneType",
"property": "payload.object.value",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "type",
"vt": "env"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 220,
"wires": [
[]
],
"outputLabels": [
"Pressed"
]
},
{
"id": "0bf56af7f8e2d702",
"type": "switch",
"z": "e962cbf890d24eb0",
"name": "Button",
"property": "button",
"propertyType": "env",
"rules": [
{
"t": "cont",
"v": "any",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 530,
"y": 280,
"wires": [
[
"0a7bb5f02d804d12",
"949d9f7feccbc72a"
]
],
"outputLabels": [
"Button1"
]
},
{
"id": "949d9f7feccbc72a",
"type": "switch",
"z": "e962cbf890d24eb0",
"name": "SceneType",
"property": "type",
"propertyType": "env",
"rules": [
{
"t": "cont",
"v": "any",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 280,
"wires": [
[]
],
"outputLabels": [
"Pressed"
]
}
] |
Beta Was this translation helpful? Give feedback.
-
Hey, Have you seen So, this is already possible (to some degree = we can't do it on value - as there are 2 many variations, to create one suitable node) Context: filter = allow it through 1 ) Deploy the the See animation here (curtesy of @crxporter ) |
Beta Was this translation helpful? Give feedback.
-
Hi and thank you for the command factory - I more or less made the same thing in a subflow but I'll definately be converting to the cmd-factory when I have time.
Do you have any thoughts about filtering? I use switches in a subflow to filter all sorts of z-wave messages is this common practice or am i doing something wrong/odd here?
For instance: z-wave node > subflow(if endpoint=x and value=y) > turn on zigbee bulb, etc.
Should this be the next cmd-factory -like project? cmd-conveyer, cmd-filter, whatever.
Beta Was this translation helpful? Give feedback.
All reactions