First of all, thank you for your work on this amazing plugin. Sadly, i am having a problem with my node red flow.
After some experimenting, it turns out the button only updates after it sends an event. I have compared every property cached with every property sent by the event, and there is no difference. I am guessing that the button only listen for a few moments after sending an event and then stops listening.
Is there a way for me to constantly update the button without having it send an event to the node red websocket?
[
{
"id": "0abf7bee6de541c5",
"type": "websocket in",
"z": "d73ac6438fe4af23",
"name": "",
"server": "f78bd0552f21ace0",
"client": "",
"x": 470,
"y": 800,
"wires": [
[
"7771914bae0c4546",
"e9c7e420791dd0d9"
]
]
},
{
"id": "12b11d6da553bd31",
"type": "websocket in",
"z": "d73ac6438fe4af23",
"name": "",
"server": "7eeccd3f1bd7ade7",
"client": "",
"x": 140,
"y": 560,
"wires": [
[
"5c1a0560d30372b3",
"287150dec732e0c8"
]
]
},
{
"id": "8192fc5b7f888688",
"type": "websocket out",
"z": "d73ac6438fe4af23",
"name": "",
"server": "f78bd0552f21ace0",
"client": "",
"x": 1980,
"y": 560,
"wires": []
},
{
"id": "4f9ac307df38509d",
"type": "sd-input",
"z": "d73ac6438fe4af23",
"name": "Stream Deck In",
"x": 1380,
"y": 560,
"wires": [
[
"0b17778dd4f0133e"
]
]
},
{
"id": "0b17778dd4f0133e",
"type": "function",
"z": "d73ac6438fe4af23",
"name": "gosu add",
"func": "const fs = global.get('fsModule');\nlet str = fs.readFileSync(\"C:/Users/yohan/Documents/websocket/files/sr.txt\", 'utf8');\nmsg.sr = str.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1560,
"y": 560,
"wires": [
[
"7212809494cb6a5a",
"4c173e1c4d61b156",
"fbdc26cfcbbecc4f"
]
]
},
{
"id": "e978c52c6ee841ea",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "stream deck context",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1360,
"y": 640,
"wires": []
},
{
"id": "7212809494cb6a5a",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "full payload",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1690,
"y": 640,
"wires": []
},
{
"id": "019f9ced8cde6efa",
"type": "file in",
"z": "d73ac6438fe4af23",
"name": "",
"filename": "C:\\Users\\yohan\\Documents\\websocket\\files\\srcontext.txt",
"filenameType": "str",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 1050,
"y": 560,
"wires": [
[
"4f9ac307df38509d",
"e978c52c6ee841ea"
]
]
},
{
"id": "cb5a69fe368291c3",
"type": "file",
"z": "d73ac6438fe4af23",
"name": "",
"filename": "C:\\Users\\yohan\\Documents\\websocket\\files\\sr.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 620,
"y": 560,
"wires": [
[
"019f9ced8cde6efa",
"e11f5f93a01be469"
]
]
},
{
"id": "7771914bae0c4546",
"type": "file",
"z": "d73ac6438fe4af23",
"name": "",
"filename": "C:\\Users\\yohan\\Documents\\websocket\\files\\srcontext.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "utf8",
"x": 810,
"y": 800,
"wires": [
[]
]
},
{
"id": "e11f5f93a01be469",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "sr value cached",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 640,
"wires": []
},
{
"id": "37b206aaa662d850",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "gosu extract funtion",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 640,
"wires": []
},
{
"id": "5c1a0560d30372b3",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "gosu websocket",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 280,
"y": 640,
"wires": []
},
{
"id": "287150dec732e0c8",
"type": "json",
"z": "d73ac6438fe4af23",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 210,
"y": 480,
"wires": [
[
"5b1287c9643ffc45",
"8ce0c2261e47e728"
]
]
},
{
"id": "78dc2a0d97724006",
"type": "json",
"z": "d73ac6438fe4af23",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 430,
"y": 480,
"wires": [
[
"cb5a69fe368291c3",
"babc0f08e56a7d9a"
]
]
},
{
"id": "5b1287c9643ffc45",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 300,
"y": 400,
"wires": []
},
{
"id": "babc0f08e56a7d9a",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 400,
"wires": []
},
{
"id": "8ce0c2261e47e728",
"type": "change",
"z": "d73ac6438fe4af23",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.menu.bm.stats.SR",
"tot": "msg",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 560,
"wires": [
[
"37b206aaa662d850",
"78dc2a0d97724006"
]
]
},
{
"id": "4c173e1c4d61b156",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "sr value",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "sr",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1680,
"y": 700,
"wires": []
},
{
"id": "3593fb84350011de",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "stream deck output",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1930,
"y": 640,
"wires": []
},
{
"id": "fbdc26cfcbbecc4f",
"type": "sd-output",
"z": "d73ac6438fe4af23",
"name": "Stream Deck Out",
"streamdeckID": "1",
"title": "sr",
"title-type": "msg",
"image": "",
"image-type": "str",
"state": "",
"state-type": "str",
"x": 1770,
"y": 560,
"wires": [
[
"3593fb84350011de",
"8192fc5b7f888688"
]
]
},
{
"id": "e9c7e420791dd0d9",
"type": "debug",
"z": "d73ac6438fe4af23",
"name": "debug 7",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 680,
"y": 900,
"wires": []
},
{
"id": "f78bd0552f21ace0",
"type": "websocket-listener",
"path": "/sr",
"wholemsg": "false"
},
{
"id": "7eeccd3f1bd7ade7",
"type": "websocket-listener",
"path": "/gosu",
"wholemsg": "false"
}
]