Modbus TCP
With Modbus TCP, the measured values of a device can be queried directly via the network connection. No detour via the cloud is necessary.
Requirements
To activate Modbus TCP you need a smart-me Professional subscription
Supported devices
The following smart-me devices support Modbus TCP:
Limitations
It is not possible to assign a fixed IP address. If this is desired, this setting must be made on the router. The MAC address of the individual devices is not known to smart-me. This can be determined using the instructions below.
Queries should not be made more frequently than every 2 seconds. Increasing the polling frequency can lead to unanswered polls in certain constellations. The device cannot be damaged if the polling interval is < 2 seconds.
Activate Modbus TCP
Log in to the smart-me website.
Select the desired device.
Select the cogwheel at the top right.
Activate Modbus TCP under advanced settings
Save
Specific information about Pico and Modbus TCP
Modbus TCP can be used with the Pico if:
The Pico is not in a load management group.
The Pico is in a load management group and the master (determined automatically).
Modbus TCP is deactivated for all slaves in a load management group, as they also do not have their own IP-address. If the Picos in a load management group want to be read or controlled, we recommend to use the Rest API.
Find the address of the device
The Modbus register of a smart-me device can be read out via DNS or IP address.
DNS can be activated in the portal.
The IP address is assigned by the local DHCP server. The IP address can be determined using the instructions below.
Enable DNS
Log in to the smart-me website.
Select the desired device.
Select the cogwheel at the top right.
Enable DNS under advanced settings.
The internal IP is usually required. See below for details.
Save
A public IP address or the internal IP address of the device can be selected as the IP address:
Internal IP
This is the local IP address of the smart-me device. This can be used if you are in the same network.
Public IP
The public IP address is used. This is normally the IP address of your router.
Background information
With the dns-me service, it is possible to connect directly to a smart-me device without knowing its IP address. If the DNS address is activated for a smart-me device, its local or public IP address is automatically assigned to a DNS name (e.g. smart-me_123456.dns-me.com).
smart-me uses the dns-me.com service for this.
Determine IP address with DNS name
After DNS has been activated, the DNS name, which can be seen in the advanced settings under DNS activation, can be used for a ping.
e.g. ping smart-me_6301587.dns-me.com
In response, you will receive an evaluation of the ping including the IP address of the device.
Determine IP address directly on the router
smart-me does not know the MAC address of the individual devices. Determining the IP address without first activating the DNS service is therefore more complicated. One option is to query all IP addresses with Modbus TCP to check which serial number is returned in response.
Data transmission
Modbus TCP Protokoll
TCP Port: 502
Functions
The smart-me Meter supports the following Modbus functions:
Read Holding Register (Code 03)
Register Addressing
For historical reasons the address in Modbus is 1 lower than the internal register address. So the start address has to be (Registeraddress - 1)
Example Modbus
Example with: https://www.modbusdriver.com/modpoll.html
Change Pico Loadmanagement
modpoll.exe -r 0x206E -t 4:int -i -1 -m tcp -p 502 192.168.178.63 16000