So I was having issues trying to use the default Node-RED Lutron Cassette integration for my RA2 main repeater. That node just doesn’t function properly using the built in implementation for telnet.
With the help of @markus I was able to get things working using some simple TCP nodes. It still has a ways to go, especially with status tracking being mapped in a more useful way, but its a start for anyone else trying to get this system setup.
[
{
"id": "a619cf5641663996",
"type": "subflow",
"name": "RA2 Coms",
"info": "",
"category": "",
"in": [
{
"x": 280,
"y": 120,
"wires": [
{
"id": "2a1b8f270603d562"
}
]
}
],
"out": [
{
"x": 860,
"y": 140,
"wires": [
{
"id": "40da9f43084b9cbd",
"port": 0
}
]
}
],
"env": [
{
"name": "user",
"type": "str",
"value": "lutron",
"ui": {
"label": {
"en-US": "username"
},
"type": "input",
"opts": {
"types": [
"str"
]
}
}
},
{
"name": "pass",
"type": "str",
"value": "integration",
"ui": {
"label": {
"en-US": "password"
},
"type": "input",
"opts": {
"types": [
"str"
]
}
}
}
],
"meta": {},
"color": "#5ECBC8",
"icon": "node-red/bridge-dash.svg",
"status": {
"x": 860,
"y": 200,
"wires": [
{
"id": "40da9f43084b9cbd",
"port": 0
}
]
}
},
{
"id": "17155396e5558967",
"type": "function",
"z": "a619cf5641663996",
"name": "Password",
"func": "//msg.payload = \"integration\\r\\n\";\nmsg.payload = env.get(\"pass\")+\"\\r\\n\";\nreturn msg;\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 480,
"y": 300,
"wires": [
[
"40da9f43084b9cbd"
]
]
},
{
"id": "e98a85cc6f08f29f",
"type": "inject",
"z": "a619cf5641663996",
"name": "Startup",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": ".5",
"topic": "",
"payload": "startup",
"payloadType": "str",
"x": 260,
"y": 180,
"wires": [
[
"d37c38d1edc9806d"
]
]
},
{
"id": "be55a7b177a393aa",
"type": "function",
"z": "a619cf5641663996",
"name": "user/pass",
"func": "//msg.payload = \"lutron\\r\\n\"+\"integration\\r\\n\";\nmsg.payload = env.get(\"user\")+\"\\r\\n\"+env.get(\"pass\")+\"\\r\\n\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 480,
"y": 260,
"wires": [
[
"40da9f43084b9cbd"
]
]
},
{
"id": "49582bad9c25a07c",
"type": "switch",
"z": "a619cf5641663996",
"name": "retry",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "startup",
"vt": "str"
},
{
"t": "cont",
"v": "login: password",
"vt": "str"
},
{
"t": "cont",
"v": "password",
"vt": "str"
},
{
"t": "cont",
"v": "login",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 4,
"x": 310,
"y": 320,
"wires": [
[],
[
"be55a7b177a393aa"
],
[
"17155396e5558967"
],
[
"7a703d71585392da"
]
]
},
{
"id": "d37c38d1edc9806d",
"type": "function",
"z": "a619cf5641663996",
"name": "startup",
"func": "msg.payload = env.get(\"user\")+\"\\r\\n\";\nnode.send(msg);\nmsg.payload = env.get(\"pass\")+\"\\r\\n\";\nnode.send(msg);",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 180,
"wires": [
[
"40da9f43084b9cbd"
]
]
},
{
"id": "40da9f43084b9cbd",
"type": "tcp request",
"z": "a619cf5641663996",
"name": "",
"server": "10.0.0.50",
"port": "23",
"out": "sit",
"ret": "string",
"splitc": " ",
"newline": "",
"tls": "",
"x": 680,
"y": 180,
"wires": [
[
"ae49828d99c684a0",
"0956e1f68b3b3924"
]
]
},
{
"id": "4becc5daf983d946",
"type": "function",
"z": "a619cf5641663996",
"name": "oneshot",
"func": " // If voltage drops below level and we \n // haven't sent an alert...\n if (msg.payload.includes(\"GNET\") || msg.payload.includes(\"Oh no!\"))\n {\n // Set the content of the alert\n msg.delay = 0;\n msg.payload = \"Oh no!\";\n // Return the message so the alert is sent\n return msg;\n }",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 720,
"y": 280,
"wires": [
[]
]
},
{
"id": "ae49828d99c684a0",
"type": "debug",
"z": "a619cf5641663996",
"d": true,
"name": "Echo",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 280,
"wires": []
},
{
"id": "7a703d71585392da",
"type": "function",
"z": "a619cf5641663996",
"name": "user",
"func": "//msg.payload = \"lutron\\r\\n\";\nmsg.payload = env.get(\"user\")+\"\\r\\n\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 340,
"wires": [
[]
]
},
{
"id": "0956e1f68b3b3924",
"type": "delay",
"z": "a619cf5641663996",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 270,
"y": 240,
"wires": [
[
"49582bad9c25a07c"
]
]
},
{
"id": "2a1b8f270603d562",
"type": "delay",
"z": "a619cf5641663996",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "3",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 430,
"y": 120,
"wires": [
[
"40da9f43084b9cbd"
]
]
},
{
"id": "f24528a2477dacf5",
"type": "telnet-connection",
"z": "a619cf5641663996",
"name": "Main Repeater",
"address": "10.0.0.50",
"port": "23",
"inDelimiter": "",
"outDelimiter": "",
"timeOut": "1500",
"clearOut": "",
"openTries": "1"
},
{
"id": "08df183779c9799c",
"type": "subflow",
"name": "RA2 Command",
"category": "",
"in": [
{
"x": 100,
"y": 80,
"wires": [
{
"id": "f6ba9ec22a157656"
}
]
}
],
"out": [
{
"x": 640,
"y": 80,
"wires": [
{
"id": "b332ea38933467b3",
"port": 0
}
]
}
],
"env": [
{
"name": "deviceid",
"type": "str",
"value": "",
"ui": {
"label": {
"en-US": "Device Name"
},
"type": "select",
"opts": {
"opts": [
{
"l": {
"en-US": "Lower Level Accent Lights"
},
"v": "46"
},
{
"l": {
"en-US": "Office Lights"
},
"v": "38"
},
{
"l": {
"en-US": "Living Room Lamp"
},
"v": "12"
}
]
}
}
},
{
"name": "level",
"type": "num",
"value": "75",
"ui": {
"label": {
"en-US": "Dimmer Level"
},
"type": "spinner",
"opts": {
"min": 0,
"max": 100
}
}
},
{
"name": "fademinutes",
"type": "num",
"value": "00",
"ui": {
"label": {
"en-US": "Fade Time (Minutes)"
},
"type": "spinner",
"opts": {
"min": 0,
"max": 60
}
}
},
{
"name": "fadeseconds",
"type": "num",
"value": "00",
"ui": {
"label": {
"en-US": "Fade Time (Seconds)"
},
"type": "spinner",
"opts": {
"min": 0,
"max": 60
}
}
}
],
"meta": {},
"color": "#5ECBC8",
"icon": "font-awesome/fa-sliders",
"status": {
"x": 640,
"y": 140,
"wires": [
{
"id": "b332ea38933467b3",
"port": 0
}
]
}
},
{
"id": "f6ba9ec22a157656",
"type": "change",
"z": "08df183779c9799c",
"name": "",
"rules": [
{
"t": "set",
"p": "deviceid",
"pt": "msg",
"to": "deviceid",
"tot": "env"
},
{
"t": "set",
"p": "level",
"pt": "msg",
"to": "level",
"tot": "env"
},
{
"t": "set",
"p": "minutes",
"pt": "msg",
"to": "fademinutes",
"tot": "env"
},
{
"t": "set",
"p": "seconds",
"pt": "msg",
"to": "fadeseconds",
"tot": "env"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 240,
"y": 80,
"wires": [
[
"b332ea38933467b3"
]
]
},
{
"id": "b332ea38933467b3",
"type": "function",
"z": "08df183779c9799c",
"name": "integration",
"func": "//msg.payload = \"#OUTPUT,\"+msg.deviceid+\",1,\"+msg.level+\",00:05\\r\\n\";\nmsg.payload = \"#OUTPUT,\"+msg.deviceid+\",1,\"+msg.level+\",\"+msg.minutes+\":\"+msg.seconds+\"\\r\\n\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 430,
"y": 80,
"wires": [
[]
]
},
{
"id": "2392de76d853d600",
"type": "tab",
"label": "RA2 Lighting",
"disabled": false,
"info": "",
"env": []
},
{
"id": "fddede89b9624d5a",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "LL Accent LIghts",
"env": [
{
"name": "deviceid",
"value": "46",
"type": "str"
},
{
"name": "level",
"value": "100",
"type": "num"
},
{
"name": "fadeseconds",
"value": "3",
"type": "num"
},
{
"name": "fade",
"value": "00:05",
"type": "num"
},
{
"name": "device",
"value": "46",
"type": "str"
},
{
"name": "Device",
"value": "46",
"type": "str"
}
],
"x": 360,
"y": 120,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "279b653dc5203c09",
"type": "inject",
"z": "2392de76d853d600",
"name": "50",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 150,
"y": 120,
"wires": [
[
"fddede89b9624d5a"
]
]
},
{
"id": "639ff33e75c7801c",
"type": "inject",
"z": "2392de76d853d600",
"name": "25",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "25",
"payloadType": "num",
"x": 150,
"y": 240,
"wires": [
[
"5ea43002217f0b3d"
]
]
},
{
"id": "28efbc48a2ab6f74",
"type": "inject",
"z": "2392de76d853d600",
"name": "100",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "100",
"payloadType": "num",
"x": 150,
"y": 360,
"wires": [
[
"16b08ccd90197a85"
]
]
},
{
"id": "cae59730d0ee9666",
"type": "inject",
"z": "2392de76d853d600",
"name": "50",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "50",
"payloadType": "num",
"x": 150,
"y": 300,
"wires": [
[
"deca7ac8566a48f1"
]
]
},
{
"id": "5ea43002217f0b3d",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Office Lights",
"env": [
{
"name": "deviceid",
"value": "38",
"type": "str"
},
{
"name": "level",
"value": "25",
"type": "num"
},
{
"name": "fadeseconds",
"value": "2",
"type": "num"
}
],
"x": 350,
"y": 240,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "deca7ac8566a48f1",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Office Lights",
"env": [
{
"name": "deviceid",
"value": "38",
"type": "str"
},
{
"name": "level",
"value": "50",
"type": "num"
},
{
"name": "fadeseconds",
"value": "2",
"type": "num"
}
],
"x": 350,
"y": 300,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "16b08ccd90197a85",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Office Lights",
"env": [
{
"name": "deviceid",
"value": "38",
"type": "str"
},
{
"name": "level",
"value": "100",
"type": "num"
},
{
"name": "fadeseconds",
"value": "2",
"type": "num"
}
],
"x": 350,
"y": 360,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "eb537992547fc0e2",
"type": "inject",
"z": "2392de76d853d600",
"name": "100",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "100",
"payloadType": "num",
"x": 150,
"y": 420,
"wires": [
[
"bce2808ff5ee282c"
]
]
},
{
"id": "bce2808ff5ee282c",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Lamp Off",
"env": [
{
"name": "deviceid",
"value": "12",
"type": "str"
},
{
"name": "level",
"value": "0",
"type": "num"
}
],
"x": 340,
"y": 420,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "d6d8bce1ee4c8cfb",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Lamp Off",
"env": [
{
"name": "deviceid",
"value": "12",
"type": "str"
},
{
"name": "level",
"value": "100",
"type": "num"
}
],
"x": 340,
"y": 480,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "8a6902bcd62cd056",
"type": "inject",
"z": "2392de76d853d600",
"name": "100",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "100",
"payloadType": "num",
"x": 150,
"y": 480,
"wires": [
[
"d6d8bce1ee4c8cfb"
]
]
},
{
"id": "535421d428fa1633",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "LL Accent LIghts",
"env": [
{
"name": "deviceid",
"value": "46",
"type": "str"
},
{
"name": "level",
"value": "0",
"type": "num"
},
{
"name": "fadeseconds",
"value": "3",
"type": "num"
},
{
"name": "fade",
"value": "00:05",
"type": "num"
},
{
"name": "device",
"value": "46",
"type": "str"
},
{
"name": "Device",
"value": "46",
"type": "str"
}
],
"x": 360,
"y": 60,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "8604659d67e8d7f6",
"type": "inject",
"z": "2392de76d853d600",
"name": "0",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 150,
"y": 60,
"wires": [
[
"535421d428fa1633"
]
]
},
{
"id": "f75cbbf5a38f9b01",
"type": "inject",
"z": "2392de76d853d600",
"name": "0",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "10",
"payloadType": "num",
"x": 150,
"y": 180,
"wires": [
[
"0793de21411732b8"
]
]
},
{
"id": "0793de21411732b8",
"type": "subflow:08df183779c9799c",
"z": "2392de76d853d600",
"name": "Office Lights",
"env": [
{
"name": "deviceid",
"value": "38",
"type": "str"
},
{
"name": "level",
"value": "0",
"type": "num"
},
{
"name": "fadeseconds",
"value": "2",
"type": "num"
}
],
"x": 350,
"y": 180,
"wires": [
[
"043519183cc18c1e"
]
]
},
{
"id": "043519183cc18c1e",
"type": "subflow:a619cf5641663996",
"z": "2392de76d853d600",
"name": "",
"x": 610,
"y": 180,
"wires": [
[
"a0f93f9991d426a0"
]
]
},
{
"id": "a0f93f9991d426a0",
"type": "debug",
"z": "2392de76d853d600",
"name": "RA2 Debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 180,
"wires": []
}
]