I found on the forum several topics with similar content. Alse visited page about messages,but i cannot get the correct output. I am new so if anyone can help?
the output is like this:
Topic: domoticz/outQoS: 0
{
"Battery" : 100,
"LastUpdate" : "2023-02-16 13:51:37",
"RSSI" : 8,
"description" : "",
"dtype" : "Temp + Humidity",
"hwid" : "2",
"id" : "E001",
"idx" : 5989,
"name" : "D1 zolder",
"nvalue" : 0,
"stype" : "Rubicson/IW008T/TX95",
"svalue1" : "18.1",
"svalue2" : "65",
"svalue3" : "1",
"unit" : 1
}
I want to delete several parts of the message, like Battery, Lastupdate,RSSI, Description and some other.
First i filtered out the name "D1 zolder"
json convert=.>
switch
After that a change-node to delete parts of the msg.payload.
That part never works. I cannot delete anything, so the output is the same as above.
The goal is to extract the humidity value (svalue2|) and the temperature-value (svalue1),
but the debug "D1 zolder" is the same as above.
i wanted to export the flow, but new user are not allowed to do that, sorry
may this will help.
thanks
Paul
[
{
"id": "bb89265b4932b8be",
"type": "mqtt in",
"z": "14cc674f53931f57",
"name": "",
"topic": "domoticz/out/#",
"qos": "2",
"datatype": "auto-detect",
"broker": "852a6fb3.0961f",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 120,
"y": 420,
"wires": [
[
"4191f1bb05b29ed2",
"d6ec1ba77618a2b5"
]
]
},
{
"id": "4191f1bb05b29ed2",
"type": "json",
"z": "14cc674f53931f57",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 290,
"y": 420,
"wires": [
[
"3556053be54762a8",
"9f09c7565302c838"
]
]
},
{
"id": "d6ec1ba77618a2b5",
"type": "debug",
"z": "14cc674f53931f57",
"name": "debug 16",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 520,
"y": 340,
"wires": []
},
{
"id": "6fcc64b473977bf9",
"type": "debug",
"z": "14cc674f53931f57",
"name": "D4-Thermostaat",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 780,
"y": 540,
"wires": []
},
{
"id": "3556053be54762a8",
"type": "debug",
"z": "14cc674f53931f57",
"name": "debug 17",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 520,
"y": 380,
"wires": []
},
{
"id": "9f09c7565302c838",
"type": "switch",
"z": "14cc674f53931f57",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "\"name\":\"D1 zolder\"",
"vt": "str"
},
{
"t": "cont",
"v": "\"name\":\"D4-Thermostaat\"",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 190,
"y": 500,
"wires": [
[
"b833fe4d2a61dc38"
],
[
"6fcc64b473977bf9"
]
]
},
{
"id": "a081e236ee87f2c5",
"type": "debug",
"z": "14cc674f53931f57",
"name": "D1 zolder",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 800,
"y": 440,
"wires": []
},
{
"id": "b833fe4d2a61dc38",
"type": "change",
"z": "14cc674f53931f57",
"name": "",
"rules": [
{
"t": "delete",
"p": "payload.Battery",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.Lastupdate",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.RSSI",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.description",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.id",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.name",
"pt": "msg"
},
{
"t": "delete",
"p": "payload.unit",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 400,
"y": 480,
"wires": [
[
"b74a5d8386d1b6a0"
]
]
},
{
"id": "b74a5d8386d1b6a0",
"type": "change",
"z": "14cc674f53931f57",
"name": "Manage Humidity",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "",
"fromt": "str",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 460,
"wires": [
[
"a081e236ee87f2c5"
]
]
},
{
"id": "852a6fb3.0961f",
"type": "mqtt-broker",
"name": "p1monitor/out",
"broker": "127.0.0.1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"verifyservercert": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]