(Optional) Create a LON Interface for a Modbus Device (Release 4.1 and Prior)
For SmartServer 4.2 and higher, see (Optional) Create a LON Interface for a Modbus Device.
The SmartServer IoT can be used on an LNS network that is managed by the IzoT Commissioning Tool (CT), or other IzoT Net Server or LNS tool. This section describes how to make Modbus RTU data updates available as network variables in an LNS network.Â
In order to see Modbus datapoints in LON network variables, you need to create a custom internal application in the SmartServer IoT that subscribes to the Modbus data (MQTT) and updates the internal LON variables on your internal LON device so the data will populate on your device’s instance in IzoT CT. Â
This section consists of the following:
Modbus IMM Integration Prerequisites
To get started, you will need:
- IzoT CT and IzoT Net Server (4.20.016Â or higher)
- Resource Files – those used by the internal application need to be added to the IzoT Resource Editor’s catalog.
- Copy the resource file set (i.e., .enu, .fmt, .fpt, and .typ files) into the /LonWorks/Types/User/Echelon/ folder on the PC that is running IzoT CT
- Update the IzoT Resource Editor’s device catalog
- Internal application files deployed to the SmartServer IoT
- Internal LON application device type package (DTP) file
- Internal LON application XIF file used to commission within IzoT CT
- SmartServer IoT XIF
Configuring the SmartServer IoT
- To configure the SmartServer IoT settings for Modbus IMM, you need to be logged into the SmartServer configuration UI with the username and password.
- From the Network Configuration page (described in Configure Your SmartServer), select the LAN Interface Static IP Address dropdown option and specify the address details.Â
- Select the Features tab.
The Features Configuration page appears. - Enable the SmartServer IoT port 1883 for eth0, which is required for the IzoT Net Export Tool and internal applications.
- Click Update.
- Select the LON tab.
The LON Configuration page appears. - Enable the SmartServer IoT for IP-852Â eth0 interface and click Update.
- Select the CMS tab.
- From the Devices widget, switch the LON management mode to LON Independent Management Mode (IMM).
See Configure Your SmartServer for more information about accessing and using the SmartServer configuration UI. Additional information about defining the Modbus configuration settings is provided in sections (Optional) Remotely Accessing the IAP/MQ Server and (Optional) Add a LON Interface.
Continue setting up Modbus IMM following the steps in the section below:Â Installing SmartServer IoT Files.Â
Installing SmartServer IoT Files
- From the Device Types widget, import the internal LON application DTP file.
- Connect to the SmartServer IoT via FTP.
- In the /var/apollo/data/ directory, create a new directory called apps and a subdirectory under apps, where SmartServer IoT internal application files will be copied using the following commands:
package.json
package-lock.json
<internalApp>.js
- Copy the <internalApp>.conf file into the /etc/supervisor/conf.d directory.
- If your SmartServer IoT has internet access, from the SmartServer console (as described in the section Connecting to Your SmartServer), navigate to the newly created internal app directory and enter theÂ
npminstall
 command to add the node packages required for this application.
orÂ
If your SmartServer IoT does not have internet access, use FTP to copy the entire node_modules folder into the SmartServer IoT internal application directory.
Continue setting up Modbus IMM following the steps in the section below:Â Starting the SmartServer IoT Internal Application.Â
Starting the SmartServer IoT Internal Application
- From the console, reboot the SmartServer IoT by typing theÂ
sudo reboot
 command. - Once the SmartServer IoT console has restarted, verify that the Internal App is running by typing theÂ
sudo supervisorctl
 command. - Exit supervisorctl by pressing control-c.Â
Continue setting up Modbus IMM following the steps in the section below:Â Using IzoT CT.Â
Using IzoT CT
- Launch the LonWorks Interfaces (32-bit) control panel applet on your Windows PC.
- Using the LonWorks Interfaces applet, add a new IP-852 interface.Â
- Define an IP-852 VNI interface that will be used by IzoT CT in the LonWorks Interfaces applet.
- Launch the EnOcean IP-852 Configuration Server.Â
- Create or open an existing IzoT CT network and attach to the defined IP-852 interface that is on the same IP-852 channel as the SmartServer IoT.
- Set the Management Mode to OnNet.
- Verify that the Channel Properties of the opened network is set to IP-852.
- Create and add new IP-70 channel that represents the internal IP-70 channel.
- Add a new router object to the drawing connecting the IP-852 channel to the newly defined IP-70 channel.
- Return to the SmartServer IoT LON Configuration page.
- Click IP-852 Router Configuration → Service/Connect → Send to generate service connect messages for commissioning the router.
- Drop a device on the IP-70 channel and commission it using the SmartServer IoT XIF and the LON Configuration page Service/Connect → Send button.
- Drop a device on the IP-70 channel and commission it using the SmartServer internal application XIF file to expose the datapoints on the LON network.
At this point, the outputs for the LON datapoints on the SmartServer IoT internal application device should be active and populating live datapoints. Â