node-red-contrib-st7735s
Version:
IPS LCD for ST7735s controller
2,030 lines • 108 kB
JSON
[
{
"id": "086f4a588641fe21",
"type": "tab",
"label": "OLED-SH1106",
"disabled": true,
"info": "",
"env": []
},
{
"id": "a9e9290cc1452c4e",
"type": "tab",
"label": "OLED-SSD1306",
"disabled": true,
"info": "",
"env": []
},
{
"id": "e3ffbfdc8270d7f0",
"type": "tab",
"label": "Flow 1",
"disabled": true,
"info": "",
"env": []
},
{
"id": "9faf99dc6dc85372",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d6e5a43c06e9dff8",
"type": "mqtt-broker",
"name": "Favoriot MQTT Broker",
"broker": "mqtt.favoriot.com",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "3d479988bbd3748e",
"type": "oled-config",
"name": "SH1106",
"width": "128",
"height": "64",
"address": "60",
"driver": "SH1106",
"i2cBus": "3"
},
{
"id": "cab7b8678fed77e6",
"type": "ips-lcd-config",
"name": "IPS LCD",
"width": "80",
"height": "160",
"rotation": "90",
"offset_left": "24",
"offset_top": "0",
"invert": "False",
"driver": "ST7735S",
"port": "0",
"cs": "1",
"dc": "9",
"speed": "4000000",
"backlight": "25",
"rst": "24"
},
{
"id": "9a903994720a5612",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 240,
"wires": [
[
"bd66c077f24374cc",
"5ce07d418c36063c",
"1624d2353c0415a3",
"33957fa9414e5789",
"d3bda80bbeac73cf",
"2b8e601f365c3c84",
"b48b5bf777cca354",
"b5bc761920e06485",
"7d85112a8a03bcc1",
"f1ecfba05a272407"
]
]
},
{
"id": "bd66c077f24374cc",
"type": "function",
"z": "086f4a588641fe21",
"name": "Battery",
"func": "this.p = 0;\nmsg.payload={\n \"x\":1,\n \"y\":1,\n \"p\": this.p\n}\nsetInterval(()=>{\n this.p = (this.p+10)%100;\n msg.payload = {\n \"x\": 1,\n \"y\": 1,\n \"p\": this.p\n }\n node.send(msg);\n},1000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 60,
"wires": [
[
"c3d9c324f77c18e9"
]
]
},
{
"id": "5ce07d418c36063c",
"type": "function",
"z": "086f4a588641fe21",
"name": "Bluetooth",
"func": "msg.payload={\n \"x\":25,\n \"y\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 100,
"wires": [
[
"dd5dad139e531e2d"
]
]
},
{
"id": "1624d2353c0415a3",
"type": "function",
"z": "086f4a588641fe21",
"name": "FillRectL",
"func": "msg.payload = { \n \"x\": 0, \n \"y\": 64-5, \n \"w\": 5,\n \"h\": 5, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 140,
"wires": [
[
"6bdb803707dc8a16"
]
]
},
{
"id": "33957fa9414e5789",
"type": "function",
"z": "086f4a588641fe21",
"name": "FillRectR",
"func": "msg.payload = { \n \"x\": 128-5, \n \"y\": 64-5, \n \"w\": 5,\n \"h\": 5, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 180,
"wires": [
[
"6bdb803707dc8a16"
]
]
},
{
"id": "d3bda80bbeac73cf",
"type": "function",
"z": "086f4a588641fe21",
"name": "Image",
"func": "msg.payload = { \n \"image\": \"OledClockWhite.png\", \n \"x\": 48, \n \"y\": 17, \n \"clear\": false, \n \"animated\": false \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 220,
"wires": [
[
"afdd49d736f4d2dd"
]
]
},
{
"id": "2b8e601f365c3c84",
"type": "function",
"z": "086f4a588641fe21",
"name": "Line Left",
"func": "msg.payload = { \n \"x0\": 0, \n \"y0\": 20, \n \"x1\": 45, \n \"y1\": 20, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 260,
"wires": [
[
"a75ef69e75c916fe"
]
]
},
{
"id": "b48b5bf777cca354",
"type": "function",
"z": "086f4a588641fe21",
"name": "Line Right",
"func": "msg.payload = { \n \"x0\": 128-45, \n \"y0\": 20, \n \"x1\": 128, \n \"y1\": 20, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 300,
"wires": [
[
"a75ef69e75c916fe"
]
]
},
{
"id": "b5bc761920e06485",
"type": "function",
"z": "086f4a588641fe21",
"name": "Pixel",
"func": "msg.payload = [\n [2, 64-10, 1],\n [128-2,64-10,1] \n]\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 340,
"wires": [
[
"db8cc6b1ad686481"
]
]
},
{
"id": "7d85112a8a03bcc1",
"type": "function",
"z": "086f4a588641fe21",
"name": "clock",
"func": "var date = new Date();\nvar hour = date.getHours();\nhour = (hour < 10 ? \"0\" : \"\") + hour;\nvar min = date.getMinutes();\nmin = (min < 10 ? \"0\" : \"\") + min;\nvar sec = date.getSeconds();\nsec = (sec < 10 ? \"0\" : \"\") + sec;\n\nmsg.payload = { \n \"size\": 1, \n \"x\": 50, \n \"y\": 64-6,\n \"font\": \"oled_3x5\", \n \"text\": hour + \":\" + min + \":\" + sec\n}\n\nsetInterval(()=>{\n date = new Date();\n hour = date.getHours();\n hour = (hour < 10 ? \"0\" : \"\") + hour;\n min = date.getMinutes();\n min = (min < 10 ? \"0\" : \"\") + min;\n sec = date.getSeconds();\n sec = (sec < 10 ? \"0\" : \"\") + sec;\n\n msg.payload = {\n \"size\": 1,\n \"x\": 50,\n \"y\": 64 - 6,\n \"font\": \"oled_3x5\",\n \"text\": hour + \":\" + min + \":\" + sec\n }\n node.send(msg);\n},1000)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 380,
"wires": [
[
"b1a48389f04489ee"
]
]
},
{
"id": "f1ecfba05a272407",
"type": "function",
"z": "086f4a588641fe21",
"name": "Wifi",
"func": "this.p = 0;\nmsg.payload={\n \"x\":128-20,\n \"y\":1,\n \"p\": this.p\n}\nsetInterval(()=>{\n this.p = (this.p+10)%100;\n msg.payload = {\n \"x\": 128-20,\n \"y\": 1,\n \"p\": this.p\n }\n node.send(msg);\n},1000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 420,
"wires": [
[
"9f314d2e44d8fdea"
]
]
},
{
"id": "f457018212fd39be",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Clear",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 710,
"y": 360,
"wires": [
[
"e9ea2875386e1679"
]
]
},
{
"id": "57afe67794c17842",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Dimm",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 710,
"y": 120,
"wires": [
[
"f03b68a8361c40de"
]
]
},
{
"id": "2dce195f28d2de04",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Bright",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 710,
"y": 160,
"wires": [
[
"f03b68a8361c40de"
]
]
},
{
"id": "4fdda09de6366599",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Invert",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 710,
"y": 200,
"wires": [
[
"3d36ccb99cfa1c11"
]
]
},
{
"id": "b26dc8d4bb5f8ab6",
"type": "inject",
"z": "086f4a588641fe21",
"name": "Normal",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 710,
"y": 240,
"wires": [
[
"3d36ccb99cfa1c11"
]
]
},
{
"id": "ad634722837e21f0",
"type": "inject",
"z": "086f4a588641fe21",
"name": "ON",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 710,
"y": 320,
"wires": [
[
"d03124b7308d9734"
]
]
},
{
"id": "ec511ff5a88a88ea",
"type": "inject",
"z": "086f4a588641fe21",
"name": "OFF",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 710,
"y": 280,
"wires": [
[
"64a2f11f18701826"
]
]
},
{
"id": "c3d9c324f77c18e9",
"type": "Battery",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 460,
"y": 60,
"wires": []
},
{
"id": "dd5dad139e531e2d",
"type": "Bluetooth",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 460,
"y": 100,
"wires": []
},
{
"id": "e9ea2875386e1679",
"type": "Clear",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 870,
"y": 360,
"wires": []
},
{
"id": "f03b68a8361c40de",
"type": "Dimmed",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 880,
"y": 140,
"wires": []
},
{
"id": "6bdb803707dc8a16",
"type": "FillRectangle",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 470,
"y": 160,
"wires": []
},
{
"id": "3d36ccb99cfa1c11",
"type": "Invertion",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 880,
"y": 220,
"wires": []
},
{
"id": "afdd49d736f4d2dd",
"type": "Image",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 450,
"y": 220,
"wires": []
},
{
"id": "a75ef69e75c916fe",
"type": "Line",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 450,
"y": 280,
"wires": []
},
{
"id": "db8cc6b1ad686481",
"type": "Pixel",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 450,
"y": 340,
"wires": []
},
{
"id": "b1a48389f04489ee",
"type": "String",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 450,
"y": 380,
"wires": []
},
{
"id": "d03124b7308d9734",
"type": "Turn-on",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 880,
"y": 320,
"wires": []
},
{
"id": "64a2f11f18701826",
"type": "Turn-off",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 880,
"y": 280,
"wires": []
},
{
"id": "9f314d2e44d8fdea",
"type": "Wifi",
"z": "086f4a588641fe21",
"name": "",
"display": "3d479988bbd3748e",
"x": 450,
"y": 420,
"wires": []
},
{
"id": "60e5680223c98abd",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 300,
"wires": [
[
"cb64138c59ca66d7",
"5f87a7480b949afe",
"31249837d900d3a1",
"3faed906f3fefdaf",
"f7882bb6e7e6794d",
"c7cb48f9ffe07750",
"76bebe0d545ce074",
"80628c121e4cb207",
"efbc643efa5e164a",
"a528b38ae687a3d9"
]
]
},
{
"id": "cb64138c59ca66d7",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Battery",
"func": "this.p = 0;\nmsg.payload={\n \"x\":1,\n \"y\":1,\n \"p\": this.p\n}\nsetInterval(()=>{\n this.p = (this.p+10)%100;\n msg.payload = {\n \"x\": 1,\n \"y\": 1,\n \"p\": this.p\n }\n node.send(msg);\n},1000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 120,
"wires": [
[
"6e9337ffcd98997c"
]
]
},
{
"id": "5f87a7480b949afe",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Bluetooth",
"func": "msg.payload={\n \"x\":25,\n \"y\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 160,
"wires": [
[
"9452025ccb0e57e0"
]
]
},
{
"id": "31249837d900d3a1",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "FillRectL",
"func": "msg.payload = { \n \"x\": 0, \n \"y\": 64-5, \n \"w\": 5,\n \"h\": 5, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 200,
"wires": [
[
"c4c0efb01a2e1d2c"
]
]
},
{
"id": "3faed906f3fefdaf",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "FillRectR",
"func": "msg.payload = { \n \"x\": 128-5, \n \"y\": 64-5, \n \"w\": 5,\n \"h\": 5, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 240,
"wires": [
[
"c4c0efb01a2e1d2c"
]
]
},
{
"id": "f7882bb6e7e6794d",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Image",
"func": "msg.payload = { \n \"image\": \"OledClockWhite.png\", \n \"x\": 48, \n \"y\": 17, \n \"clear\": false, \n \"animated\": false \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 280,
"wires": [
[
"21bde2e75f19869a"
]
]
},
{
"id": "c7cb48f9ffe07750",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Line Left",
"func": "msg.payload = { \n \"x0\": 0, \n \"y0\": 20, \n \"x1\": 45, \n \"y1\": 20, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 320,
"wires": [
[
"455727cd4a0c63af"
]
]
},
{
"id": "76bebe0d545ce074",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Line Right",
"func": "msg.payload = { \n \"x0\": 128-45, \n \"y0\": 20, \n \"x1\": 128, \n \"y1\": 20, \n \"color\": 1 \n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 360,
"wires": [
[
"455727cd4a0c63af"
]
]
},
{
"id": "80628c121e4cb207",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Pixel",
"func": "msg.payload = [\n [2, 64-10, 1],\n [128-2,64-10,1] \n]\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 400,
"wires": [
[
"ac1cc8123e567c61"
]
]
},
{
"id": "efbc643efa5e164a",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "clock",
"func": "var date = new Date();\nvar hour = date.getHours();\nhour = (hour < 10 ? \"0\" : \"\") + hour;\nvar min = date.getMinutes();\nmin = (min < 10 ? \"0\" : \"\") + min;\nvar sec = date.getSeconds();\nsec = (sec < 10 ? \"0\" : \"\") + sec;\n\nmsg.payload = { \n \"size\": 1, \n \"x\": 50, \n \"y\": 64-6,\n \"font\": \"oled_3x5\", \n \"text\": hour + \":\" + min + \":\" + sec\n}\n\nsetInterval(()=>{\n date = new Date();\n hour = date.getHours();\n hour = (hour < 10 ? \"0\" : \"\") + hour;\n min = date.getMinutes();\n min = (min < 10 ? \"0\" : \"\") + min;\n sec = date.getSeconds();\n sec = (sec < 10 ? \"0\" : \"\") + sec;\n\n msg.payload = {\n \"size\": 1,\n \"x\": 50,\n \"y\": 64 - 6,\n \"font\": \"oled_3x5\",\n \"text\": hour + \":\" + min + \":\" + sec\n }\n node.send(msg);\n},1000)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 440,
"wires": [
[
"28bd5970e5a524c1"
]
]
},
{
"id": "a528b38ae687a3d9",
"type": "function",
"z": "a9e9290cc1452c4e",
"name": "Wifi",
"func": "this.p = 0;\nmsg.payload={\n \"x\":128-20,\n \"y\":1,\n \"p\": this.p\n}\nsetInterval(()=>{\n this.p = (this.p+10)%100;\n msg.payload = {\n \"x\": 128-20,\n \"y\": 1,\n \"p\": this.p\n }\n node.send(msg);\n},1000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 480,
"wires": [
[
"d607430ed3c19487"
]
]
},
{
"id": "b9b8b949d8ae101f",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Clear",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 790,
"y": 420,
"wires": [
[
"a6bf5100a66c4211"
]
]
},
{
"id": "13d05acdcd9a8c66",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Dimm",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 790,
"y": 180,
"wires": [
[
"c670cfc0fe15c8fb"
]
]
},
{
"id": "0de48fd35371e987",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Bright",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 790,
"y": 220,
"wires": [
[
"c670cfc0fe15c8fb"
]
]
},
{
"id": "39deb672d5ccd51a",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Invert",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 790,
"y": 260,
"wires": [
[
"8647d770da36bc56"
]
]
},
{
"id": "80fa0b4b4315b4ab",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "Normal",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 790,
"y": 300,
"wires": [
[
"8647d770da36bc56"
]
]
},
{
"id": "4be1110b5e35c0b3",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "ON",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 790,
"y": 380,
"wires": [
[
"8563002d516d29bb"
]
]
},
{
"id": "20ecc1fa9977810a",
"type": "inject",
"z": "a9e9290cc1452c4e",
"name": "OFF",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 790,
"y": 340,
"wires": [
[
"edc47dd4d02b9354"
]
]
},
{
"id": "6e9337ffcd98997c",
"type": "Battery",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 540,
"y": 120,
"wires": []
},
{
"id": "9452025ccb0e57e0",
"type": "Bluetooth",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 540,
"y": 160,
"wires": []
},
{
"id": "a6bf5100a66c4211",
"type": "Clear",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 950,
"y": 420,
"wires": []
},
{
"id": "c670cfc0fe15c8fb",
"type": "Dimmed",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 960,
"y": 200,
"wires": []
},
{
"id": "c4c0efb01a2e1d2c",
"type": "FillRectangle",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 550,
"y": 220,
"wires": []
},
{
"id": "8647d770da36bc56",
"type": "Invertion",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 960,
"y": 280,
"wires": []
},
{
"id": "21bde2e75f19869a",
"type": "Image",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 530,
"y": 280,
"wires": []
},
{
"id": "455727cd4a0c63af",
"type": "Line",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 530,
"y": 340,
"wires": []
},
{
"id": "ac1cc8123e567c61",
"type": "Pixel",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 530,
"y": 400,
"wires": []
},
{
"id": "28bd5970e5a524c1",
"type": "String",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 530,
"y": 440,
"wires": []
},
{
"id": "8563002d516d29bb",
"type": "Turn-on",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 960,
"y": 380,
"wires": []
},
{
"id": "edc47dd4d02b9354",
"type": "Turn-off",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 960,
"y": 340,
"wires": []
},
{
"id": "d607430ed3c19487",
"type": "Wifi",
"z": "a9e9290cc1452c4e",
"name": "",
"display": "3d479988bbd3748e",
"x": 530,
"y": 480,
"wires": []
},
{
"id": "8084e8540b072f21",
"type": "rc522",
"z": "e3ffbfdc8270d7f0",
"name": "",
"blockedFor": 5,
"x": 90,
"y": 40,
"wires": [
[
"a9811cd399a17337"
]
]
},
{
"id": "b3978ef73f24ed90",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Display UID",
"func": "msg.payload = {\n \"x\":1,\n \"y\":25,\n \"text\":\"ID: \"+msg.payload.uid.toUpperCase(),\n \"size\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 100,
"wires": [
[
"b05a1ca606da21c3"
]
]
},
{
"id": "033bf0001f973ca1",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Battery Level",
"func": "msg.payload = {\n \"x\":128-20,\n \"y\":1,\n \"p\":Math.floor(Math.random()*100)\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 250,
"y": 160,
"wires": [
[
"8b16d2d91f30f510",
"d0c1e1d903f39827"
]
]
},
{
"id": "d0c1e1d903f39827",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "WiFi Signal",
"func": "msg.payload = {\n \"ssid\":\"UTM_Wifi\",\n \"x\":0,\n \"y\":1,\n \"p\": Math.floor(Math.random()*100)\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 220,
"wires": [
[
"385f3392586b455f",
"2d364841f4da3e78"
]
]
},
{
"id": "385f3392586b455f",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Display SSID",
"func": "msg.payload = {\n \"x\":25,\n \"y\":5,\n \"text\":msg.payload.ssid,\n \"size\":1,\n \"font\":\"oled_3x5\"\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 530,
"y": 260,
"wires": [
[
"8b38ecce702501c7"
]
]
},
{
"id": "a9811cd399a17337",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "uid",
"pt": "flow",
"to": "payload.uid",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 100,
"wires": [
[
"b3978ef73f24ed90",
"033bf0001f973ca1"
]
]
},
{
"id": "8b16d2d91f30f510",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "battery",
"pt": "flow",
"to": "payload.p",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 160,
"wires": [
[
"9238f3e80cfa7666"
]
]
},
{
"id": "2d364841f4da3e78",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "wifi_signal",
"pt": "flow",
"to": "payload.p",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 220,
"wires": [
[
"f2566113045c7af2"
]
]
},
{
"id": "8b38ecce702501c7",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "wifi_ssid",
"pt": "flow",
"to": "payload.text",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 700,
"y": 260,
"wires": [
[
"7adad44851e28a4e",
"0d1388b41eb277bc"
]
]
},
{
"id": "26c54bb1c4cabd4d",
"type": "rpi-gpio in",
"z": "e3ffbfdc8270d7f0",
"name": "Push Button",
"pin": "12",
"intype": "up",
"debounce": "25",
"read": true,
"bcm": true,
"x": 110,
"y": 780,
"wires": [
[
"7e78e582f7de4e54"
]
]
},
{
"id": "7e78e582f7de4e54",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "button",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 780,
"wires": [
[
"2850a16768217f88"
]
]
},
{
"id": "de613a25b9a89156",
"type": "inject",
"z": "e3ffbfdc8270d7f0",
"name": "Button Indicator",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "0",
"topic": "",
"payload": "",
"payloadType": "str",
"x": 140,
"y": 620,
"wires": [
[
"26d88e57cda5f4ba",
"63ce1d897eaab8a3",
"f8ab90e102969401",
"1ff20585e1b262aa",
"c8e9a917d2a65975"
]
]
},
{
"id": "26d88e57cda5f4ba",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Label",
"func": "msg.payload = {\n \"x\": 1,\n \"y\" :38,\n \"text\":\"Button:\",\n \"size\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 540,
"wires": [
[
"fe3a0d9c858f0e73"
]
]
},
{
"id": "63ce1d897eaab8a3",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 1",
"func": "msg.payload = {\n \"x0\": 45,\n \"y0\" :35,\n \"x1\": 55,\n \"y1\": 35,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 580,
"wires": [
[
"eb40af51d1ce438e"
]
]
},
{
"id": "f8ab90e102969401",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 4",
"func": "msg.payload = {\n \"x0\": 45,\n \"y0\" :45,\n \"x1\": 55,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 700,
"wires": [
[
"2d9beb75a348b841"
]
]
},
{
"id": "1ff20585e1b262aa",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 2",
"func": "msg.payload = {\n \"x0\": 45,\n \"y0\" :35,\n \"x1\": 45,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 620,
"wires": [
[
"1d7516c067933dc0"
]
]
},
{
"id": "c8e9a917d2a65975",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 3",
"func": "msg.payload = {\n \"x0\": 55,\n \"y0\" :35,\n \"x1\": 55,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 660,
"wires": [
[
"fd330cb131ec3c2e"
]
]
},
{
"id": "a5f3c598fd756fc9",
"type": "inject",
"z": "e3ffbfdc8270d7f0",
"name": "Buzzer Indicator",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "0",
"topic": "",
"payload": "",
"payloadType": "str",
"x": 140,
"y": 1020,
"wires": [
[
"3801dee33472d6b5",
"287a60f0f4cdda7f",
"106296e18a537dd4",
"12ecd2e764b6cf1c",
"63d00d1155be8f7f"
]
]
},
{
"id": "3801dee33472d6b5",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Label-Buzzer",
"func": "msg.payload = {\n \"x\": 60,\n \"y\" :38,\n \"text\":\"Buzzer:\",\n \"size\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 940,
"wires": [
[
"b985d80ca1850a42"
]
]
},
{
"id": "287a60f0f4cdda7f",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 1",
"func": "msg.payload = {\n \"x0\": 105,\n \"y0\" :35,\n \"x1\": 115,\n \"y1\": 35,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 980,
"wires": [
[
"ebbaacd44794b1d8"
]
]
},
{
"id": "63d00d1155be8f7f",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 4",
"func": "msg.payload = {\n \"x0\": 105,\n \"y0\" :45,\n \"x1\": 115,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 1100,
"wires": [
[
"ec5dc330a48ed84d"
]
]
},
{
"id": "106296e18a537dd4",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 2",
"func": "msg.payload = {\n \"x0\": 105,\n \"y0\" :35,\n \"x1\": 105,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 1020,
"wires": [
[
"1c20de95ccca85d3"
]
]
},
{
"id": "12ecd2e764b6cf1c",
"type": "function",
"z": "e3ffbfdc8270d7f0",
"name": "Checkbox 3",
"func": "msg.payload = {\n \"x0\": 115,\n \"y0\" :35,\n \"x1\": 115,\n \"y1\": 45,\n \"color\":1\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 1060,
"wires": [
[
"f6932143b224c143"
]
]
},
{
"id": "2850a16768217f88",
"type": "switch",
"z": "e3ffbfdc8270d7f0",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "0",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 490,
"y": 780,
"wires": [
[
"d2aa3f54f88fe1fe"
],
[
"da7d6be87f34e1af"
]
]
},
{
"id": "d2aa3f54f88fe1fe",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "Tick",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"x\":46,\"y\":36,\"w\":9,\"h\":9,\"color\":1}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 760,
"wires": [
[
"2db544e006d8a78f",
"4f4b5f99e938972c"
]
]
},
{
"id": "da7d6be87f34e1af",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "Untick",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"x\":46,\"y\":36,\"w\":9,\"h\":9,\"color\":0}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 800,
"wires": [
[
"89a9527f31ee5919",
"4f4b5f99e938972c"
]
]
},
{
"id": "354354a1ac7f0586",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "",
"rules": [
{
"t": "set",
"p": "buzzer",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 340,
"y": 1180,
"wires": [
[
"762761905eb8e0ea",
"9ac7d8ae5c2cf4ea"
]
]
},
{
"id": "762761905eb8e0ea",
"type": "switch",
"z": "e3ffbfdc8270d7f0",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "0",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 1180,
"wires": [
[
"190c173515208133"
],
[
"3d864435638957c1"
]
]
},
{
"id": "190c173515208133",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "Tick",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"x\":106,\"y\":36,\"w\":9,\"h\":9,\"color\":1}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 1140,
"wires": [
[
"3a0ef86cf204e499",
"6fe648654e226267"
]
]
},
{
"id": "3d864435638957c1",
"type": "change",
"z": "e3ffbfdc8270d7f0",
"name": "Untick",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"x\":106,\"y\":36,\"w\":9,\"h\":9,\"color\":0}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 1200,
"wires": [
[
"3fb19c030bea1d23",
"6fe648654e226267"
]
]
},
{
"id": "c63e54da12337866",
"type": "inject",
"z": "e3ffbfdc8270d7f0",
"name": "Buzzer On",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "0",
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 120,
"y": 1140,
"wires": [
[
"354354a1ac7f0586"
]
]
},
{
"id": "d02ed706ad69a482",
"type": "inject",
"z": "e3ffbfdc8270d7f0",
"name": "Buzzer Off",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "0",
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 120,
"y": 1220,
"wires": [
[
"354354a1ac7f0586"
]
]
},
{
"id": "9ac7d8ae5c2cf4ea",
"type": "rpi-gpio out",
"z": "e3ffbfdc8270d7f0",
"name": "Buzzer",
"pin": "26",
"set": true,
"level": "0",
"freq": "",
"out": "out",
"bcm": true,
"x": 520,
"y": 1240,
"wires": []
},
{
"id": "d60ab0ea723ec36e",
"type": "inject",
"z": "e3ffbfdc8270d7f0",
"name": "LEDsIndicator",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "0",
"topic": "",
"payload": "",
"payloadType": "str",
"x": 140,
"y": 1560,
"wires": [
[
"1fa7f5c6f8552248",
"d37fd98150cdf819",
"c09d90c5116e906c",
"a90a4b7c556876a7",
"e04d63f9f3b49682",
"0b461d5f108271a9",
"c76cd5fba4975745",
"2ab74fe10cd9a7f2",
"ddadbfe92042d9b7",
"ac17e8167e7006fa",
"c622f84284196d01",
"c77723b1cbb4501d",
"14afbf78d5c