Domoticz/out to node red, delete parts of msg.payload

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
afbeelding

After that a change-node to delete parts of the msg.payload.
afbeelding
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": ""
    }
]

While it's possible that your input data before the json node does contain the strings "name":"D1 zolder" or "name":"D4-Thermostaat", I think a more correct switch node would be like this:
Untitled 5

Note thet you can set the mqtt-in node to output a parsed JSON object and so get rid of the json node.

The "Manage humidity" node seems to contribute little of value.

Does msg.payload.name really sometimes have a hyphen and sometimes a space?

Hi,

The change suggested results in zero-output, so no luck.
I do not understand your remark of a parsed json-object. Please give an example.
Yes, sometimes a space and somtimes a hyphen

Paul

I think the default, auto detect mode of the mqtt node was recently improved.
It might no longer make much difference to specify "a parsed JSON object".

Can you show us the output of your "debug 16" and "debug 17" nodes?

Thanks,
I used the autodectect-option.
Here a part of the debug-output.

The debug 16 object has the format as in my first email.
Paul

16-2-2023 21:20:07node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:09", RSSI: 12, description: "", dtype: "P1 Smart Meter" … }
16-2-2023 21:20:07node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:09", RSSI: 12, description: "", dtype: "Temp" … }
16-2-2023 21:20:07node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:09", RSSI: 12, description: "via script "E4 temp-hum dummy"…", dtype: "Humidity" … }
16-2-2023 21:20:08node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:10", RSSI: 12, description: "", dtype: "P1 Smart Meter" … }
16-2-2023 21:20:08node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:10", RSSI: 12, description: "", dtype: "Temp" … }
16-2-2023 21:20:08node: debug 16
domoticz/out : msg.payload : Object

{ Battery: 255, LastUpdate: "2023-02-16 21:20:10", RSSI: 12, description: "via script "E4 temp-hum dummy"…", dtype: "Humidity" … }
16-2-2023 21:20:10node: debug 17
domoticz/out : msg.payload : string[305]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:12","RSSI":12,"description":"","dtype":"P1 Smart Meter","hwid":"14","id":"0001","idx":1395,"name":"Energy xxx60","nvalue":0,"stype":"Energy","svalue1":"6533578","svalue2":"6670284","svalue3":"552291","svalue4":"1385258","svalue5":"438","svalue6":"0","unit":1}"","unit":1}"
16-2-2023 21:20:14node: debug 17
domoticz/out : msg.payload : string[305]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:16","RSSI":12,"description":"","dtype":"P1 Smart Meter","hwid":"14","id":"0001","idx":1395,"name":"Energy xxx60","nvalue":0,"stype":"Energy","svalue1":"6533578","svalue2":"6670285","svalue3":"552291","svalue4":"1385258","svalue5":"437","svalue6":"0","unit":1}"
16-2-2023 21:20:14node: debug 17
domoticz/out : msg.payload : string[260]

"{"Battery":100,"LastUpdate":"2023-02-16 21:20:16","RSSI":6,"description":"","dtype":"Temp + Humidity","hwid":"2","id":"6302","idx":5684,"name":"E10 - mkast vloer","nvalue":0,"stype":"Rubicson/IW008T/TX95","svalue1":"15.2","svalue2":"74","svalue3":"3","unit":2}"
16-2-2023 21:20:14node: debug 17
domoticz/out : msg.payload : string[222]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:16","RSSI":12,"description":"","dtype":"Temp","hwid":"19","id":"1592C","idx":6364,"name":"E4 Meterkast Temp dummy","nvalue":0,"stype":"LaCrosse TX3","svalue1":"17.50","unit":1}"
16-2-2023 21:20:14node: debug 17
domoticz/out : msg.payload : string[302]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:16","RSSI":12,"description":"via script "E4 temp-hum dummy". 0,5% gecorrigeerd. script draait elke 5 min.","dtype":"Humidity","hwid":"18","id":"1592B","idx":6363,"name":"E4 Meterkast Hum dummy","nvalue":63,"stype":"LaCrosse TX3","svalue1":"1","unit":1}"
16-2-2023 21:20:15node: debug 17
domoticz/out : msg.payload : string[222]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:17","RSSI":12,"description":"","dtype":"Temp","hwid":"19","id":"1592C","idx":6364,"name":"E4 Meterkast Temp dummy","nvalue":0,"stype":"LaCrosse TX3","svalue1":"17.50","unit":1}"
16-2-2023 21:20:15node: debug 17
domoticz/out : msg.payload : string[302]

"{"Battery":255,"LastUpdate":"2023-02-16 21:20:17","RSSI":12,"description":"via script "E4 temp-hum dummy". 0,5% gecorrigeerd. script draait elke 5 min.","dtype":"Humidity","hwid":"18","id":"1592B","idx":6363,"name":"E4 Meterkast Hum dummy","nvalue":63,"stype":"LaCrosse TX3","svalue1":"1","unit":1}"

It looks like you need to tidy up the source of those messages.
Some seem to be valid JSON - for instance

Others are not. This clearly has spurious characters "","unit":1}" at the end.

And this is just a confusing mess around "description":"via script "E4 temp-hum dummy". 0,5% gecorrigeerd. script draait elke 5 min."

Oke, thanks for your remarks, but i cann‘t do anything with it. This is the output Domoticz/out sends and cann‘t be changed. Ofcourse i can delete the descriptionpart from some sensors, but that is not the solution. In the example i showed the sensor „D1 zolder“ and that sensor has an empty description.

As i wrote, i should be possible to delete some parts of the msg.payload, but that did not worked either. See picture of the Change-node

Regards
Paul

You need to review your Dominico settings for each of the devices and if you can't firmer out why the data is not being formatted as a valid object, then you should open a issue on the Domoticz forum to find out how to get the MQTT data correctly built.

While you could fix the data in NR you would be jumping thru hoops and have possible maintenance nightmare.

That said, here is one way to fix a two of the bad messages:

[{"id":"2a966a1198899081","type":"inject","z":"1fa8a63bdbe537ed","name":"has extra data at end","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Battery\":255,\"LastUpdate\":\"2023-02-16 21:20:12\",\"RSSI\":12,\"description\":\"\",\"dtype\":\"P1 Smart Meter\",\"hwid\":\"14\",\"id\":\"0001\",\"idx\":1395,\"name\":\"Energy xxx60\",\"nvalue\":0,\"stype\":\"Energy\",\"svalue1\":\"6533578\",\"svalue2\":\"6670284\",\"svalue3\":\"552291\",\"svalue4\":\"1385258\",\"svalue5\":\"438\",\"svalue6\":\"0\",\"unit\":1}\"\",\"unit\":1}","payloadType":"str","_mcu":{"mcu":false},"x":160,"y":120,"wires":[["ef971785e9d2b96c","14a074d092eddb02"]]},{"id":"5a99d921e3521a0e","type":"debug","z":"1fa8a63bdbe537ed","name":"debug 370","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","_mcu":{"mcu":false},"x":830,"y":340,"wires":[]},{"id":"c7d01352ce5e8724","type":"change","z":"1fa8a63bdbe537ed","name":"remove extra data","rules":[{"t":"change","p":"payload","pt":"msg","from":"\"\",\"unit\":1}","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"_mcu":{"mcu":false},"x":370,"y":220,"wires":[["2d2c59d65736568d"]]},{"id":"ef971785e9d2b96c","type":"debug","z":"1fa8a63bdbe537ed","name":"debug 371","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","_mcu":{"mcu":false},"x":810,"y":100,"wires":[]},{"id":"2d2c59d65736568d","type":"json","z":"1fa8a63bdbe537ed","name":"","property":"payload","action":"","pretty":false,"_mcu":{"mcu":false},"x":530,"y":340,"wires":[["5a99d921e3521a0e"]]},{"id":"14a074d092eddb02","type":"switch","z":"1fa8a63bdbe537ed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"}\"\",\"unit\":1}","vt":"str"},{"t":"cont","v":"\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\"","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"_mcu":{"mcu":false},"x":150,"y":240,"wires":[["c7d01352ce5e8724"],["bb892e32fa179dbf"],["2d2c59d65736568d"]]},{"id":"40558e29495ffa21","type":"inject","z":"1fa8a63bdbe537ed","name":"has double quotes in double quotes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Battery\":255,\"LastUpdate\":\"2023-02-16 21:20:16\",\"RSSI\":12,\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\",\"dtype\":\"Humidity\",\"hwid\":\"18\",\"id\":\"1592B\",\"idx\":6363,\"name\":\"E4 Meterkast Hum dummy\",\"nvalue\":63,\"stype\":\"LaCrosse TX3\",\"svalue1\":\"1\",\"unit\":1}","payloadType":"str","_mcu":{"mcu":false},"x":200,"y":80,"wires":[["14a074d092eddb02","ef971785e9d2b96c"]]},{"id":"bb892e32fa179dbf","type":"change","z":"1fa8a63bdbe537ed","name":"change \" to '","rules":[{"t":"change","p":"payload","pt":"msg","from":"\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\"","fromt":"str","to":"\"description\":\"via script 'E4 temp-hum dummy'. 0,5% gecorrigeerd. script draait elke 5 min.\"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"_mcu":{"mcu":false},"x":370,"y":260,"wires":[["2d2c59d65736568d"]]}]

Looking again at the debug outputs you posted again, I see a few problems. Did you edit these messages before posting them?

  1. All of the messages as received from MQTT "debug 16" seem to be incomplete, with sections replaced by "..."
  2. I can't see how those "debug 17" messages which are not valid JSON can exist since they appear to be the output of a JSON node.
  3. The message which has extra characters at the end of otherwise valid JSON may be a copy/paste error.
  4. Two messages contain double quote characters in the description.
  5. None of these messages are examples of "D1 Zolder" or "D4-Thermostaat"

It should be possible to clean up the data before the JSON node. A change node like this works for the "debug 17" message you showed.

[{"id":"2a966a1198899081","type":"inject","z":"1fa8a63bdbe537ed","name":"has extra data at end","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Battery\":255,\"LastUpdate\":\"2023-02-16 21:20:12\",\"RSSI\":12,\"description\":\"\",\"dtype\":\"P1 Smart Meter\",\"hwid\":\"14\",\"id\":\"0001\",\"idx\":1395,\"name\":\"Energy xxx60\",\"nvalue\":0,\"stype\":\"Energy\",\"svalue1\":\"6533578\",\"svalue2\":\"6670284\",\"svalue3\":\"552291\",\"svalue4\":\"1385258\",\"svalue5\":\"438\",\"svalue6\":\"0\",\"unit\":1}\"\",\"unit\":1}","payloadType":"str","_mcu":{"mcu":false},"x":160,"y":120,"wires":[["ef971785e9d2b96c","14a074d092eddb02"]]},{"id":"5a99d921e3521a0e","type":"debug","z":"1fa8a63bdbe537ed","name":"debug 370","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","_mcu":{"mcu":false},"x":830,"y":340,"wires":[]},{"id":"c7d01352ce5e8724","type":"change","z":"1fa8a63bdbe537ed","name":"remove extra data","rules":[{"t":"change","p":"payload","pt":"msg","from":"\"\",\"unit\":1}","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"_mcu":{"mcu":false},"x":370,"y":220,"wires":[["2d2c59d65736568d"]]},{"id":"ef971785e9d2b96c","type":"debug","z":"1fa8a63bdbe537ed","name":"debug 371","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","_mcu":{"mcu":false},"x":810,"y":100,"wires":[]},{"id":"2d2c59d65736568d","type":"json","z":"1fa8a63bdbe537ed","name":"","property":"payload","action":"","pretty":false,"_mcu":{"mcu":false},"x":530,"y":340,"wires":[["5a99d921e3521a0e"]]},{"id":"14a074d092eddb02","type":"switch","z":"1fa8a63bdbe537ed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"}\"\",\"unit\":1}","vt":"str"},{"t":"cont","v":"\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\"","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"_mcu":{"mcu":false},"x":150,"y":240,"wires":[["c7d01352ce5e8724"],["bb892e32fa179dbf"],["2d2c59d65736568d"]]},{"id":"40558e29495ffa21","type":"inject","z":"1fa8a63bdbe537ed","name":"has double quotes in double quotes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Battery\":255,\"LastUpdate\":\"2023-02-16 21:20:16\",\"RSSI\":12,\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\",\"dtype\":\"Humidity\",\"hwid\":\"18\",\"id\":\"1592B\",\"idx\":6363,\"name\":\"E4 Meterkast Hum dummy\",\"nvalue\":63,\"stype\":\"LaCrosse TX3\",\"svalue1\":\"1\",\"unit\":1}","payloadType":"str","_mcu":{"mcu":false},"x":200,"y":80,"wires":[["14a074d092eddb02","ef971785e9d2b96c"]]},{"id":"bb892e32fa179dbf","type":"change","z":"1fa8a63bdbe537ed","name":"change \" to '","rules":[{"t":"change","p":"payload","pt":"msg","from":"\"description\":\"via script \"E4 temp-hum dummy\". 0,5% gecorrigeerd. script draait elke 5 min.\"","fromt":"str","to":"\"description\":\"via script 'E4 temp-hum dummy'. 0,5% gecorrigeerd. script draait elke 5 min.\"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"_mcu":{"mcu":false},"x":370,"y":260,"wires":[["2d2c59d65736568d"]]}]

Note: this shows an alternative way of deleting the description part of the message.
As @zenofmud just said, much better to clean up the data at source.
Perhaps you can replace double quotes with single in the source data description field?

Edit - I guess from the word Thermostaat and that you typed „D1 zolder“ that your native language is Dutch.
I wonder if the difficulty with quotes in the description is somehow related to locale settings on the Node-red or data source machines.

Hello @pgas37

Sorry for jumping in into this topic.

I'm a long time Domoticz and also a long time Node Red user (and also Dutch).
All my scripting for Domoticz is done in NR
So I read this whole thread and can understand that @jbudd is completely confused and also that @zenofmud wanted to see more accurate information.

A few things, without being rude, I like to point out.

  1. As you said you are a first time poster, you are probably also a new Node RED user.
    I suggest to look to the videos, published by the developers of Node RED

  2. You have to teach yourself a more accurate way of programming. Your way of programming is rather sloppy
    Example 1: You want to delete a msg.payload.Lastupdate, but that one does not exist.
    The payload from Domoticz contains LastUpdate and not Lastupdate.
    You should be more accurate

Example 2: One payload contains D1 zolder and another D4-Thermostaat.
The first one is a room (location), the second one is equipment (Mind also the location with small letters and the equipment with Capitals.

You focus a lot on deleting msg's from an object. Why? Usely people want to use a specific message in order to do something with it. So deletion of a msg is in general not necessary.

You should decide first which sensor/switch you want to use in NR.
I see you have indexes, like 5989, 6363, 6364,
Do you have that many device/switches in Domoticz. I do not hope.

You should first filter the correct idx in Node RED
You can do that in a switch node by filtering on msg.payload.idx and then the correct number!
And there is nothing to delete. You can simple pick up the msg.payload.svalue1 and/or svalue2 and do the preferred action.

But show us first your Domoticz MQTT configuration. And if you want you can contact me on the Domoticz forum as well.

Regards

1 Like

jbudd,

thanks for your assistance.
See my answer to Firewizard52

Regards
Paul

Zenofmud,
thanks for your assistance.
See my answer to Firewizard52

Regards
Paul

Unfortunately, I do not see any answer and I don't think that @jbudd and @zenofmud do see them.
Or am I impatient?

Firewizard52,

Thanks for your intervention.
First an answer to some of your questions:

  1. look for video's etc you suggested. I did, but as a new user not everything immediately falls into place.
  2. the same goes for your second point. After looking and reading you start with some examples you think you can use, but it turnes out differently. Sloppy as you said. Often it is fall and rise.

I leave the examples given for what they are because the solution is their and,
No i do not have several thousands of indexes. Every time when you delete in Domiticz unused devices and after that you add a new(dummy) device e.g. for testing , the given index is one above the last deleted device. And above all RFXcom picks up devices in the surrounding and give them an index.

I read your last paragraph about filtering the msg.payload.idx very well. The "simple" pickup of the values is for a new user not so simple but i succeeded. See the pic "debug 372-373-374'
With this flow i can take out any sensor data from Domoticz to the node red dasboard or outside to another application.
Thanks again for your help and i know where to find on the Domoticz-forum
regards
Paul


It certainly helps if the people's first language is the same and the helper is familiar with the user's setup (ie domoticz), so thanks for "jumping in" @FireWizard52.

@pgas37, as FireWizard said, you do not need to pass just {payload: 18.2} to your Temperatur gauge. You can pass the whole JSON formatted message and set the gauge value format to {{payload.svalue1}}

For future reference, if you click on this triangle

The object will be displayed like this, and you can copy it to paste in a forum with the button.
Untitled 2

I am still uncertain if your data is arriving in valid JSON format but I'm sure you are in good hands with FireWizard.

Hello @pgas37

Don't worry, your skills will improve by doing it and making mistakes.
Read forum posts and play with this stuff. (It's fun).

And yes, I know this is not a Node RED issue, but you said:

Every time when you delete in Domiticz unused devices and after that you add a new(dummy) device e.g. for testing , the given index is one above the last deleted device.

I know, and it's not recommended to correct that in the database.
It's better to use a separate system for testing, etc and don't use the same system as you use for production.

And above all RFXcom picks up devices in the surrounding and give them an index.

Disable "Accept new Hardware Devices" in your Settings and use "Allow for 5 minutes", if you are sure that there are new devices that you want to use.

@jbudd wrote:

It certainly helps if the people's first language is the same and the helper is familiar with the user's setup (ie domoticz), so thanks for "jumping in" @FireWizard52.

But we didn't speak Dutch with each other :grinning:, but it certainly helps that one recognise specific words, E.g. I know that a "zolder" is a room (attic). Thermostaat is easier.

And thank you for a better explanation of the payload. I was quite brief.

You said also:

I am still uncertain if your data is arriving in valid JSON format

Domoticz publish its data in JSON format, so that is okay. However, you have to filter the correct index.
This index is important in Domoticz, as it is also used as the entrance in the SQL3 database.
In principle you can als use to filter on msg.payload.name but this name you can change in Domoticz.
So I prefer always the msg.payload.idx.

As I see results in the screenshots of the dashboard for Temperature and Humidity, I assume it 's working. Probably it could be simplified, as you already suggested.

I assume, if there is anything else @pgas37 will react.

Regards

Nothing else (for the moment :slightly_smiling_face:) but my thanks for the help of Jbudd, Zenofmud and of course firewizard52
Regards
Paul

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.