Hello @lazaruss72, Hello Marco.
If I look to your screenshots, I see that the value is a string. (the color is red and it is between " "). I see also that you have multiple channels (chn0, chn1, chn2 and chn3). Perhaps more, that I cannot see. I noticed you want to use the data from chn1 and chn 2.
I suggest the following flow:

- Screenshot_vzlogger1.png (26.04 KiB) Viewed 2685 times
As we have (at least) 4 channels, from which we want to use only 2, I propose not to use wildcards, like + or #, but to create 2 MQTT Input nodes with the correct topic. This avoids that we have to remove the other, unused topics, which may interfere with the correct stream.
The data is a simple payload with the value in a string. If it is a number we have to modify the "function"node slightly.
These two topics are joined in a Join node, where the topic (vzlogger/data/chn1/raw and vzlogger/data/chn3/raw) is used as the "key".
The result, you will see in the screenshot below.
These values are used in the function node to prepare the correct data to Domoticz.
The correct syntax is: {"command":"udevice", "idx":1234, "svalue":"us;cu"}.
The command "command":"udevice" is the default command and therefore may be omitted, but for clarity. I left it in.
You have to insert your IDX number for the sensor you use (electric)
The svalue has always to be a string value. In this case two string variable (us and cu), separated by a semicolon (;).
This is prepared in the function node.
Code: Select all
var us = msg.payload["vzlogger/data/chn1/raw."];
var cu = msg.payload["vzlogger/data/chn3/raw."];
msg.payload = {"command":"udevice", "idx":45, "svalue":us + ";" + cu};
return msg;
If the data consists of a number (blue color and no " ") you have to make it as a string with the function as follows:
Code: Select all
var us = msg.payload["vzlogger/data/chn1/raw."].toString();
var cu = msg.payload["vzlogger/data/chn3/raw."].toString();
msg.payload = {"command":"udevice", "idx":45, "svalue":us + ";" + cu};
return msg;
The result is as follows:

- Screenshot_vzlogger2.png (18.82 KiB) Viewed 2685 times
and will give you this values in the sensor:

- Screenshot_vzlogger3.png (44.89 KiB) Viewed 2685 times
I entered just some figures, so keep in mind that cu is cumulative and the values are added.
The input should be in Wh, although the presentation wil be in kWh.
Please find attached the complete flow:
Code: Select all
[{"id":"258d3ca4.36a2ec","type":"mqtt in","z":"b49db3af.cc9f8","name":"","topic":"vzlogger/data/chn1/raw.","qos":"2","datatype":"json","broker":"f9f13036.e28b58","x":250,"y":260,"wires":[["5afd9f35.aa70f"]]},{"id":"97ca8bf2.e3361","type":"function","z":"b49db3af.cc9f8","name":"","func":"var us = msg.payload[\"vzlogger/data/chn1/raw.\"];\nvar cu = msg.payload[\"vzlogger/data/chn3/raw.\"];\n\nmsg.payload = {\"command\":\"udevice\", \"idx\":45, \"svalue\":us + \";\" + cu};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":320,"wires":[["f352fb59.cd04f","d0e46a68.0d0e08"]]},{"id":"f352fb59.cd04f","type":"debug","z":"b49db3af.cc9f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":422,"wires":[]},{"id":"d0e46a68.0d0e08","type":"mqtt out","z":"b49db3af.cc9f8","name":"","topic":"domoticz/in","qos":"0","retain":"false","broker":"f9f13036.e28b58","x":830,"y":320,"wires":[]},{"id":"5f929d20.09ce6c","type":"mqtt in","z":"b49db3af.cc9f8","name":"","topic":"vzlogger/data/chn3/raw.","qos":"2","datatype":"json","broker":"f9f13036.e28b58","x":250,"y":380,"wires":[["5afd9f35.aa70f"]]},{"id":"5afd9f35.aa70f","type":"join","z":"b49db3af.cc9f8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":470,"y":320,"wires":[["4d33fb01.4811b4","97ca8bf2.e3361"]]},{"id":"4d33fb01.4811b4","type":"debug","z":"b49db3af.cc9f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":262,"wires":[]},{"id":"f9f13036.e28b58","type":"mqtt-broker","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Do not forget to insert the correct IDX number
Awaiting your result.
Regards