I want to talk with my air exchanger RS485 ModBus

I have ordered some for my project, RS485 has with it:
Air exchanger, Heat pumps, Inverters, BMS

First I want to tlk with my air exchanger.
I have a notebook with Linux Ubuntu 20.04. Later the house shall be controlled by a Linux computer.
and a USB to RS485 adapter.

lsusb without adapter
founder@founder-ZenBook-UX431DA-UM431DA:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 04f3:0903 Elan Microelectronics Corp.
Bus 003 Device 004: ID 8087:0a2b Intel Corp. USB2.0 Hub
Bus 003 Device 003: ID 13d3:56dd IMC Networks
Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb with adapter
founder@founder-ZenBook-UX431DA-UM431DA:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 04f3:0903 Elan Microelectronics Corp.
Bus 003 Device 004: ID 8087:0a2b Intel Corp. USB2.0 Hub
Bus 003 Device 003: ID 13d3:56dd IMC Networks
Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Attached the ModBus Protocol of the air exchanger.

Please suggest how I could ask "How warm is it" instead of "Hello world".
 

Attachments

First, you need Modbus Master software to communicate to the air exchanger. Here are two examples that will run on Linux:
https://www.modbusdriver.com/modpoll.html
https://sourceforge.net/projects/qmodmaster/

Next, you need to determine what TTY device your USB to Serial adapter is associated with (for example /dev/ttyUSB0). If you don't know how to figure this out, you can run the following command right after plugging in the USB to Serial adapter:
dmesg | grep tty

Next, you need to determine what Modbus register(s) you need to read in order to know "How warm is it". The register list you attached lists "Room temperature" as parameter number 12. From the examples in the document, all parameters are Holding Registers and use 0-based addressing.

So, using modpoll from the first link above, here is how you would read the room temperature:
modpoll -b 4800 -p none -a 1 -r 13 -c 1 /dev/ttyUSB0

The command above makes the following assumptions:
  • The air exchanger's baud rate is 4800 (dial switch on PCB SW4-4 is OFF)
  • The air exchanger's parity is no parity (the documentation you attached does not show what this setting is or if/how to configure it)
  • The air exchanger's slave address is 1 (the documentation you attached does not show how to configure this setting)
  • Your USB to Serial converter is /dev/ttyUSB0

Additionally, it is very important to note that the "-r 13" above is not a mistake. While the documentation for your air exchanger uses 0-based addressing, modpoll uses 1-based addressing, so you need to add 1 to the register address.
 
Top