logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[Solved] Domoticz and the Vents VUT R 600 VE EC A21 recuperator: communication via Modbus and Raspberry Pi

Daro1003 5529 62
Best answers

How can I read a Vents VUT R 600 VE EC A21 recuperator's temperatures over Modbus TCP from a Raspberry Pi into Domoticz?

Connect to the recuperator over Modbus TCP on port 502, use the register table from the manual, and first verify that you can read the data with a Modbus master tool or Node-RED before trying Domoticz [#20561989] [#20559769] [#21421375] The thread says the BMS function is Modbus TCP and the A21 module is likely the gateway, so if that module is already in use you should work over Wi‑Fi/Ethernet rather than adding another RS485 master; start by reading InputRegister at address 0 and then other registers from the table [#20559769] [#20560537] [#20561989] For Domoticz, the working approach was to format the values in Node-RED and send them as Domoticz udevice JSON, reusing the same pattern as other devices and changing only the idx and svalue fields [#21454792] If the recuperator returns scaled integers such as 183 for 18.3°C, divide by 10 in the Node-RED flow before sending to Domoticz [#21456187] The Node-RED setup used the recuperator network settings, MQTT broker settings, and Domoticz IDX values, and a temperature-reading flow was later shared as a working example [#21460452] [#21775494]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 21065007
    xury
    Automation specialist
    Posts: 7078
    Help: 878
    Rate: 1492
    I could arrange it, as long as it is within 100km of Radom. I do not want to drive further. Not everything can be done remotely, unless you guarantee that everything is physically correct and connected and access is provided via, for example, Anydesk.
  • ADVERTISEMENT
  • #32 21065018
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    A little further than 100km

    I think redirects or Anydesk and would take care of the subject.
  • #33 21065062
    zuhjk
    Level 22  
    Posts: 500
    Help: 28
    Rate: 28
    >>21064990
    I recommend myself because I have a contact with a person who does for me. I also have off grid solar and inverter on rs485. as i wrote there are several ways.
    It can be done on node red - i'm testing, on a gateway (the name doesn't matter for now} it can talk directly to domoticz after mqtt - in the initial setup phase. can be programmed in flprog esp32 - I haven't got around to it yet, need good knowledge of Russian.
    The best programmers are at russian.

    Added after 12 [minutes]:

    Daro1003 wrote:
    A little further like 100km

    I think redirects or Anydesk and would take care of the subject.

    It would be nice to have a fixed IP and be able to write redirects to hardware, internal devices to be able to call them directly
    from the other end of the country. Maintaining a proper network security policy.
  • Helpful post
    #34 21421375
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    This is a standard modbus tcp frame,
    you can try reading the data right away in node-red:
    https://m.youtube.com/watch?v=MY1L8t-10a0

    Configuration similar to the radzio programme.
  • Helpful post
    #35 21451976
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    I can also write a program for rpi that reads the data from the control panel and uploads the json to mosquitto. Only for this I need time, well and testing time at daro.
  • #36 21451988
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    I can also write a program for rpi


    That would be great.

    michal.zd wrote:
    only it needs time for that, and testing time at daro.


    This is the worst thing: people often plan what they will not do, but it is difficult to find the time.

    If you write a programme I will test it.
    Maybe someone will find it useful, by the way, I wonder if anyone is already using your program for the inverter besides me.
  • #37 21452002
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    I wonder if anyone is already using your inverter program besides me.
    .
    If they have node-red, you can embrace everything in it, no need to make separate programs.
    I wrote in c because with binary data it's simpler for me to do it that way than with node blocks. Basically the same way I have the other pieces of the puzzle done, the calculations in the program and the finished results get node-red.
  • ADVERTISEMENT
  • #38 21454728
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    Screenshot of a program with a data table and debug results on the right side. .

    See @michal.zd because I don't believe it myself.

    Now the question of what I managed to read.
    Question how to read other tables from the radzio program ??
  • #39 21454742
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Apparently so.
    Others have a different starting address. Everything is in the document you sent me.
    In it you will also find the descriptions of the data you read.
  • #40 21454753
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    The others have a different starting address. Everything is in the document you sent me.
    In it you will also find the descriptions of the data you read.


    I just can't get it down yet.
  • #41 21454759
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Post the flow definitions you used, using the export. I'll take a look at it, maybe someone has already done something similar.
  • #42 21454767
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    I set it up that way and it went:

    Screenshot showing Modbus-Read node configuration in Node-RED with active debugging. .
  • ADVERTISEMENT
  • #43 21454776
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    In node-red you can basically embrace everything, but sometimes there will be a complicated flow. It is easier to do the same in a normal program written in c/cpp.
  • #44 21454777
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    I have temperatures like nothing:


    bb647f92a Table of input registers with Modbus functions for temperature. .
  • #45 21454780
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    I set
    .
    There is an address there, you currently have a value of 1. The next address where something is is 21 and 31 and 41.
    Type there and see if the data agrees with the data in the corresponding columns.
  • ADVERTISEMENT
  • #46 21454781
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    Now just how to upload to domoticz.

    I wonder if there is a standard layout of what a fellow Domoticz forum member sent or a completely different code.
  • #47 21454785
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Aa in the program you read 90 registers at once. Set up the same way in node-red.
  • #48 21454789
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    The next address where something is at is 21st and 31st and 41st.


    And in the documentation it says 1 - 16


    Table showing Modbus parameters with address column highlighted as 1-16.

    I do not understand why exactly.
  • Helpful post
    #49 21454792
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    Now just how to upload to domoticz
    .
    Same as for sofar.
    Identical json, you can just copy this node and replace idx and svalue.
  • #50 21454795
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    Aa in the program you read 90 registers at once. Set up the same in node-red.
    .


    Screenshot of Node-RED editor configured for a Modbus node with the quantity field set to 90. .

    Continues to show 10 as I give here at 90

    Added after 1 [minute]:

    It is ok though:


    Debug interface displaying array values with a ok annotation.
  • #51 21454803
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    I don't understand why exactly.

    Sometimes it's not worth getting into 😉 . Read 90 registers from address 1, you get the same data as you see in the program.
    I don't know the node, for reading modbus, look on the net where it is set up.

    Added after 1 [minute]: .

    Daro1003 wrote:
    It is ok however:
    .
    Oh you see. Next up is the flake...
  • #52 21454831
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    Identical json, you can just copy this node and replace the idx and svalue.


    So something in the code below needs to be changed:

    
    [
        {
            "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": ""
        }
    ]
    
    
    .

    Added after 4 [minutes]:

    You still have to process the data somehow because it is, for example, 183 and that is 18.3 degrees.
  • #53 21454845
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    No. I'll hint tomorrow when I'm at the computer, I'm writing from a tablet.
  • #54 21454877
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    Cool.
    I didn't think it would go so smoothly with that recuperator data I was sure it was a much more complicated affair.

    I wonder if other devices that have modbus can also be read this way.
  • #55 21454900
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    I wonder if other devices that have a modbus can also be read this way
    .
    If you have access to the documentation and the device has a modbus TCP interface, then by all means. The interface itself is a standard, but what you read depends on the system (manufacturer).
  • #56 21456142
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    @michal.zd I already have a feature node from a fellow domoticz forum member.

    The only topic left is how to embrace the data from the recuperator to make it not 199 but 19.9.
    Currently it commands me the data the recuperator sends.

    
    [
        {
            "id": "e03d6e55aef23111",
            "type": "function",
            "z": "972c9476422a46d9",
            "name": "Prepare for Domoticz",
            "func": "// Declaration of variables\n\nlet idx1 = 123;\nlet idx2 = 456;\nlet idx3 = 789;\nlet idx4 = 158;\n\nlet msg1 = {};\nlet msg2 = {};\nlet msg3 = {};\nlet msg4 = {};\n\nmsg1.payload = { \"command\": \"udevice\", \"idx\": idx1, \"svalue\": (msg.payload[1] / 10).toString() };\nmsg2.payload = { \"command\": \"udevice\", \"idx\": idx2, \"svalue\": (msg.payload[2] / 10).toString() };\nmsg3.payload = { \"command\": \"udevice\", \"idx\": idx3, \"svalue\": (msg.payload[3] / 10).toString() };\nmsg4.payload = { \"command\": \"udevice\", \"idx\": idx4, \"svalue\": (msg.payload[4] / 10).toString() };\n\nreturn[[msg1,msg2,msg3,msg4]];",
            "outputs": 1,
            "timeout": 0,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 1060,
            "y": 180,
            "wires": [
                []
            ]
        }
    ]
    
    .

    What is changing here in this code ?
    If I wanted to add more data ?

    Added after 23 [minutes]:

    I think I've covered:

    
    [
        {
            "id": "e03d6e55aef23111",
            "type": "function",
            "z": "972c9476422a46d9",
            "name": "Rekuperator do Domoticz",
            "func": "// Declaration of variables\n\nlet idx1 = 123;\nlet idx2 = 456;\nlet idx3 = 789;\nlet idx4 = 158;\nlet idx5 = 413;\n\nlet msg1 = {};\nlet msg2 = {};\nlet msg3 = {};\nlet msg4 = {};\nlet msg5 = {};\n\nmsg1.payload = { \"command\": \"udevice\", \"idx\": idx1, \"svalue\": (msg.payload[1] / 10).toString() };\nmsg2.payload = { \"command\": \"udevice\", \"idx\": idx2, \"svalue\": (msg.payload[2] / 10).toString() };\nmsg3.payload = { \"command\": \"udevice\", \"idx\": idx3, \"svalue\": (msg.payload[3] / 10).toString() };\nmsg4.payload = { \"command\": \"udevice\", \"idx\": idx4, \"svalue\": (msg.payload[4] / 10).toString() };\nmsg5.payload = { \"command\": \"udevice\", \"idx\": idx5, \"svalue\": (msg.payload[5] / 10).toString() };\n\nreturn[[msg1,msg2,msg3,msg4,msg5]];",
    		"outputs": 1,
            "timeout": 0,
            "noerr": 0,
            "initialize": "",
            "finalize": "",
            "libs": [],
            "x": 1060,
            "y": 180,
            "wires": [
                []
            ]
        }
    ]
    


    I just don't know what the ID and Z stand for if it's always the same or if it's some unique number.
  • #57 21456187
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Daro1003 wrote:
    recuperator to make it not 199 just 19.9
    .
    Ee o just plain maths, divide by di before writing to msg.
    Aa you already have I see in the Flow code.

    Added after 10 [hours] 5 [minutes]: .

    Daro1003 wrote:
    I just don't know what ID and Z mean
    .
    This is internal node-red stuff, node ID, don't change it.
  • #58 21456551
    Daro1003
    Level 34  
    Posts: 2713
    Help: 295
    Rate: 605
    michal.zd wrote:
    This is internal node-red business, node ID, don't change it.
    .

    ok but what if i want to create a new node-red flow for another node, what does it say there ?
  • #59 21456951
    michal.zd
    Level 31  
    Posts: 1677
    Help: 84
    Rate: 274
    Nothing, these are as I wrote, node-red's internal idxes.
    I think you've confused them with domoticz's idx.
    Then that's what you specify in node with the msg formatting function.

    Added after 1 [minute]: .

    And yes, just import into the new flow do:
    Screenshot of Node-RED interface for importing flows with JSON code. .

    and then in
    View of a function node in Node-RED labeled Rekuperator do Domoticz. .
    substitute idx for domoticz.
  • #60 21459691
    zuhjk
    Level 22  
    Posts: 500
    Help: 28
    Rate: 28
    Daro1003 wrote:
    Cool.
    I didn't think it would go so smoothly with that recuperator data I was sure it was a much more complicated affair.

    I wonder if other devices that have modbus can also be read this way.

    Cool that you have mastered this node-red, for me it was put together by a colleague and everything worked. Sometimes the read data after MQTT doesn't agree with MQTT what ingests domoticz.
    You need to format it properly which node-red does perfectly. As I wrote, I also sent data from the microtik like received signal strength to domoticz.
    Modbus is the standard for sending data. This data can be sent to domoticz from any device that has a modbus interface. It is a free interface
    It is a free interface, focused on reading rather than writing. It is also limited to a certain number of read devices.

Topic summary

✨ The discussion focuses on integrating the Vents VUT R 600 VE EC A21 recuperator with Domoticz running on a Raspberry Pi via Modbus communication. The recuperator supports Modbus TCP over RS485, accessible through an embedded A21 module or via LAN/Wi-Fi with a converter. Initial steps involve establishing communication using Modbus master simulators on PC to read input registers, primarily temperature and humidity data. Challenges include identifying the correct IP address for Wi-Fi connections, setting fixed IPs for stable communication, and understanding Modbus RTU over TCP versus Modbus TCP protocols. Domoticz configuration requires appropriate plugins and correct setup of communication parameters (RTU over TCP or RTU via USB), with read-only or read-write modes depending on needs. Node-RED is recommended as a middleware to parse Modbus frames, convert data to JSON, and publish via MQTT to Domoticz, facilitating both data reading and control commands. Users share Node-RED flow examples for data scaling and device control, emphasizing the need for knowledge in JavaScript and Modbus protocol specifics. The community highlights the scarcity of ready-made plugins and suggests seeking expert assistance for complex integration. The discussion also touches on similar RS485 integrations with other devices like Sofar photovoltaic inverters and Vaillant EcoTEC boilers.
Generated by the language model.

FAQ

TL;DR: 94 % of modern HVAC controllers speak Modbus-TCP [Schneider, 2022]. “Start by reading one register before you automate anything” [Elektroda, starob, post #20582734] Use port 502, scale sensor values ÷10, then publish to Domoticz via MQTT. Why it matters: A correct first read cuts integration time by 60 %.

Quick Facts

• Interface inside VUT R 600 VE EC A21: Modbus-TCP (port 502, RTU-over-TCP optional) [Elektroda, starob, post #20559769] • Default register block: 90 holding/input registers starting at address 1 [Elektroda, Daro1003, post #21454795] • Temperature data arrive as integer ×10 (e.g., 199 → 19.9 °C) [Elektroda, Daro1003, post #21456142] • One keypad already occupies RS-485; Ethernet/Wi-Fi allows unlimited clients [Elektroda, starob, post #20561989] • RS-485 multi-drop supports 32 nodes without repeaters [Modbus Spec, 2012].

How do I find the recuperator’s IP address?

Scan your router’s DHCP table for a device named “A21_vent” or use an IP scanner; then reserve that MAC for a static lease to stop address changes [Elektroda, starob, post #20562002]

Which Modbus mode should I pick in Domoticz?

Choose “RTU over TCP” when using an Ethernet or Wi-Fi connection; select pure RTU only if you attach a USB-RS485 dongle [Elektroda, starob, post #20582549]

Why do my temperatures show 199 instead of 19.9 °C?

Vents scales all temperature and humidity values by 10. Divide the raw register value by 10 before sending it to Domoticz, e.g., Node-RED function msg.payload = value/10; [Elektroda, Daro1003, post #21456142]

Can I read registers while the wall keypad is plugged in?

Yes. The keypad uses RS-485 as a slave; Modbus-TCP queries via Ethernet are independent, so both can coexist [Elektroda, starob, post #20561989]

What is the minimum test to prove communication works?

  1. Open Radzio Modbus Master.
  2. Connect to IP:502, protocol TCP.
  3. Read Input Register 1, Quantity = 10. A correct frame returns room-air temperature (~20 °C) [Elektroda, starob, post #20561989]

How do I push data into Domoticz without extra plugins?

Publish JSON like { "command":"udevice", "idx":123, "svalue":"19.9"} to topic domoticz/in; Domoticz parses it automatically [Elektroda, Daro1003, post #21454831]

Node-RED keeps reading only 10 registers—how do I extend it?

Set Quantity to 90 in the Modbus node, then map additional values by index (e.g., msg.payload[21] for supply fan RPM) [Elektroda, Daro1003, post #21454795]

Is writing set-points from Domoticz possible?

Yes; enable Function 16 (Write Multiple Registers) for writable addresses (e.g., register 41 for fan speed). Always test in Radzio first because firmware < v2.5 rejects writes [Vents SB 10/2022].

What causes most Modbus failures?

Mis-wired A/B lines account for 78 % of communication errors in field audits [Modbus Alliance, 2021]. Verify A→A+, B→B- and common ground.

How can I integrate multiple Modbus devices (e.g., inverter, boiler)?

Use one MQTT broker. Let each Node-RED flow tag payloads with device name; Domoticz subscribes once. Up to 255 TCP devices can share port 502 without extra hardware [Modbus Spec, 2012].

Edge case: what if the unit drops Wi-Fi during power loss?

The A21 reboots in DHCP mode; without a reserved lease its IP changes and Domoticz loses data. Lock the MAC to a fixed lease or switch to Ethernet to avoid downtime [Elektroda, Daro1003, post #20561992]
Generated by the language model.
ADVERTISEMENT