Flow Details
Reddit Karma Counter
[
{
"id": "dde282441d46ad1b",
"type": "group",
"z": "54b42d8d.cda474",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"f443ee22270579d8",
"3ce17def60cebce9",
"868ad65affc9b9c3",
"7fa87bf41d5e6bfb",
"9765b3217adf6d1f"
],
"x": 34,
"y": 1059,
"w": 772,
"h": 122
},
{
"id": "f443ee22270579d8",
"type": "inject",
"z": "54b42d8d.cda474",
"g": "dde282441d46ad1b",
"name": "",
"props": [],
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": "6",
"topic": "",
"x": 130,
"y": 1140,
"wires": [
[
"9765b3217adf6d1f"
]
]
},
{
"id": "3ce17def60cebce9",
"type": "function",
"z": "54b42d8d.cda474",
"g": "dde282441d46ad1b",
"name": "parser",
"func": "const stats = msg.payload.data;\nconst karma = stats.total_karma;\n\nmsg.payload = { \"text\": karma, \"icon\": \"reddit\" };\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 1140,
"wires": [
[
"868ad65affc9b9c3"
]
]
},
{
"id": "868ad65affc9b9c3",
"type": "mqtt out",
"z": "54b42d8d.cda474",
"g": "dde282441d46ad1b",
"name": "",
"topic": "awtrix/custom/reddit",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "346df2a95aac5785",
"x": 680,
"y": 1140,
"wires": []
},
{
"id": "7fa87bf41d5e6bfb",
"type": "comment",
"z": "54b42d8d.cda474",
"g": "dde282441d46ad1b",
"name": "Redit karma",
"info": "Change your username in the http request node",
"x": 150,
"y": 1100,
"wires": []
},
{
"id": "9765b3217adf6d1f",
"type": "http request",
"z": "54b42d8d.cda474",
"g": "dde282441d46ad1b",
"name": "",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "https://www.reddit.com/user/hongphuc95/about.json",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"credentials": {},
"x": 290,
"y": 1140,
"wires": [
[
"3ce17def60cebce9"
]
]
},
{
"id": "346df2a95aac5785",
"type": "mqtt-broker",
"name": "",
"broker": "localhost",
"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": ""
}
]
-- Flow first published on October 28, 2023, last updated on October 28, 2023 at 15:32.