Hoi
I have small issue, and i have no idea how to solve that
I bring some value's together via MQTT put them in a file.
I like to manipulate the order how they are placed in the file, but how to do this
This is the join output
debug value
/solo/threshold-clear : msg.payload : string[81]
string[81]
Heater. : 0 mySQM. : 0 SkyTemp. : -16.43 Temp. : 5.84 ClearThres.: -18
But like to have it for example like
ClearThres.: -18 SkyTemp. : -16.43 Temp. : 5.84 mySQM. : 0 Heater. : 0
Ore some other order
I hope some can help me
[
{
"id": "ebcb66b4.4be2f8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "c95c7286.767c58",
"type": "rpi-gpio out",
"z": "ebcb66b4.4be2f8",
"name": "",
"pin": "7",
"set": false,
"level": "0",
"freq": "",
"out": "out",
"x": 330,
"y": 460,
"wires": []
},
{
"id": "1a14e7de.51e",
"type": "rpi-gpio out",
"z": "ebcb66b4.4be2f8",
"name": "",
"pin": "11",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"x": 340,
"y": 500,
"wires": []
},
{
"id": "149fcf6a.df28c9",
"type": "rpi-gpio out",
"z": "ebcb66b4.4be2f8",
"name": "",
"pin": "13",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"x": 340,
"y": 420,
"wires": []
},
{
"id": "2a81398b.caa9c6",
"type": "rpi-gpio out",
"z": "ebcb66b4.4be2f8",
"name": "",
"pin": "15",
"set": true,
"level": "1",
"freq": "",
"out": "out",
"x": 340,
"y": 360,
"wires": []
},
{
"id": "d9c00408.36a7d",
"type": "inject",
"z": "ebcb66b4.4be2f8",
"name": "0 = OFF",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 120,
"y": 380,
"wires": [
[
"2a81398b.caa9c6"
]
]
},
{
"id": "7b95b0f5.3391e8",
"type": "inject",
"z": "ebcb66b4.4be2f8",
"name": "1 = ON",
"repeat": "21600",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 120,
"y": 420,
"wires": [
[
"2a81398b.caa9c6"
]
]
},
{
"id": "9d78f317.9862f8",
"type": "comment",
"z": "ebcb66b4.4be2f8",
"name": "Verbeteringen ",
"info": " - Heater act on MQTT\n Humidity\n Temperatuur\n Dewpoint\n Rain (Uur naar regen is koppel nog nat)",
"x": 110,
"y": 60,
"wires": []
},
{
"id": "66d9ca25.8a6904",
"type": "eztimer",
"z": "ebcb66b4.4be2f8",
"name": "",
"debug": false,
"autoname": "00:01:00 - sunriseEnd",
"tag": "eztimer",
"topic": "",
"suspended": false,
"sendEventsOnSuspend": false,
"latLongSource": "manual",
"lat": "52.841202",
"lon": "6.4395083",
"timerType": "1",
"startupMessage": true,
"ontype": "2",
"ontimesun": "sunrise",
"ontimetod": "00:01:00",
"onpropertytype": "msg",
"onproperty": "payload",
"onvaluetype": "num",
"onvalue": 1,
"onoffset": "0",
"onrandomoffset": 0,
"onsuppressrepeats": false,
"offtype": "1",
"offtimesun": "sunriseEnd",
"offtimetod": "dusk",
"offduration": "00:01:00",
"offpropertytype": "msg",
"offproperty": "payload",
"offvaluetype": "num",
"offvalue": 0,
"offoffset": "60",
"offrandomoffset": 0,
"offsuppressrepeats": false,
"resend": true,
"resendInterval": "30s",
"mon": true,
"tue": true,
"wed": true,
"thu": true,
"fri": true,
"sat": true,
"sun": true,
"x": 140,
"y": 300,
"wires": [
[
"2a81398b.caa9c6",
"a32acf64babc1d5a"
]
]
},
{
"id": "4268c46a2fd83a21",
"type": "comment",
"z": "ebcb66b4.4be2f8",
"name": "active Relay for heater",
"info": "",
"x": 540,
"y": 360,
"wires": []
},
{
"id": "4c74b7fd3e4faf10",
"type": "comment",
"z": "ebcb66b4.4be2f8",
"name": "Night terms explained",
"info": "** Dawn**; the first appearance of light in the sky before sun rise\n**Twilight**; The soft glow of light from the sky whne the sun is below the horizon, caused by the refelection of the suns rays from the atmosfeer\n**dusk**; the darker stage of twilight\n** night** is periode\n** sunrise ** is the start of the day - sun at horizon\n** sunset ** is the end of the day - sun at horizon\nhttps://www.timeanddate.com/astronomy/civil-twilight.html\n",
"x": 540,
"y": 300,
"wires": []
},
{
"id": "f2848857c951cb5d",
"type": "mqtt in",
"z": "ebcb66b4.4be2f8",
"name": "",
"topic": "/solo/skytemp",
"qos": "2",
"datatype": "utf8",
"broker": "f2ee8be3.4a5dc",
"nl": false,
"rap": false,
"x": 110,
"y": 160,
"wires": [
[
"5089b34bdf35ebc3"
]
]
},
{
"id": "f47bbf809e5e6657",
"type": "file",
"z": "ebcb66b4.4be2f8",
"name": "temperature",
"filename": "/home/pi/allsky/chris.txt",
"appendNewline": false,
"createDir": false,
"overwriteFile": "true",
"encoding": "utf8",
"x": 690,
"y": 220,
"wires": [
[]
]
},
{
"id": "5089b34bdf35ebc3",
"type": "function",
"z": "ebcb66b4.4be2f8",
"name": "",
"func": "var str = 'SkyTemp. : ' + msg.payload ;\nmsg.payload = str;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 160,
"wires": [
[
"2f8578808f278c36"
]
]
},
{
"id": "15abc48aefa026f3",
"type": "mqtt in",
"z": "ebcb66b4.4be2f8",
"name": "",
"topic": "/solo/threshold-clear",
"qos": "2",
"datatype": "utf8",
"broker": "f2ee8be3.4a5dc",
"nl": false,
"rap": false,
"x": 130,
"y": 200,
"wires": [
[
"6751e247aff27ab7"
]
]
},
{
"id": "2f8578808f278c36",
"type": "join",
"z": "ebcb66b4.4be2f8",
"name": "",
"mode": "custom",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "5",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 530,
"y": 220,
"wires": [
[
"f47bbf809e5e6657",
"a990bcbbd5354e1d"
]
]
},
{
"id": "a990bcbbd5354e1d",
"type": "debug",
"z": "ebcb66b4.4be2f8",
"name": "join",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 120,
"wires": []
},
{
"id": "6751e247aff27ab7",
"type": "function",
"z": "ebcb66b4.4be2f8",
"name": "",
"func": "var str = 'ClearThres.: ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 200,
"wires": [
[
"2f8578808f278c36"
]
]
},
{
"id": "a0cc5ceffc3cc114",
"type": "inject",
"z": "ebcb66b4.4be2f8",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "30",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 110,
"y": 260,
"wires": [
[
"b34027a2de0d9621"
]
]
},
{
"id": "b34027a2de0d9621",
"type": "function",
"z": "ebcb66b4.4be2f8",
"name": "",
"func": "var str = 'mySQM. : ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 260,
"wires": [
[
"2f8578808f278c36"
]
]
},
{
"id": "a32acf64babc1d5a",
"type": "function",
"z": "ebcb66b4.4be2f8",
"name": "",
"func": "var str = 'Heater. : ' + msg.payload;\nmsg.payload = str;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 300,
"wires": [
[
"2f8578808f278c36"
]
]
},
{
"id": "67abe6e1625918d8",
"type": "mqtt in",
"z": "ebcb66b4.4be2f8",
"name": "",
"topic": "/solo/temperature",
"qos": "2",
"datatype": "utf8",
"broker": "f2ee8be3.4a5dc",
"nl": false,
"rap": false,
"x": 130,
"y": 100,
"wires": [
[
"ef8a82ad3623ef62"
]
]
},
{
"id": "ef8a82ad3623ef62",
"type": "function",
"z": "ebcb66b4.4be2f8",
"name": "",
"func": "var str = 'Temp. : ' + msg.payload ;\nmsg.payload = str;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 100,
"wires": [
[
"2f8578808f278c36"
]
]
},
{
"id": "f2ee8be3.4a5dc",
"type": "mqtt-broker",
"name": "SterrenwachtDak",
"broker": "192.168.1.9",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]