logo elektroda
logo elektroda
X
logo elektroda

[Solved] How do I set up a NodeRed connection with Domoticz for Sofar 15KTL-X data?

Daro1003 1557 27
Best answers

How can I send Sofar 15KTL-X inverter data from Node-RED into Domoticz on the same Raspberry Pi?

Use MQTT as the intermediary: Node-RED should send to the MQTT broker (Mosquitto), not directly to Domoticz, and Domoticz must be connected to that broker [#21432627] In Domoticz, the MQTT hardware uses the `domoticz/in` topic for messages sent to Domoticz, and the `idx` in each message must match the Domoticz device index [#21432627] In Node-RED, the working approach was to import the prepared flow, then edit the `Function` node to replace the Domoticz `idx` values with your own and point the `mqtt out` node to your broker IP/port (example shown: `192.168.10.51:1883`) [#21434690][#21451545] The function builds Domoticz payloads like `{"command":"udevice","idx":1001,"nvalue":10,"svalue":""}` or `svalue` values such as `msg.payload.P.toString()+";0"` for Sofar power data [#21428336][#21451545] For testing, use a simple inject/trigger node (the thread mentions `Timestamp`) to fire the flow manually, then verify that Domoticz updates the selected device [#21429925]
Generated by the language model.
ADVERTISEMENT
This content has been translated flag-pl » flag-en View the original version here
  • #1 21421268
    Daro1003
    Level 34  
    Hello

    I am asking for help from colleagues in setting up a NodeRed connection to Domoticz.

    Currently, thanks to my colleague @michal.zd, I have in NodeRed data from a Sofar 15KTL-X inverter which I would like to transfer to domoticz and use there.

    In this topic: https://www.elektroda.pl/rtvforum/topic4101631.html all the details on how to get the data from the Sofar inverter to NodeRed.

    Screenshot of Node-RED interface with MQTT Inverter connection to debug node. .

    Maybe there is someone willing to take the time and help with the topic of getting data from NodeRed into Domoticz.
    Domoticz on a shared raspberry with NodeRed.
  • ADVERTISEMENT
  • Helpful post
    #2 21428336
    michal.zd
    Level 31  
    See here for similar topics.
    There is an example of a json object sent to domoticz
    https://forum.domoticz.com/viewtopic.php?t=30637&start=20

    To start with, I suggest you try to send some data typed in rigidly.
    This node with the f icon is its own function, in which you enter
    
    msg.payload = {"command":"udevice","idx":1001,"nvalue":10,"svalue":""};
    return msg;
    
    .
    Check that you have access to the data in domoticz.
    I have no idea what the command is,
    idx is probably the device index
    nvaluea svalue I suspect numeric, string value.

    Added after 52 [minutes]: .

    Does anyone know if and how to send multiple values to domoticz in one mqtt message?
    After analysing the example above, I somehow don't see this as a possibility, but maybe it is possible.
    It would be the simplest,
  • #3 21428342
    Daro1003
    Level 34  
    @michal.zd I don't really understand what I have to set in this node:

    Node flow diagram in the application. .

    I understand that in the one with F:

    Edit view of a function node in Node-RED software with a snippet of JavaScript code. .

    Somewhere else you probably need to give the IP and port of Domoticz.
  • ADVERTISEMENT
  • #4 21429227
    michal.zd
    Level 31  
    Daro1003 wrote:
    IP and port of Domoticz
    .
    In the one you have signed as domoticz in, that's where it defines itself.
    In the former, on the other hand, I don't know it. On that forum, look for it.
  • Helpful post
    #5 21429925
    michal.zd
    Level 31  
    For testing instead of this ispidel use Timestamp.
    Then by pressing in this area marked with an arrow you generate the pulse and flow action manually.
    Node-RED flow example with Timestamp, To Domoticz, and Domoticz In nodes. .

    Settings for this Timestamp:
    Node-Red properties window with node settings, repeat option set to none. .

    Settings Domoticz In you should have guessed.

    Any test flow is good to do on new blank node-red cards. With this button you add:
    Add flow button in the node-red user interface. .

    Have you already taken a node-red course? It is worth getting to know this environment better, many things will become clearer.
    Here an accessible (but a bit short and not much) description of the basic nodes : https://www.pomysłowydom.pl/przykladowe-reguly-node-red/
    A nice course is given by Artur on his channel, here's a link to the first episode : https://www.youtube.com/watch?v=9fTMpgr3EU0
    and of course https://nodered.org/docs/

    Added after 1 [hour] 1 [minute]: .

    Well, and don't forget to connect the nodes to each other, now the net domoticz in is not connected to the predecessor.
  • #6 21431387
    Daro1003
    Level 34  
    Exactly @michal.zd there is no such node as Timestamp and watching some video on NodeRed they also used nodes which I don't have on mine I don't know I need to install them or something.


    Node-RED editor view with node search. Node-RED interface showing a list of available function nodes, such as function, switch, change, and others. List of available network nodes in Node-RED displayed in the application. Screenshot of Node-RED editor showing a list of available nodes under categories output, sequence, and parser. Node-RED panel showing node categories, including Raspberry Pi and storage. Screenshot of Node-RED editor showing a list of available nodes under categories output, sequence, and parser. Node-RED panel showing node categories, including Raspberry Pi and storage.
  • ADVERTISEMENT
  • #7 21431532
    michal.zd
    Level 31  
    :D
    fact, for inconspicuousness in the list it is called so: Screenshot from Node-RED tool showing the inject node in the common section. .

    Added after 57 [seconds]:

    Daro1003 wrote:
    watching some movie about NodeRed there were also used nodes which are not there in my case I do not know I need to install them or something.
    .
    Some nodes do need to be installed.

    Added after 2 [minutes]:

    regarding: Screenshot showing the iSpider node in a flow editor with the label connected below. .
    I suspect that someone simply called it that, as the name of the noda can be changed. You need to read the whole thing in this forum, as it may turn out to be the usual mqtt you used earlier in my example. After all, it looks the same. Basically the colour of the noda and its icon is unchangeable, you can tell by that.

    Added after 1 [minute]: .

    ps: here you have two return. one unnecessary
    Editing a function node with code and settings. .

    Added after 12 [minutes]:

    Back to adding nodes...
    This is done here - manage palette:
    Screenshot of the Node-RED menu with the Manage palette option highlighted in version 4.0.2. .
    It is worth installing this one:
    Node-RED installation window highlighting the node-red-dashboard add-on. .
  • #8 21432602
    Daro1003
    Level 34  
    This is where it flies ok for me:

    Screenshot of the Node-RED interface with a Domoticz error. .

    However, to Domoticz the error:

    Node-RED connection diagram with errors related to Domoticz. .
  • #9 21432627
    michal.zd
    Level 31  
    Maybe you haven't defined the noda?
    Look in the forum you took it from, I think it will be there.
    Anyway, it's not a problem to guess. Open the parameters of the noda.

    Added after 2 [minutes]: .

    Here you have the def domoticz shown
    https://wiki.domoticz.com/MQTT

    In the image is the topic for mqtt: domoticz/in for messages sent to domoticz.
    Set this in this node

    Added after 1 [minute]: .

    Ps. I guess that index in the idx field is important and must be compatible with domoticz.
    There is some more important information on this page
    if the publish topic of the MQTT hardware is set to Index then the publish topic will be domoticz/out/$idx were $idx is the idx number of the device.
    if the publish topic of the MQTT hardware is set to Index with retain then the publish topic will be domoticz/out/$idx were $idx is the idx number of the device and retained in MQTT broker.
    if the publish topic of the MQTT hardware is set to Name then the publish topic will be domoticz/out/$name were $name is the name of the device.
    Only for domoticz/in they didn't write this, maybe then there will be a topic without an index.

    Added after 11 [minutes]: .

    Daro1003 wrote:
    Somewhere you probably still need to give Domoticz IP and port.
    .
    You don't need that, it's domoticz that needs to have a connection to mosquitto.
    In the noda you give the address to mosquitto. He is the intermediary.
  • #10 21432937
    Daro1003
    Level 34  
    Rozu
    michal.zd wrote:
    Maybe you didn't define the noda?
    .

    I understand that this is about Domoticz IN - I have something not configured in this node.

    IDX in Domoticz is a data block with e.g. temperature.

    Added after 17 [minutes]: .

    I think I have some kind of overflow because:

    Domoticz interface with data widgets and Node-RED environment.

    You can see on the block time 2 minutes inactive I click on nodeRed and it will change for a few seconds that is as if this block got some info.

    Screenshot showing Node-RED interface and Domoticz dashboard with widgets.
  • #11 21433023
    michal.zd
    Level 31  
    Daro1003 wrote:
    block got some info.
    .
    And somewhere you can see what it got? It should be the value from the msg field nvalue.
  • #12 21433069
    Daro1003
    Level 34  
    Well, it is only after this time that I see that something has affected it.
    And now yes:

    1. I don't know what type to set the block in domoticz to receive this test:

    Screenshot showing sensor type selection options in Domoticz software. Screenshot of the Create Virtual Sensor in Domoticz with a dropdown menu of sensor types. .

    2. what exactly is to be sent to Domoticz from NodeRed - some text from this:

    Screenshot showing Node-RED function configuration for Domoticz integration. .

    P.S. What I'm trying to do is as if I've set about doing an electrical installation and I can't see what a cable is.

    Added after 11 [minutes]:

    So this value of 10 should appear in domoticz:

    Screenshot of a function node in Node-RED with command configuration for Domoticz. .
  • #13 21433282
    michal.zd
    Level 31  
    Daro1003 wrote:
    So this value of 10 should appear in domoticz:
    .
    Yes.
    Try some block in domoticz that shows something. Could be some sort of power meter.
    It will be immediately ready for data from the inverter.
  • #14 21433564
    Daro1003
    Level 34  
    It does not transmit this value only this time changes i.e. you can see how it would violate.

    I tried different temperature blocks, text, percentage, counter.

    If I give a block from the energy meter sent by Tasmota, here you can see the topic that is coming from Tasmota:

    Screenshot of Tasmota data related to energy monitoring. .

    Active power:

    Screenshot of active power sensor configuration interface with Tasmota.
  • #15 21433569
    michal.zd
    Level 31  
    Ask about this json passed to domoticz on that domoticz forum.
    Maybe someone can upload an example of such a msg
  • #17 21434690
    michal.zd
    Level 31  
    He has given you the whole flow, copy everything from the code to a file and import it into node-red into a new empty flow.
    Changes need to be made to the node in and out and it should work
    Somewhere in the menu is the import
  • #18 21438038
    Daro1003
    Level 34  
    Do I insert IDX from Domoticz in these underlined places ?

    It says: "Edit the "Function" node and replace in line 3, your Domoticz idx number for P."

    So in line 3 and this is not line 3 for me it is line 5.


    Screenshot of code with line annotations. .
  • ADVERTISEMENT
  • #19 21438078
    michal.zd
    Level 31  
    Daro1003 wrote:
    Do I insert IDX from Domoticz in these underlined places ?
    .
    No
    These are the data to import into node-red, they describe the whole flow.
    Do as I wrote earlier, copy the whole thing to a file, then in node-red use the import option.
    Then there will be a new flow with nodes as in the colleague who forwarded it to you.
    Only after that complete the node definitions to mqtt, first and last.
  • #20 21439117
    Daro1003
    Level 34  
    A So I click on options and give import as in image 1.

    Dropdown menu in Node-RED with the Import option highlighted. .

    In the window as in image 2 I paste the given code and give import.

    Node import window with pasted JSON code. .

    Two nodes appear to me as in image 3 and I guess the whole flow should appear like this:

    Screenshot of a Node-RED flow configured to transfer data from MQTT to Domoticz using three nodes. .

    I click on nod F and I have as in image 3 and there I change the IDXs to my own ?

    Two connected nodes Prepare for Domoticz and MQTT Domoticz with visible script.

    And what next ? I create a nod as in image 4 which was previously for testing ??

    User interface with a node graph, including MQTT Inverter and Prepare for Domoticz.
  • #22 21439161
    michal.zd
    Level 31  
    Daro1003 wrote:
    And what next ?
    .
    What you have imported is the finished flow, you already have in it from the left str reading the information from mosquitto, set the appropriate parameters in it as from the old one. The last one on the right passes the information back to mosquitto and it passes it to domoticz. You must configure it accordingly.

    Added after 2 [minutes]: .

    xury wrote:
    Through modbus or via LSW3?

    Via LWS3 modbusTCP. But through my program, writing this information to mosquitto.
    Node-red is supposed to receive it from mosquitto and pass it to domoticz.
  • #24 21439170
    michal.zd
    Level 31  
    Daro1003 wrote:
    I get two nodes like in image 3 and I guess the whole flow should appear like this:
    .
    Hmm, unless a colleague has only specified these two.
    If so, include your node that receives data from mosquitto.
  • Helpful post
    #25 21440097
    michal.zd
    Level 31  
    xury wrote:
    Mate @starob already did long ago:
    .
    I see that it reads modbus data right away in node-red.
    I had a different design premise: the whole control written as a linux program.
    I am slowly completing the pieces of the puzzle, as in addition to the hot water heating control, there is an element responsible for reacting to voltage increases, controlling the heating and the boiler room. Also as a program in C/Cpp. Advantage, simplicity of the programme and simple addition of extensions. JavaScript is moderately suitable for binary data. Very good for processing json objects.
    Mosquitto makes it easy for me to work on successive layers of control, linking everything together.
    Node-red only for displaying data in the dashboard.

    Why this? Ease of transfer in case of rpi failure.
    Initially everything worked on a tplink router under OpenWrt, even without node-red 😉.
    Only something happened to it years later, and since rpi 1 and pi zero in the meantime had become cheap, I decided to recompile this software to just rpi, adding node-red as a control panel.
  • #26 21451545
    Daro1003
    Level 34  
    And there it went.
    A colleague from the domoticz forum helped here the whole topic: https://forum.domoticz.com/viewtopic.php?t=43153

    Maybe it will be useful for someone.

    If anything happens to that topic I will paste the flow to be imported in NodeRed:

    [
        {
            "id": "9faeea04b2b50403",
            "type": "function",
            "z": "c03666d911c02a8f",
            "name": "Prepare for Domoticz",
            "func": "// Declaration of variables\n\nlet idx1 = 123;\nlet idx2 = 456;\nlet idx3 = 789;\n\nlet msg1 = {};\nlet msg2 = {};\nlet msg3 = {};\n\nmsg1.payload = { \"command\": \"udevice\", \"idx\": idx1, \"svalue\": msg.payload.P.toString() + \";0\"};\nmsg2.payload = { \"command\": \"udevice\", \"idx\": idx2, \"svalue\": msg.payload.GP.toString() + \";0\" };\nmsg3.payload = { \"command\": \"udevice\", \"idx\": idx3, \"svalue\": msg.payload.CP.toString() + \";0\" };\n\nreturn[[msg1,msg2,msg3]];",
            "outputs": 1,
            "timeout": 0,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 460,
            "y": 180,
            "wires": [
                [
                    "85eb0898c7979634",
                    "5b94fc5b22b41f4e"
                ]
            ]
        },
        {
            "id": "5b94fc5b22b41f4e",
            "type": "mqtt out",
            "z": "c03666d911c02a8f",
            "name": "MQTT Domoticz",
            "topic": "",
            "qos": "",
            "retain": "",
            "respTopic": "",
            "contentType": "",
            "userProps": "",
            "correl": "",
            "expiry": "",
            "broker": "175c3dc01f359e9d",
            "x": 710,
            "y": 180,
            "wires": []
        },
        {
            "id": "175c3dc01f359e9d",
            "type": "mqtt-broker",
            "name": "Raspberry Pi 1B",
            "broker": "192.168.10.51",
            "port": 1883,
            "clientid": "",
            "autoConnect": true,
            "usetls": false,
            "protocolVersion": 4,
            "keepalive": 60,
            "cleansession": true,
            "autoUnsubscribe": true,
            "birthTopic": "",
            "birthQos": "0",
            "birthRetain": "false",
            "birthPayload": "",
            "birthMsg": {},
            "closeTopic": "",
            "closeQos": "0",
            "closeRetain": "false",
            "closePayload": "",
            "closeMsg": {},
            "willTopic": "",
            "willQos": "0",
            "willRetain": "false",
            "willPayload": "",
            "willMsg": {},
            "userProps": "",
            "sessionExpiry": ""
        }
    ]
    .

    1 You need to edit the IP address of the broker:
    Screenshot of Node-RED editor showing an MQTT flow. 2.

    2. you need to edit the IDXs:
    Screenshot of Node-RED editor showing a flow with a function Prepare for Domoticz. 3.

    3. attach data from Sofar and it should work:
    Screenshot of a Node-RED flow for integrating Domoticz using MQTT. 3.
  • #27 21454340
    michal.zd
    Level 31  
    This kind of information: currently the broker sends a properly formatted json for domoticz to mosquitto, so node-red is a redundant jkao intermediary.
    But it is, of course, possible for node-red to completely take control of the whole thing, without additional home assistant software.
  • #28 21454585
    Daro1003
    Level 34  
    I believe that this topic has been exhausted and is to be closed.
    This is because the connection between NodeRed and Domoticz as described above has been achieved.

    Those interested in integrating Sofar with Domoticz should definitely follow the whole topic given in the first post and especially here there is a discussion about direct communication of Sofar with Domoticz.

Topic summary

✨ The discussion focuses on establishing a connection between NodeRed and Domoticz to transfer data from a Sofar 15KTL-X solar inverter. The data acquisition from the inverter to NodeRed is already achieved via Modbus TCP through an LSW3 device, with data published to the Mosquitto MQTT broker. The main challenge is configuring NodeRed to send properly formatted JSON messages to Domoticz using MQTT, specifically the "udevice" command with correct "idx", "nvalue", and "svalue" fields corresponding to Domoticz device indices. Users shared example JSON payloads and NodeRed function node scripts to prepare data for Domoticz, emphasizing the importance of matching Domoticz IDX values and MQTT topics (e.g., "domoticz/in"). The conversation includes troubleshooting NodeRed node configurations, installing missing nodes, and importing complete NodeRed flows from external sources. It was noted that Domoticz device types must be compatible with the data sent (e.g., temperature sensors, power meters). The final solution involved importing a ready NodeRed flow, adjusting IDX values, and ensuring MQTT topics and payload formats conform to Domoticz requirements. The integration allows Domoticz to receive and display inverter data, with NodeRed acting as an intermediary between Mosquitto and Domoticz. References to external tutorials, Domoticz MQTT documentation, and community forum threads were provided to assist setup and troubleshooting.
Generated by the language model.

FAQ

TL;DR: For Raspberry Pi users moving Sofar 15KTL-X data into Domoticz, the working pattern is 3 IDX values mapped in one Node-RED function, then published to Mosquitto; as one expert reply put it, “Domoticz needs Mosquitto.” Edit the broker IP, keep port 1883, and replace the placeholder IDX numbers with your own to send P, GP, and CP correctly. [#21451545]

Why it matters: This setup turns raw inverter telemetry into usable Domoticz devices for power dashboards, logging, and later automation.

Opcja Źródło danych Pośrednik Co konfigurujesz Wynik
Node-RED → Domoticz Sofar data already in Mosquitto Node-RED broker IP, topic, 3 IDX Easy mapping of P/GP/CP
Custom program → Mosquitto → Domoticz LSW3 ModbusTCP via Linux program No Node-RED required properly formatted Domoticz JSON Fewer moving parts

Key insight: The thread’s final working solution was not choosing a special Domoticz node type first. It was importing a proven flow, then editing only the MQTT broker settings and the Domoticz IDX numbers. [#21451545]

Quick Facts

  • The shared working flow publishes through an MQTT broker at 192.168.10.51:1883, uses MQTT protocol version 4, and sets keepalive to 60 s. [#21451545]
  • The final function node maps 3 values from the inverter payload: P, GP, and CP, each to a separate Domoticz idx. [#21451545]
  • The example Node-RED function starts with placeholder IDX values 123, 456, and 789; these must be replaced with your real Domoticz device indexes. [#21451545]
  • When import shows only 2 nodes instead of a full flow, the missing part is often your existing MQTT input from Mosquitto, which you must connect manually. [#21439170]
  • One successful installation ran Domoticz and Node-RED on a shared Raspberry Pi, while the broker definition shown later was named Raspberry Pi 1B. [#21421268]

How do I send Sofar 15KTL-X inverter data from Node-RED to Domoticz over MQTT on a Raspberry Pi?

Send the Sofar values into a Node-RED function, convert them into Domoticz udevice JSON, and publish them to Mosquitto. 1. Import the shared flow. 2. Edit the broker IP and keep port 1883. 3. Replace the three placeholder idx values with your Domoticz indexes, then connect the Sofar payload carrying P, GP, and CP. This was confirmed working on a Raspberry Pi-based setup with Node-RED and Domoticz sharing the machine. [#21451545]

What JSON payload format does Domoticz expect for an MQTT udevice update from Node-RED?

Domoticz expects a JSON object with command, idx, and a value field such as nvalue or svalue. The thread’s successful example used {"command":"udevice","idx":idx1,"svalue":msg.payload.P.toString()+";0"} and repeated that pattern for GP and CP. An earlier test also used {"command":"udevice","idx":1001,"nvalue":10,"svalue":""} to verify basic delivery before sending live inverter data. [#21428336]

Where do I set the MQTT broker address, port, and topic in Node-RED when connecting to Domoticz?

Set the broker address and port in the MQTT broker configuration attached to the mqtt out node. In the posted working flow, the broker is 192.168.10.51 on port 1883, and the message goes through the MQTT Domoticz output node. For the topic, the thread points to Domoticz MQTT settings and states that messages sent to Domoticz use domoticz/in, while Node-RED connects to Mosquitto, not directly to Domoticz. [#21432627]

Why does the Domoticz In or MQTT out node in Node-RED show activity but the value never appears in Domoticz?

This usually means the message reached the node, but the JSON shape, topic, or idx did not match what Domoticz expected. In the thread, the user saw timing changes and node activity, yet no value appeared, even after testing temperature, text, percentage, and counter devices. The fix came only after using a working flow from the Domoticz forum and then editing the broker and IDX fields correctly. [#21451545]

Which Domoticz device type should I create to receive inverter values like power, temperature, percentage, or counters from Node-RED?

Create a Domoticz device type that visibly exposes the value you want to test, then match the JSON to that device. The practical advice in the thread was to use a block that clearly shows changes, such as a power meter, because inverter data is immediately relevant there. The user tested temperature, text, percentage, and counter blocks, but power-style devices were suggested as the most direct fit for inverter readings. [#21433282]

What is the IDX in Domoticz, and how do I match it correctly to values sent from Node-RED?

IDX is the Domoticz device index, and it must match the exact device you want to update. In the thread, one post explains that IDX identifies a data block such as temperature, while the final flow uses three separate indexes for P, GP, and CP. Replace the placeholders 123, 456, and 789 in the function node with your own Domoticz device indexes before deploying. [#21451545]

How can I test a Node-RED flow for Domoticz with an Inject node or timestamp trigger before connecting real Sofar data?

Use an Inject node to fire a manual test message before you attach live inverter data. The thread recommends replacing the original trigger with a Timestamp-style inject node, then clicking it manually to run the flow. Start on a blank Node-RED tab, connect the nodes, and send a fixed test payload such as nvalue:10 so you can confirm transport before debugging Sofar parsing. [#21429925]

What is LSW3 ModbusTCP in the context of Sofar inverters, and how is it different from reading data directly in Node-RED?

“LSW3 ModbusTCP” is a communication method that reads Sofar inverter data over the LSW3 interface using Modbus TCP, then hands that data to other software, usually through MQTT. In this thread, data was not read directly in Node-RED. A custom Linux program collected it via LSW3 ModbusTCP, wrote it to Mosquitto, and Node-RED only forwarded or reshaped that JSON for Domoticz. [#21439161]

Can Node-RED send multiple Sofar values such as P, GP, and CP to Domoticz in one flow, and how should the function node be written?

Yes, one function node can send multiple Sofar values in one flow by building several messages and returning them together. The final working example declares three IDX variables, creates msg1, msg2, and msg3, and fills each payload with command:"udevice" plus svalue built from P, GP, or CP. It then returns [[msg1,msg2,msg3]], so one incoming inverter message updates three Domoticz devices. [#21451545]

How do I import a shared Node-RED flow from the Domoticz forum and then edit it for my own MQTT broker and Domoticz IDX numbers?

Import the shared code into a new flow, then edit only the MQTT endpoints and your IDX values. 1. Open Node-RED menu and choose Import. 2. Paste the flow code from the forum. 3. Open the function node to replace the IDX placeholders, then open the broker node to set your broker IP. The thread confirms that after these edits and reconnecting the Sofar input, the flow worked. [#21439117]

Which MQTT topic should Node-RED publish to for Domoticz, and how does domoticz/in differ from domoticz/out/$idx or domoticz/out/$name?

Publish Node-RED messages to domoticz/in when you want Domoticz to receive updates. The thread cites Domoticz MQTT documentation and explains that domoticz/out/$idx or domoticz/out/$name are publish formats used by Domoticz when it sends device state out, depending on its MQTT hardware setting. One reply summarized the architecture clearly: “Domoticz needs Mosquitto; Node-RED points to the broker.” [#21432627]

When some Node-RED nodes shown in tutorials are missing, how do I install them with Manage Palette and tell built-in nodes from renamed ones?

Install missing nodes through Manage Palette, and identify built-in nodes by their fixed color and icon. The thread notes that some tutorials show nodes that must be installed manually, while others only look unfamiliar because their display name was renamed by the author. A practical tip from the discussion is that the node’s icon and color do not change, so those are better clues than the visible label. [#21431532]

What causes import problems where only two nodes appear instead of a complete Node-RED flow, and how do I connect the missing MQTT input?

This happens when the shared snippet contains only the processing and output nodes, not the original MQTT input. In the thread, the user imported code and saw only two nodes, and the explanation was that the shared example likely included just those two pieces. The fix was to keep or add your own existing Mosquitto input node on the left and wire it into the imported function and MQTT output. [#21439170]

Node-RED versus sending properly formatted JSON directly from the broker or custom Linux program to Domoticz — which approach is better for Sofar integration?

Direct JSON from your custom program is simpler if it already formats Domoticz messages correctly. The thread’s closing technical note says the broker can already send proper Domoticz JSON to Mosquitto, making Node-RED a redundant intermediary in that design. Use Node-RED when you want easy mapping, dashboards, or later logic; skip it when your Linux program already publishes finished udevice payloads cleanly. [#21454340]

After reading inverter data with a custom program and Mosquitto, what is the simplest way to forward it to both Domoticz and InfluxDB?

The simplest path is to let the custom program publish once to Mosquitto and have separate consumers store or forward the same data. In the thread, one participant reported long-term use of a solution that saves inverter data both to Domoticz and to InfluxDB after small modifications. Another post confirms the active design: a Linux C/C++ program reads via LSW3 ModbusTCP, writes to Mosquitto, and Node-RED can remain optional. [#21439166]
Generated by the language model.
ADVERTISEMENT