Modbus TCP/IP interface
This document describes how to connect to IQ Home Gateway Modbus TCP interface. IQ Home Gateway Modbus TCP interface provides a solution to access Modbus Slave devices with IQ Home MB Series (MB-XXX-XX) products and read periodically collected battery powered sensor values as virtual devices.
- Architecture of using IQ Home Gateway Modbus TCP/IP interface using PLC applications
2 Connect to Modbus TCP Slaves
2.1 IP address
IQ Home gateways in PLC applications have to connect on the same local area network (LAN) as shown in Figure 2.
- Local access to IQ Home Gateway Modbus TCP interface
The IQ Home gateways use DHCP for IP address configuration as default. The IP address information can be found in Link It at gateway Dashboard page shown on Figure 3 or ask your network administrator for the IP address of the gateway. For more information on how to use LinkIt software please check the video tutorials on the following site: https://www.iqhome.org/linkit
- LinkIt Gateway dashboard with IPv4 address
2.3 Enable Modbus interface
The Modbus TCP interface is not enabled as default. The remote access for external devices disabled too. You can enable the interface in LinkIt (Figure 4):
- Click on the Settings tab
- Scroll down on the bottom of the page and enable Modbus TCP interface
- Enable Modbus TCP remote access
- Click on the save button and confirm configuration upload and service restart
- Enable Modbus TCP interface and remote access in LinkIt
2.4 Port number
IQ Home gateway Modbus TCP/IP service listening on the default port 502 to access Modbus Slave devices.
2.6 Modbus RTU Master device unit ID
IQ Home gateways with Modbus TCP feature handles Modbus TCP Slaves from the wireless network. Wireless Modbus RTU slave devices with IQ Home MB series network node address is the as the Modbus TCP Unit ID. The MB series devices can be placed in the network from address 1 to 239. The network address 240 is reserved for virtual devices.
MB series device
Battery powered sensors as virtual devices
3 Read virtual device data
Battery powered IQ Home sensor values can be read from the gateway as virtual Modbus devices. The scheduler in the gateway requests sensor data periodically with $GW/iqhome topic. The responses are stored in the gateway in-memory database. Sensor values can be accessed with register read Modbus commands. The registers are read only registers.
To setup the scheduler for virtual devices use the LinkIt software. After successful connect to the gateway go to the Settings tab (Figure 4 - 1) and click on the Scheduler menu option (Figure 4 - 2).
- Setup scheduler for virtual devices - Scheduler menu
Now you can add new scheduler job and remove them (Figure 5).
- Setup scheduler for virtual devices - Add add remove scheduler jobs
The following table shows the proper scheduled job configuration for virtual Modbus devices. The values with red color required by virtual Modbus devices.
Scheduled job setting
0 */15 * * * *
Expression for matching moments when the scheduled job should be run. The example means the job runs in every 15 minutes. Further information you can find here.
For virtual devices the message topic have to be $GW/iqhome
The Message ID can be any user defined value. The Message ID not affected on virtual devices.
This option shows to collect data from sensors
The option can be any of the following:
Relative Humidity [%rH]
Device address shows to collect data from all devices
Sleep should be enabled to increase battery lifetime of sensor devices
In case of battery powered sensors and MB-RTU-XX devices used in the same network the request from scheduler and Modbus master are enqueued in the gateway. In the Modbus master consider the queue and RF network response time when defines timeout values.
3.1 Virtual devices unit ID
The Unit ID of the virtual devices is 240 (0xF0).
3.2 3.2Memory map
IQ Home Gateway provides a solution for access battery powered IQ Home sensor values as Modbus slaves. The virtual devices mapped into the gateway in-memory database and can be read from Modbus master. The wireless nodes The table below describes the sensor values memory map.
UNIX Epoch timestamp
Virtual device data stored in Big Endian (ABCD) format and can be read continuously in the valid ranges.
32-bit unsigned integer
32-bit single precision
Request CO2 sensor value from device with network address 2.
CO2 sensor value with network address 2 at 0x0306
CO2 values range start: 0x0300
Number of holding registers: 2
Data address of CO2 sensor value with network address 2 is 0x3000 + 3*2 = 0x0306
In the example the CO2 level converted as floating point number is 1012 ppm.
©2019 IQHome Kft
[a]Ami hiányzik még (későbbrre tartogatva) a státusz regiszter tömb. Legalsó bit a az elem státusz, utána pedig az, hogy melyik adat valid.
[b]Tudok róla, csak gondoltam a jelenlegi állapottal kezdeném, ha belekerült a progiba ezt is updatelem