Adding a MODBUS Device:
1. You first need to import a MODBUS template using CMS Web page Device Types widget
2. To add a MODBUS device into the SmartServer CMS Web page Device widget you need to use the following format for the Device UID
For example: RS-485 MODBUS device using address 1
CMS Web page UID = 02:1
TCP/IP MODBUS Devices:
For example: TCP/IP MODBUS device using an IP address of 192.168.1.135
CMS Web page UID = 02:192.168.1.135
3. If you wish to see MODBUS values or change them in a LNS App (like IzoT CT) then you need to use a Internal LON Device to map the MODBUS datapoints to LON datapoints.
The best way to see if the MODBUS device is detected by the SmartServer is to ssh into the SmartServer (don't use the console port) and issue the following command (Use CTRL-C to abort).
1. For RS-485 make sure the RS-485 Configuration page is set up properly for the RS-485 interface you are using.
- Make sure the Baud rate, parity and Stopbits are setup up properly
- Only a single MODBUS RS-485 channel is supported for each SmartServer.
2. Get "Invalid UID" when trying to create or provision MODBUS device
- Make sure you are using the correct UID for the MODBUS Device Type. That is, you will get this error if you try to use a UID starting with "01:" if the Device Template is for TCP.
3. Check if modbus is working
mosquitto_sub -v -t glp/0/+/fb/dev/modbus/#
- If you see datapoint information then that means at least some portion of the MODBUS Device Template is correct
- If you all you see is the RS-485 settings then that indicates that the MODBUS device is not available, or has the wrong UID.
4. Check for MODBUS data events to see real time updates
mosquitto_sub -v -t glp/0/+/ev/data/# | grep modbus
If you don't see any updates then check if you enable monitoring in the CMS Datapoint Properties widget
5. Check if the MODBUS driver is restarting (look for "Exiting ...") in the modbus.log file