Modbus. Need help from experts

Hi,

Sure it’s not port 502? (typically standard Modbus port)
This was my previous VTR300 config before moving the integration to node-red

modbus:
  - name: VTR300
    type: tcp
    host: !secret vtr300_host
    port: 502
    timeout: 3  #Timeout for slave response in seconds (default=3)
    delay: 3  #Time to sleep in seconds after connecting and before sending messages 

@Tempo_Trevis I cannot belienve it, it worked! No idea why they say its port 8989 but now I get a connection :slight_smile: Thank you, you just made my day!

Glad i worked:)
My experience is that it is common that Modbus documentation has flaws (including the VTR300 modbus adr. list)… Modscan32 is a great tool for checking modbus registers data/values as it gives easy access to check values from many registers at the same time.

Yea strange, shouldn’t be that hard to update the manuals :slight_smile:
Just tried Modscan32, works great except the limitations of trial period. Thanks for the tip! Now I’ll just have to get the values to HA.

2 Likes

Any joy? I just started exploring this today, trying and failing testing with pymodbus.

If you would share your config, that would be awesome

Just found this – looks interesting

Hey! Any luck? I moved over to Node Red and manage to read the registers but Im having a hard time reading the array of data I get in response. Might just move back to good ol’ configuration.yaml and have a go at it with the config from that post :slight_smile:

Dont give up on modbus using node red, i saves you for looong yaml files if you are integrating the same features from the unit i’m integrating.
May this helps out as a start? (not possible to paste more code due to the size).

Reading modbus registers (sensors):

[{"id":"c65a5a65.72f3b8","type":"inject","z":"c1e03843.9d14a8","name":"Poll(10s)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":80,"y":580,"wires":[["68a6b029.eb563","705bcad4.194ec4","80d78914.de5d38","1aedba91.04b3f5","b5d6e697.144ba8","f8e6582c.4ec7e8","3a7de46.32ee01c","5ea6e1d2.0b447","219b6a9a.0ed5e6","e6d9f4c7.a48278"]]},{"id":"68a6b029.eb563","type":"function","z":"c1e03843.9d14a8","name":"Modbus read","func":"var fc=3;\nvar sa=1254;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":580,"wires":[["84937855.5af778"]]},{"id":"84937855.5af778","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Sensor","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":580,"wires":[[],["7bd64506.de398c"]],"info":"VTR300 Intern UR"},{"id":"7bd64506.de398c","type":"function","z":"c1e03843.9d14a8","name":"0-5000rpm","func":"var Rpm = msg.payload.data[0];\n\nmsg.payload = Rpm;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":550,"y":580,"wires":[["e310653.30ff398"]]},{"id":"e310653.30ff398","type":"ha-entity","z":"c1e03843.9d14a8","name":"Vifte Komp. [rpm]","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"vtr300_vifte_hast_komp_rpm"},{"property":"device_class","value":"power_factor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"rpm"}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":810,"y":580,"wires":[[]],"info":"# Utekompensert vifte kompensering:\n0% til 50% pådrags kompensering "},{"id":"705bcad4.194ec4","type":"function","z":"c1e03843.9d14a8","name":"Modbus read","func":"var fc=3;\nvar sa=12102;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":620,"wires":[["79fc3ca2.89c304"]]},{"id":"79fc3ca2.89c304","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Sensor","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":620,"wires":[[],["5627d7d5.1ce3e8"]],"info":"VTR300 Intern UR"},{"id":"5627d7d5.1ce3e8","type":"function","z":"c1e03843.9d14a8","name":"Range -40->80","func":"var Temp_raw = msg.payload.data[0];\nvar Temp_scaled;\n\nif (Temp_raw < 6280) { \n  Temp_scaled = (Temp_raw *0.1);\n}\nelse {\n  Temp_scaled = ((Temp_raw - 65535) *0.1); \n}\n\nmsg.payload = parseFloat((Temp_scaled).toFixed(2));\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":620,"wires":[["8e139b51.6e3fe8"]],"info":"# Engineering range: -40°C -> 50°C\n"},{"id":"1aedba91.04b3f5","type":"function","z":"c1e03843.9d14a8","name":"Modbus read","func":"var fc=3;\nvar sa=12101;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":700,"wires":[["8d6ef3f4.328dc"]]},{"id":"8d6ef3f4.328dc","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Sensor","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":700,"wires":[[],["87791222.6ca83"]],"info":"VTR300 Intern UR"},{"id":"87791222.6ca83","type":"function","z":"c1e03843.9d14a8","name":"Range -40->80","func":"var Temp_raw = msg.payload.data[0];\nvar Temp_scaled;\n\nif (Temp_raw < 6280) { \n  Temp_scaled = (Temp_raw *0.1);\n}\nelse {\n  Temp_scaled = ((Temp_raw - 65535) *0.1); \n}\n\nmsg.payload = parseFloat((Temp_scaled).toFixed(2));\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":700,"wires":[["24aa165e.573b2a"]],"info":"# Engineering range: -40°C -> 50°C"},{"id":"24aa165e.573b2a","type":"ha-entity","z":"c1e03843.9d14a8","name":"Inntakstemp. [°C]","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"vtr300_inntaks_temperatur"},{"property":"device_class","value":"temperature"},{"property":"icon","value":"mdi:thermometer"},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":810,"y":700,"wires":[[]],"info":"# Utekompensert vifte kompensering:\n0% til 50% pådrags kompensering "},{"id":"8e139b51.6e3fe8","type":"ha-entity","z":"c1e03843.9d14a8","name":"Tilluftstemp. [°C]","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"vtr300_tillufts_temperatur"},{"property":"device_class","value":"temperature"},{"property":"icon","value":"mdi:thermometer"},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":800,"y":620,"wires":[[]],"info":"# Utekompensert vifte kompensering:\n0% til 50% pådrags kompensering "},{"id":"b5d6e697.144ba8","type":"function","z":"c1e03843.9d14a8","name":"Modbus read","func":"var fc=3;\nvar sa=12543;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":740,"wires":[["c6d50893.ed54c8"]],"info":"# 2050   NB!EAT/RAT used for extract air controller, benyttes pga. avtrekk AI er \"ekstrautstyr\""},{"id":"c6d50893.ed54c8","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Sensor","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":740,"wires":[[],["573f9e49.21545"]],"info":"VTR300 Intern UR"},{"id":"573f9e49.21545","type":"function","z":"c1e03843.9d14a8","name":"Range -40->80","func":"var Temp_raw = msg.payload.data[0];\nvar Temp_scaled;\n\nif (Temp_raw < 6280) { \n  Temp_scaled = (Temp_raw *0.1);\n}\nelse {\n  Temp_scaled = ((Temp_raw - 65535) *0.1); \n}\n\nmsg.payload = parseFloat((Temp_scaled).toFixed(2));\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":740,"wires":[["8caa3e3a.f515c"]],"info":"# Engineering range: -40°C -> 50°C"},{"id":"8caa3e3a.f515c","type":"ha-entity","z":"c1e03843.9d14a8","name":"Avtrekkstemp. [°C]","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"vtr300_avtrekks_temperatur"},{"property":"device_class","value":"temperature"},{"property":"icon","value":"mdi:thermometer"},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":810,"y":740,"wires":[[]],"info":"# Utekompensert vifte kompensering:\n0% til 50% pådrags kompensering "},{"id":"80d78914.de5d38","type":"function","z":"c1e03843.9d14a8","name":"Modbus read","func":"var fc=3;\nvar sa=12107;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":660,"wires":[["28f35935.b68ff6"]],"info":"# 2050   NB!EAT/RAT used for extract air controller, benyttes pga. avtrekk AI er \"ekstrautstyr\""},{"id":"28f35935.b68ff6","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Sensor","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":660,"wires":[[],["de46baec.e636e8"]],"info":"VTR300 Intern UR"},{"id":"de46baec.e636e8","type":"function","z":"c1e03843.9d14a8","name":"Range -40->80","func":"var Temp_raw = msg.payload.data[0];\nvar Temp_scaled;\n\nif (Temp_raw < 6280) { \n  Temp_scaled = (Temp_raw *0.1);\n}\nelse {\n  Temp_scaled = ((Temp_raw - 65535) *0.1); \n}\n\nmsg.payload = parseFloat((Temp_scaled).toFixed(2));\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":660,"wires":[["17f5ddc3.689502"]],"info":"# Engineering range: -40°C -> 50°C"},{"id":"17f5ddc3.689502","type":"ha-entity","z":"c1e03843.9d14a8","name":"Tilluftstemp. Overhetn. [°C]","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"vtr300_overhetingstemperatur_tilluft"},{"property":"device_class","value":"temperature"},{"property":"icon","value":"mdi:thermometer"},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":840,"y":660,"wires":[[]],"info":"# Utekompensert vifte kompensering:\n0% til 50% pådrags kompensering "},{"id":"86a33495.600fd8","type":"modbus-client","name":"VTR300","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.30","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"2c4e313e.d0fc5e","type":"server","name":"Home Assistant","addon":true}]

Modbus write/readback:

[{"id":"87361de4.0b4aa","type":"modbus-flex-write","z":"c1e03843.9d14a8","name":"Set state","showStatusActivities":false,"showErrors":true,"server":"86a33495.600fd8","emptyMsgOnFail":false,"keepMsgProperties":false,"x":840,"y":3820,"wires":[[],[]]},{"id":"668663b5.e26c4c","type":"function","z":"c1e03843.9d14a8","name":"On/Off","func":"var fc=6;\nvar sa=2504;\nvar addresses=1;\nvar value=msg.payload;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={\"value\":value , 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":3820,"wires":[["87361de4.0b4aa"]],"info":"# 0  Deaktiverer Eco drift\n# 1  Aktiverer Eco"},{"id":"ec5d08d0.5511b8","type":"rbe","z":"c1e03843.9d14a8","name":"POC","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":590,"y":3820,"wires":[["668663b5.e26c4c"]],"info":"Videresender kun nye verdier/endringer for å hindre unødig data til modbus slave."},{"id":"a0729a78.535c78","type":"trigger","z":"c1e03843.9d14a8","name":"Tr.5s","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"5","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":470,"y":3820,"wires":[["ec5d08d0.5511b8"]],"info":"Videresender siste verdi etter 5 sek. for å unngå å jamme ned modbus slave, om ikke går ikke settpunkt gjennom."},{"id":"e204afdb.d756e","type":"change","z":"c1e03843.9d14a8","name":"Str.-->INT","rules":[{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":3820,"wires":[["a0729a78.535c78"]]},{"id":"aa920ab1.412b28","type":"inject","z":"c1e03843.9d14a8","name":"Poll(20s)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"20","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":120,"y":3880,"wires":[["f04e59c8.5b2e88"]]},{"id":"f04e59c8.5b2e88","type":"function","z":"c1e03843.9d14a8","name":"Read","func":"var fc=3;\nvar sa=2504;\nvar addresses=1;\nvar slave_ip=msg.payload.slave_ip;\n\nmsg.slave_ip=\"192.168.1.30\";\nmsg.payload={value: msg.payload, 'fc': fc, 'unitid': 1, 'address': sa , 'quantity': addresses };\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":3880,"wires":[["f5091f5f.b5b9c"]]},{"id":"f5091f5f.b5b9c","type":"modbus-flex-getter","z":"c1e03843.9d14a8","name":"Modbus","showStatusActivities":false,"showErrors":true,"logIOActivities":false,"server":"86a33495.600fd8","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":380,"y":3880,"wires":[[],["57cebaa5.bc2e94"]],"info":"VTR300 Intern UR"},{"id":"57cebaa5.bc2e94","type":"function","z":"c1e03843.9d14a8","name":"Eco mode","func":"var msg0 = msg.payload.data[0];\n\nmsg.payload = msg0;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":3880,"wires":[["344e1f2d.df892","66c96a52.373bc4"]],"info":"# Engineering range: -30°C -> 0°C\n\nRaw 0 = 0°C\nRaw 65526 = -1°C\nRaw 65236 = -15°C\n\nRange 65526 - 65236 = 290\n290/29= 10Raw/1°C"},{"id":"344e1f2d.df892","type":"delay","z":"c1e03843.9d14a8","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":660,"y":3880,"wires":[["9e1413fb.8afb6"]]},{"id":"9e1413fb.8afb6","type":"rbe","z":"c1e03843.9d14a8","name":"POC","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":790,"y":3880,"wires":[["1ca24cdc.d0ba03"]]},{"id":"c244f269.9faec","type":"change","z":"c1e03843.9d14a8","name":"Off ","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3860,"wires":[["6cb7ca60.5c64e4"]]},{"id":"1ca24cdc.d0ba03","type":"switch","z":"c1e03843.9d14a8","name":"Int->Str.","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":920,"y":3880,"wires":[["c244f269.9faec"],["fcc9726e.ec7"]]},{"id":"fcc9726e.ec7","type":"change","z":"c1e03843.9d14a8","name":"On","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3900,"wires":[["71b09b27.5220b4"]]},{"id":"66c96a52.373bc4","type":"ha-entity","z":"c1e03843.9d14a8","name":"Eco mode state","server":"2c4e313e.d0fc5e","version":1,"debugenabled":false,"outputs":1,"entityType":"binary_sensor","config":[{"property":"name","value":"vtr300_eco_mode_state"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:leaf"},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":false,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":680,"y":3920,"wires":[[]]},{"id":"940bc341.d45bc","type":"server-state-changed","z":"c1e03843.9d14a8","name":"Eco mode trigger","server":"2c4e313e.d0fc5e","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.vtr300_eco_mode_dummy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"milliseconds","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"x":120,"y":3820,"wires":[["e204afdb.d756e"]]},{"id":"6cb7ca60.5c64e4","type":"api-call-service","z":"c1e03843.9d14a8","name":"Set Eco. Off","server":"868599a7.b14688","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.vtr300_eco_mode","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1190,"y":3860,"wires":[[]]},{"id":"71b09b27.5220b4","type":"api-call-service","z":"c1e03843.9d14a8","name":"Set Eco. On","server":"868599a7.b14688","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.vtr300_eco_mode","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1190,"y":3900,"wires":[[]]},{"id":"86a33495.600fd8","type":"modbus-client","name":"VTR300","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.30","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"2c4e313e.d0fc5e","type":"server","name":"Home Assistant","addon":true},{"id":"868599a7.b14688","type":"server","name":"Home Assistant","addon":true}]

Wow, that helped immensely! I was way off trying to read the numbers coming in. Tried everything from node.js buf api. This seems to do the trick. Thanks alot :slight_smile:

Hello. I would like to ask you for help with this: I have specification, wehere BMS manufacturer writes:
Register address (HEX): 1107
Remarks: 1%
MBAP Head: 7 Bytes
Function code: 1 Byte
Data lenght: 1 Byte
Data: N Bytes

How should look modbus.yaml configuration please?
Thank you

It’s Modbus TCP. Address in decimal

Ye, thank you, of course. But how exactly should look config? Decimal mean uint or uint16? Where to wirght data lenght? How about MBAP etc?

I have this in a package. Should work if you put that in a yaml file and include that in your config.

modbus:
  - name: VSR300
    type: tcp
    host: 192.168.1.204
    port: 502
    timeout: 3 #Timeout for slave response in seconds (default=3)
    delay: 3 #Time to sleep in seconds after connecting and before sending messages (defualt=0)

    climates:
      - name: vent_VSR300
        address: 12102
        slave: 1
        scale: 0.1
        offset: 0
        precision: 1
        max_temp: 30
        min_temp: 15
        temp_step: 1
        target_temp_register: 2000
modbus:

  - name: edpbox3
    type: tcp
    host: 10.1.0.47
    port: 9502
    delay: 1
    timeout: 3
    retries: 3
    retry_on_empty: true
    message_wait_milliseconds: 250

    sensors:

      - name: "EB3 Voltage L1" # 0x006C
        slave: 1
        address: 108
        input_type: input
        count: 1
        data_type: uint16
        precision: 1
        scale: 0.1
        unit_of_measurement: V
        device_class: voltage
        scan_interval: 15

This is an example for me?

I believe so.

This is an example of query from tecnical manual:
Single machine use, communication ID is set to 1, EMS communicates directly with
RBMS
Query operational status 00 00 00 00 00 06 01 03 11 00 00 2D(HEX)

Here is URL for this document: PDF Host - Edit

Could you please point me how should look HA modbus.yaml in this case?

0x1000 Total Voltage

0x1000 hex = 4096 decimal

      - name: "Total Voltage" # 0x1000
        slave: 1
        address: 4096
        input_type: holding
        count: 1
        data_type: uint16
        precision: 1
        scale: 0.1
        unit_of_measurement: V
        device_class: voltage

01 - slave
03 - function
11 00 - register
00 2D - count

Thank you very much @nikito7 will try it. Please is there some way how to have 2 modbus devices against single instance of HA? I have two devices, both communicating using Modbus TCP.
I found this: Ability to add multiple modbus hubs - #45 by wellsy
Now my modbus.yaml looks like this:

- name: "Nibe"
  type: tcp
  host: 192.168.1.102
  port: 502 
  
- name: "BMS"
  type: tcp
  host: 192.168.1.20
  port: 502 

  
  sensors:

# Overview

  - name: "Heatpump - Power Usage"
    unique_id: "power_usage"
    unit_of_measurement: "W"
    data_type: int16
    device_class: power
    address: 2166
    input_type: input
    scale: 1
    precision: 0
    slave: 1
    hub: Nibe

  - name: "Heatpump - Priority"
    unique_id: "operating_prioritisation"
    data_type: int16  # int8
    # 10: Off, 20: Hot Water, 30: Heat, 40: Pool, 60: Cooling
    address: 1028
    input_type: input  # R/W
    scale: 1
    precision: 0
    state_class: measurement
    slave: 1
    hub: Nibe

but there is an error preventing me to restart HASS: Invalid config for [modbus]: [hub] is an invalid option for [modbus]. Check: modbus->modbus->1->sensors->0->hub.

Any idea? I tried to set it as in this post: Ability to add multiple modbus hubs - #49 by cconnoruk