ACR-EX Display Enabled Pulse to NB-IoT Converter - Integration Manual
Integration manual for the ACRIOS Systems display enabled pulse to NB-IoT converter ACR-EX-100NILCD-I1-C.
Unboxing of ACR-EX Display Enabled Pulse to NB-IoT Converter
Introduction
The following article contains all the major information about ACRIOS Systems ACR-EX Display Enabled Pulse to NB-IoT Converter. The first part covers the converter integration and the hardware used in the device. The second part explains the device management and uplink and downlink messages are also covered in detail.
Typical Use-Case
The integration of a pulse to NB-IoT converter offers a robust solution for efficiently monitoring and managing various types of utility meters, such as electric or gas meters. This technology enables real-time data collection and transmission, facilitating enhanced operational efficiency and informed decision-making.
Scenario:
Consider an electric utility company responsible for providing electricity to a large urban area. This utility company needs to monitor electricity usage across thousands of residential and commercial properties. Traditional methods of manual meter reading are time-consuming, prone to errors, and lack the capability for real-time monitoring. The challenge is to implement an efficient, reliable, and scalable system for automatic meter reading (AMR) and data transmission to the central management system.
Solution:
The pulse to NB-IoT converter provides a plug-and-play solution to address this challenge. By retrofitting existing meters with pulse output to the converter, the utility company can seamlessly integrate the meters into the NB-IoT network. This enables the utility company to monitor electricity consumption in real-time, generate accurate billing, and optimize energy distribution.
Benefits:
- Time and Cost Savings: The quick installation process eliminates extensive configuration and wiring efforts, reducing installation time and associated costs.
- Seamless Integration: The plug-and-play nature of the solution simplifies the integration of heat meters into the district heating network, minimizing disruption to the residents.
- Reliable Communication: The external antenna ensures reliable signal propagation, maintaining consistent communication even in complex urban environments.
- Real-time Insights: The solution provides real-time heat consumption data, enabling accurate billing and informed decision-making for energy optimization.
- Enhanced Data Accuracy: The conversion of pulse signals to digital data minimizes the risk of data discrepancies, leading to more accurate billing and usage analytics.
- Long Battery Life: The NB-IoT modules are designed for low power consumption, ensuring long battery life for the converters and reducing maintenance frequency.
- Secure Communication: NB-IoT offers robust security features to protect data integrity and prevent unauthorized access, ensuring secure communication between the meters and the central management system.
What Is a Pulse Output?
A pulse output signal is a common method used by various utility meters, such as electric, water, and gas meters, to indicate consumption levels.
This method works by assigning each pulse to a specific quantity of energy, water, or gas. For example, one pulse might represent 100 liters of water, 10 cubic meters of natural gas, or 1000 watts of electricity. Thus, for every 1000 watts that pass through your electric meter, one pulse is generated. The pulses are counted over time to calculate the total consumption.
Modern meters often use pulses at smaller measurement quantities to provide more detailed data. Pulse output meters are advantageous for interoperability, as they can be read by multiple vendors' systems, rather than being restricted to the meter's original vendor.
Pulse output is a reliable and efficient method for measuring and transmitting consumption data, playing a crucial role in modern utility management and automated meter reading systems.
Converter Integration
Functions
- Configurable modes: Signal Tester and Pulse Counter managed by UDP or LwM2M
- Configurable connection parameters
- Configurable sampling period intervals
- Automatic time synchronization on month change
Out of the Box Behaviors
By default, the converter is set to Pulse Counter mode.
State Diagram - Pulse Counter
This is a state diagram of the pulse counter mode.
The process could be simplified to the following steps:
- The device starts after the restart or when it is plugged in.
- The device checks, whether a SIM card is inserted.
- The device checks, whether a network can be reached.
- The device enters idle state, from which it attempts to send data either at certain intervals, or when manually triggered.
In Text Explanation
- The device can be started either by:
- Plugging in the battery.
- Restarting the device by plugging the battery out, shorting it, and plugging in the battery.
- Either way, the device should display "STARTING" and the show the FW revision.
- The device should now follow these steps:
- The device checks, if a valid SIM card is inserted:
- If there is no valid SIM card, or no SIM card, the display shows "NO SIM" - insert the valid SIM card and tap the magnet on the side.
- If the SIM card is valid, the device then attempts to connect to the network:
- If the device fails to connect, it shows "NO NET" - tap the magnet on the side after it has been resolved (either in configuration or by placing it to a place with a signal).
- The device checks, if a valid SIM card is inserted:
- Once the device successfully connects, it should enter the idle mode.
- From there a scheduled reporting is executed.
- You can also read out the data with help of manual IEC head reading.
- Once the data is sent, the device returns to the idle mode:
- The display shows "SENDING".
Converter Readout (Payload)
The payload is a message sent from the device to the server or vice versa. There are two types of payloads: uplink and downlink.
The uplink payload is sent from the device to the server, and the downlink payload is sent from the server to the device. Uplink is used to send data from the device to the server, and downlink is used to send commands from the server to the device.
Uplink Command Bytes
Uplink Command Bytes List
Command Byte (HEX) | Description | LwM2M Resource |
---|---|---|
0xA5 | Periodic report | 165 |
0xA6 | Periodic report with a Coulomb counter | 166 |
0xA7 | Periodic status report | 167 |
0xAA | Read the archive | 170 |
0xCC | Read the counter | 204 |
0xDA | Read a device info | 218 |
0xDD | Read a ratio | 221 |
0xA0 | Ping | 160 |
0xEE | Signal tester | 238 |
0xEF | Signal tester with a Coulomb counter | 239 |
0xB0 | Send a second of the day | 176 |
0xB1 | Send a second of the day - spread | 177 |
0xB2 | Read a display count time | 178 |
0xB3 | Read a display date time | 179 |
0xB4 | Read a maximum detector period | 180 |
0xB5 | Read a sampling period | 181 |
0xB6 | Read the config | 182 |
0xB7 | Read an APN | 183 |
0xB8 | Read an IP | 184 |
0xB9 | Read a port | 185 |
0xBA | Read a PLMN ID | 186 |
0xBB | Read an ID | 187 |
0xBC | Read mode | 188 |
0xBD | Read UNITSTR | 189 |
0xBE | Read OBIS | 190 |
0xBF | Clear the archive acknowledgment | 191 |
0xE0 | CRC16 failed | 224 |
0xD0 | Read a LWM2M endpoint | 208 |
0xD1 | Read a LWM2M server URL | 209 |
0xD2 | Read a LWM2M server port | 210 |
0xD3 | Read a LWM2M local port | 211 |
0xD4 | Read a LWM2M lifetime | 212 |
0xD5 | Read a LWM2M PSK ID | 213 |
0xD6 | Read a LWM2M PSK | 214 |
0xC0 | Read a battery capacity | 192 |
0xC1 | Read a history period length | 193 |
0xC2 | Read a signal tester period | 194 |
0xC3 | Read a signal tester mode | 195 |
0xC4 | Read a signal tester payload length | 196 |
0xC5 | Read a meter ID | 197 |
Downlink Commands
Downlink Commands List
Command (ASCII) | Description |
---|---|
SET_SEND_DAY_SECOND | Set send day seconds |
SET_SEND_DAY_SECOND_SPREAD | Set send day seconds - spread |
SET_DISPLAY_COUNT_TIME | Set display count time |
SET_DISPLAY_DATE_TIME | Set display date time |
SET_MAXIMUM_DETECTOR_PERIOD | Set maximum detector period |
SET_SAMPLING_PERIOD | Set sampling period |
SET_COUNTER | Set counter |
SET_RATIO | Set ratio |
SET_NBIOT_PORT | Set NBIoT port |
SET_NBIOT_IP | Set NBIoT IP |
SET_NBIOT_APN | Set NBIoT APN |
SET_NBIOT_PLMNID | Set NBIoT PLMN ID |
SET_ID | Set ID |
SET_MODE | Set mode |
SET_UNITSTR | Set UNITSTR |
SET_OBIS | Set OBIS |
SET_BATTERY_CAPACITY | Set battery capacity |
SET_HISTORY_PERIOD_LENGTH | Set history period length |
SET_METER_ID | Set meter ID |
SET_LWM2M_EP | Set LWM2M end point |
SET_LWM2M_URL | Set LWM2M URL |
SET_LWM2M_SERVER_PORT | Set LWM2M server port |
SET_LWM2M_LOCAL_PORT | Set LWM2M local port |
SET_LWM2M_LIFETIME | Set LWM2M lifetime |
SET_LWM2M_PSK_ID | Set LWM2M PSK ID |
SET_LWM2M_PSK | Set LWM2M PSK |
SET_SIG_TESTER_PERIOD | Set signal tester period |
SET_SIG_TESTER_MODE | Set signal tester mode |
SET_CONFIG | Set config |
GET_DEVICE_INFO | Get device info |
GET_SEND_DAY_SECOND | Get send day seconds |
GET_SEND_DAY_SECOND_SPREAD | Get send day seconds - spread |
GET_DISPLAY_COUNT_TIME | Get display count time |
GET_DISPLAY_DATE_TIME | Get display date time |
GET_MAXIMUM_DETECTOR_PERIOD | Get maximum detector period |
GET_SAMPLING_PERIOD | Get sampling period |
GET_COUNTER | Get counter |
GET_RATIO | Get ratio |
GET_CONFIG | Get config |
GET_NBIOT_PORT | Get NBIoT port |
GET_NBIOT_IP | Get NBIoT IP |
GET_NBIOT_APN | Get NBIoT APN |
GET_NBIOT_PLMNID | Get NBIoT PLMN ID |
GET_ID | Get ID |
GET_MODE | Get mode |
GET_UNITSTR | Get UNITSTR |
GET_OBIS | Get OBIS |
GET_BATTERY_CAPACITY | Get battery capacity |
GET_HISTORY_PERIOD_LENGTH | Get history period length |
GET_METER_ID | Get meter ID |
GET_LWM2M_EP | Get LWM2M end point |
GET_LWM2M_URL | Get LWM2M URL |
GET_LWM2M_SERVER_PORT | Get LWM2M server port |
GET_LWM2M_LOCAL_PORT | Get LWM2M local port |
GET_LWM2M_LIFETIME | Get LWM2M lifetime |
GET_LWM2M_PSK_ID | Get LWM2M PSK ID |
GET_LWM2M_PSK | Get LWM2M PSK |
GET_SIG_TESTER_PERIOD | Get signal tester period |
GET_SIG_TESTER_MODE | Get signal tester mode |
MESSAGE_CRC16 | CRC error detection |
READ_ARCHIVE | Read archive |
CLEAR_ARCHIVE | Clear archive |
RESET | Reset |
Hardware Used
- ACR-EX-100NILCD-I1-C - Display Enabled Pulse to NB-IoT Converter
The converter is designed to retrofit existing meters with pulse output to an NB-IoT communication. The converter is equipped with a pulse input, NB-IoT module, and a display for an easy on-site monitoring.
Hardware Limitations
- Battery life can last up to 15 years, but this may vary significantly due to external factors and natural degradation.
- Pulse input is equipped with a low-pass filter with a cut-off frequency of 7234 Hz.
ACR-EX input schematic
Application Limitations
- FW low-pass filter with a cut-off frequency of 50 Hz.
- FW NB-IoT module sent size limitation of 512 bytes.
This means messages larger than 512 B are truncated, with only the initial portion sent, leading to data loss for the remaining content.
Device Management
IoT device management refers to the process of monitoring, configuring, updating, and maintaining IoT devices throughout their lifecycle. It involves various tasks and functionalities aimed at ensuring the reliable and efficient operation of IoT devices deployed in networks. Our device can be managed with the following standards/protocols:
IEC Device Management
IEC 62056-21, formerly known as IEC 1107, is an international standard that specifies the DLMS/COSEM protocol, which stands for Device Language Message Specification (DLMS) and Companion Specification for Energy Metering (COSEM). This protocol is widely used for communication between utilities and various types of energy meters, facilitating efficient data exchange for meter reading, billing, and monitoring purposes. It defines the structure and format of messages exchanged between energy meters and data collection systems, ensuring interoperability and compatibility across different vendors and devices.
Our device is equipped with an optical port compliant with the IEC 62056-21 standard, enabling effortless communication and compatibility.
Optical Probe
An optical probe, often referred to as an optical port or optical head, is a device used for communication with energy meters that support the DLMS/COSEM protocol according to the IEC 62056-21 standard. It typically consists of an optical sensor and associated circuitry housed in a compact unit.
The optical probe is connected to a computer or data collection device via a serial or USB interface. It emits pulses of light that are received by the optical port on the energy meter. These pulses encode data such as meter readings, parameters, or commands and that allows bidirectional communication between the meter and an external device.
ORNO OR WE 518 optical probe
We also offer ORNO optical probes for the management of our devices (datasheet: EN).
If you wish to order the probes from ACRIOS, use the order code of: Opticka_hlavice_USB-E379
Communication starts at 300 Bd and after sign-on, our device switches to 9600 Bd.
Operation
The device uses C protocol mode and fifth baud speed.
The C protocol mode ensures bidirectional data exchange with baud rate switching and allows data retrieval, programming with increased security, and modes defined by the manufacturer.
The following procedure happens when the device is being used:
- PC sends a request for a transfer of ACR-EX‘s address.
- ACR-EX sends a response with its address. (Sign On)
- PC sends a command for a mode and a baud speed.
Read mode
: ACR-EX sends a response containing the archive data.Programming mode
: ACR-EX sends a response with an operand for the security algorithm.- PC sends a password (IMEI).
- ACR-EX sends an acknowledgment.
- Communication between the devices ends with the Sign Off command. (Timeout)
Read Mode
Read mode communication diagram
Programming Mode
Programming mode communication diagram
Registers
The device utilizes a range of registers for its IEC interface, facilitating crucial operations and configurations. These registers encompass a diverse set of functionalities, such as:
- Network settings
- Data transmission intervals
- Signal testing parameters
- And others
Register Name | Address | Length | Operations | Range/Format | Data Type | Default Value |
---|---|---|---|---|---|---|
IEC_REG_COUNTER | 0 | 4 | R/W | 0 - 4294967295 | Integer | 0 [count] |
IEC_REG_IP | 4 | 64 | R/W | IPv4 | String | |
IEC_REG_PORT | 68 | 4 | R/W | 0 - 65535 | Integer | 4242 |
IEC_REG_APN | 72 | 64 | R/W | 1 - 63 chars | String | auto |
IEC_REG_PLMNID | 136 | 4 | R/W | 0 / 00000 - 99999 | Integer | 0 |
IEC_REG_ID | 140 | 64 | R/W | 1 - 63 chars | String | Device IMEI |
IEC_REG_RATIO | 204 | 4 | R/W | Ratios | Integer | 1:1 |
IEC_REG_SIGNAL_TESTER | 208 | 4 | R/W | 0 - 2 | Integer | 0 (Pulse counter UDP) |
IEC_REG_UNIT | 212 | 16 | R/W | 1 - 15 chars | String | *m3 |
IEC_REG_OBIS_CODE | 228 | 16 | R/W | nn.nn.nn | String | 3.0.0 |
IEC_REG_SEND_DAY_SEC | 244 | 4 | R/W | 0 - 86399 | Integer | 21600 |
IEC_REG_SEND_DAY_SEC_SPREAD | 248 | 4 | R/W | 0 - 86399 | Integer | 0 |
IEC_REG_SAMPLING_PERIOD | 252 | 4 | R/W | 300 - 86399 | Integer | 3600 |
IEC_REG_DISPLAY_COUNT_TIME | 256 | 4 | R/W | 3 - 600 | Integer | 20 |
IEC_REG_DISPLAY_DATE_TIME | 260 | 4 | R/W | 6 - 600 | Integer | 4 |
IEC_REG_MAXIMUM_DETECTOR_PERIOD | 264 | 4 | R/W | 60 - 86399 | Integer | 300 |
IEC_REG_LWM2M_SERVER_URL | 268 | 64 | R/W | URL/IP | String | |
IEC_REG_LWM2M_SERVER_PORT | 332 | 4 | R/W | 0 - 65535 | Integer | 5683 |
IEC_REG_LWM2M_LOCAL_PORT | 336 | 4 | R/W | 0 - 65535 | Integer | 56833 |
IEC_REG_LWM2M_EP | 340 | 64 | R/W | 1 - 63 chars | String | acrex |
IEC_REG_LWM2M_LIFETIME | 404 | 4 | R/W | 86399 - 2678369 | Integer | 30 |
IEC_REG_DEVICE_INFO | 408 | 128 | R | String | Depends on FW and HW | |
IEC_REG_LWM2M_PSKID | 536 | 64 | R/W | String | ||
IEC_REG_LWM2M_PSK | 600 | 64 | R/W | String | ||
IEC_REG_SIG_TESTER_PERIOD | 664 | 4 | R/W | Integer | ||
IEC_REG_SIG_TESTER_MODE | 668 | 4 | R/W | Integer | ||
IEC_REG_SIG_TESTER_PAYLOAD_LEN | 672 | 4 | R/W | Integer | ||
IEC_REG_BATTERY_CAPACITY | 676 | 4 | R/W | 100 - 20000 | Integer | 8500 [mAh] |
IEC_REG_HISTORY_PERIOD_LEN | 680 | 4 | R/W | 0 - 3 | Integer | 3 (4 days) |
IEC_REG_METERID | 684 | 16 | R/W | 1 - 15 chars | String | |
IEC_REG_EXIT | 65530 | None | W | None | None | None |
n - number from 0 to 9
Different color coding represents different categories: Common registers, common Counter registers for UDP and LwM2M modes, LwM2M mode registers and Signal Tester mode registers.
Ratios
Ratio | Integer |
---|---|
1000000:1 | 1000000 |
100000:1 | 100000 |
10000:1 | 10000 |
1000:1 | 1000 |
100:1 | 100 |
10:1 | 10 |
1:1 | 1 |
1:10 | -10 |
1:100 | -100 |
1:1000 | -1000 |
1:10000 | -10000 |
1:100000 | -100000 |
1:1000000 | -1000000 |
Converter Modes
- 0: Pulse counter UDP
- 1: Signal Tester
- 2: Pulse counter LwM2M
Managing Devices
To manage the device you need a Chromium-based browser (Google Chrome is recommended) and an optical probe.
Connecting to the GUI and configuring the device
- Connect the optical probe to the computer via USB port.
- Open the browser and navigate to ACR-EX GUI.
- Click on the Connect button.
- The optical head should be detected (make sure the driver was installed), select it and click on the Connect.
- If you connected successfully, you should see the following screen.
- Put the device in the IEC mode and connect the probe to the device:
IEC mode has timeout of 30 seconds. If the device doesn't receive any commands in that time, it will switch back to the previous mode. This timeout is reset with every command received.
- You can either Load Config From Device or Show Default Values (of configuration).
- Configure the device config according to your needs.
- Press Save Config To Device.
Reading the archive
- After connecting to the device, click on the Read Archive button.
- Click on the Read Archive button.
Setting the counter
- After connecting to the device, click on the Set Counter button.
- You can either Load Counter or Set Counter.
- Set the counter value and click on the Set Counter button.
UDP Device Management
UDP is a lightweight and fast communication protocol designed for time-sensitive transmissions such as real-time communication or IoT sensor networks. It provides a connectionless method for sending and receiving data packets over IP networks, ensuring minimal delay and low latency.
UDP is a part of the Internet Protocol suite, working alongside other protocols like TCP to facilitate data exchange over networks.
UDP, unlike TCP, does not establish connections before transmitting data. This means that UDP operates in a connectionless manner, where each UDP packet is sent independently without prior setup or acknowledgment from the receiver.
UDP is not a secure protocol! Unlike TCP, UDP does not provide built-in security features such as encryption, authentication, or integrity checks.
Securing UDP
Using a Private APN can significantly enhance the security of your UDP communications, especially in cellular networks. A Private APN provides a dedicated and isolated network path, which helps to secure data transmission between the devices and the server. Here are the key benefits and steps to secure UDP with a Private APN:
- Isolated network: Private APNs create a separate network environment for your devices, ensuring that data traffic is not shared with other users or devices.
- Enhanced security: With a Private APN, your data is transmitted through a secure tunnel, which prevents unauthorized access and reduces the risk of attacks such as sniffing and spoofing.
- Improved reliability: By using a dedicated network, you can achieve more consistent performance and lower latency compared to public networks.
- Cost saving: Private APNs can help reduce data costs by optimizing data usage and minimizing unnecessary traffic.
Managing Devices
Managing our device using UDP protocol consists of sending downlink commands to the device. The device will respond with an uplink payload containing the requested data or acknowledgment.
LwM2M Device Management
LwM2M is a lightweight and efficient device management protocol designed for IoT devices. It provides a standardized way to manage and monitor IoT devices remotely, enabling a secure and reliable communication between devices and servers. LwM2M is based on the CoAP (Constrained Application Protocol) and uses the OMA (Open Mobile Alliance) LwM2M object model to define the structure and attributes of IoT devices.
Our device uses SIMCOM SIM7022 module for communication which supports the LwM2M protocol.
Data
In LwM2M protocol, objects and resources are fundamental concepts that represent the structure and attributes of IoT devices and their capabilities.
Objects
Objects represent logical groupings of related resources that define the functionality or capabilities of IoT devices. Each object is identified by a unique Object ID, which is a numerical value assigned to it within the LwM2M specification. Objects encapsulate properties, behaviors, and metadata associated with a particular aspect of a device functionality, such as:
- Device information
- Connectivity
- Sensors
- Actuators
- Firmware management
- And others
Resources
Resources are individual data elements or attributes within an object that represent specific properties, states, or capabilities of an IoT device. Each resource is identified by a unique Resource ID within its parent object and is accessed using a combination of an Object ID and a Resource ID.
Resources can be of different types, such as integer, float, string, boolean, opaque, etc., depending on the type of data they represent. Resources may have associated operations or functionalities, such as read, write, execute, or observe, which define how they can be accessed, modified, or monitored.
Data Operations
LwM2M protocol facilitates various data operations for managing and interacting with IoT devices. These operations include read, write, execute, and observe, which allow clients and servers to access, modify, execute, and monitor the data and resources of IoT devices remotely.
Read
Reading data from resources on IoT devices allows retrieving information such as sensor readings, device status, or configuration parameters. Clients can send read requests for specific resources using LwM2M protocols, and devices respond with the requested data.
Write
Writing data to resources enables configuring device settings, updating parameters, or sending commands to IoT devices. Clients can send write requests to modify resource values, and devices acknowledge the changes accordingly.
Execute
Executing commands or actions on IoT devices triggers specific behaviors or operations. Clients can invoke execute requests on executable resources, prompting devices to perform tasks such as resetting, rebooting, or initiating actions based on the request.
Observe
Observing resources enables continuous monitoring of data changes or events on IoT devices. Clients can establish observation relationships with specific resources, and devices notify clients about updates or modifications to the observed data in real-time.
Server
To use LwM2M, you need to set up the server and connect it to the device. The server is responsible for managing device registrations, data communication, firmware updates, and device monitoring. The server can be a cloud-based platform, an on-premises server, or a dedicated LwM2M server. You could use an open-source LwM2M server such as Leshan or a commercial LwM2M platform such as Coiote.
Adding a New Device to the Server
To add a new device to the LwM2M server, you need to register the device with the server by providing the necessary device information, such as the endpoint name and security credentials.
Leshan
For comprehensive setup instructions, refer to the official documentation: Getting Started with Leshan
Leshan supports the following security modes:
- PSK (Pre-shared key)
- RPK (Raw public-key)
- X.509 (Certificate)
- NoSec (No security)
To add a device to a Leshan server, you'll need to configure its endpoint and security mode. If you opt for modes other than "NoSec", identity and key parameters are required for authentication. This ensures a secure and seamless integration of devices into the Leshan ecosystem.
Coiote
Setting up Coiote is straightforward and user-friendly. It's basically signing up for an account and choosing the desired pricing plan.
Coiote supports the following security modes:
- PSK (Pre-shared key)
- NoSec (No security)
To add a device to a Coiote server, you'll need to configure its endpoint and security mode. If you opt for PSK, you'll need to provide a key identity and a key for authentication. The key format can be HEX or plain text. Coiote has a custom name option for better identification.
Client
We use our own C-based LwM2M client for streamlined performance and customized functionality. This tailored solution ensures efficient management of IoT devices to meet our specific needs.
First Time Client Setup
To use LwM2M, you need to set up the device and connect it to the server. The initial setting of the device can be done manually using an optical probe or by us during the production if you provided us with the parameters.
Necessary parameters:
- Server address (URL/IP)
- Bootstrap server
- Server port (5683/5684 - secure)
- Security mode (PSK)
- Pre-shared key
- Connection type (IPV4/IPV6)
- Local port
- Endpoint name
- Binding mode
- Lifetime
In the absence of a security mode and pre-shared key settings, the device will default to a non-secure mode.
ACR-EX Custom LwM2M Objects and Resources
Our device uses custom LwM2M objects and resources to represent its functionality and capabilities. Custom objects and resources in LwM2M offer the flexibility to tailor the device management to specific use cases and requirements.
These objects and resources are defined according to the OMA LwM2M object model and provide a structured representation of the device's properties, states, and behaviors.
By defining custom objects and resources, developers can extend the standard functionality of LwM2M to accommodate unique device features and data points.
Such customization empowers users to efficiently manage diverse IoT devices and extract meaningful insights from their data, enhancing overall system performance and functionality.
Our resource IDs are generated by adding the decimal representation of a hexadecimal command byte to the offset of 27000. For example, the resource ID for the command byte 0xA5
is 27000 + 165 = 27165. You can find the calculated command byte values in the LwM2M resource column of the Uplink command bytes table.
ACR-EX Connection Configuration (Object ID 32769)
Resource ID | Name | Type | Unit | Operations |
---|---|---|---|---|
27183 | APN | String | - | R/W |
27184 | IP | String | - | R/W |
27185 | Port | String | - | R/W |
27186 | PLMNID | String | - | R/W |
27187 | ID | String | - | R/W |
27213 | LWM2MPSKID | String | - | R/W |
27214 | LWM2MPSK | String | - | R/W |
27208 | LWM2MEndpoint | String | - | R/W |
27209 | LWM2MServerURL | String | - | R/W |
27210 | LWM2MServerPort | String | - | R/W |
27211 | LWM2MLocalPort | String | - | R/W |
27212 | LWM2MLifetime | String | - | R/W |
ACR-EX Device Configuration (Object ID 32770)
Resource ID | Name | Type | Unit | Operations |
---|---|---|---|---|
27000 | DeviceReset | String | - | E |
27189 | UnitStr | String | - | R/W |
27190 | ObisCode | String | - | R/W |
27221 | Ratio | String | - | R/W |
27188 | Mode | String | - | R/W |
27178 | DisplayCountTime | String | - | R/W |
27179 | DisplayDateTime | String | - | R/W |
27180 | MaximumDetectorPeriod | String | - | R/W |
27181 | SamplingPeriod | String | - | R/W |
27176 | SendSecondOfDay | String | - | R/W |
27177 | SendSecondOfDaySpread | String | - | R/W |
ACR-EX Gas Meter (ID 3277X)
Resource ID | Name | Type | Unit | Operations |
---|
Note that this feature is currently under development.
Uplink - Payloads Sent by the Converter
Every payload starts with a custom ID and consists of command bytes and data. The command byte is a hexadecimal value that represents the command to be executed. The data is a sequence of bytes that represent the parameters of the command.
Custom ID
Custom ID is a unique identifier for the device. It is represented by a sequence of bytes. The length of a custom ID is up to 64 bytes.
Example | Description | Value |
---|---|---|
0x38 0x30 0x30 0x30 0x30 0x32 | Custom ID | 80002 |
By default, the custom ID is the device's IMEI.
If you are not using Miotiq (IoT connectivity provider), custom ID is prepended by IMSI (15 bytes)!
Periodic Report (0xA5)
This uplink payload is deprecated. Periodic Status Report (0xA7) is currently in use.
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xA5 | Command byte | [1B] | 1 | NONE |
0x4F 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 79 [number] |
0x01 0x00 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1 [-] |
0x4C 0x0E | Battery voltage (CPU) | [2B] (little endian) | 10 - 11 | 3660 [mV] |
0x12 | Signal | [1B] | 12 | 18 [CSQ units] |
0x0C | Temperature (CPU) | [1B] | 13 | 12 [°C] |
0x47 0x20 0xA6 0x66 | Minimum flow rate timestamp | [4B] (little endian) | 14 - 17 | 1722163271 [s] |
0x40 0x42 0x0F 0x00 0x00 0x00 0x00 0x00 | Minimum flow rate | [8B] (little endian) | 18 - 25 | 1000000 [-] |
0xD6 0xF2 0xAA 0x66 | Maximum flow rate timestamp | [4B] (little endian) | 26 - 29 | 1722479318 [s] |
0x40 0x93 0x34 0x02 0x00 0x00 0x00 0x00 | Maximum flow rate | [8B] (little endian) | 30 - 37 | 37000000 [-] |
0xD9 0x99 0xA5 0x66 | 1st report timestamp | [4B] (little endian) | 38 - 41 | 1722128857 [s] |
0x00 0x00 0x00 0x00 | 1st report value | [4B] (little endian) | 42 - 45 | 0 [count] |
... | ... | ... | ... | ... |
0x12 0xBF 0xB2 0x66 | Nth report timestamp | [4B] (little endian) | 1722990354 [s] | |
0x05 0x0A 0x00 0x00 | Nth report value | [4B] (little endian) | 2565 [count] |
Periodic Report Byte Stream Payload Example:
38 30 30 30 30 32 A5 4F 00 00 00 01 00 00 00 4C 0E 12 0C 47 20 A6 66 40 42 0F 00 00 00 00 00 D6 F2 AA 66 40 93 34 02 00 00 00 00 D9 99 A5 66 00 00 00 00 ... 12 BF B2 66 05 0A 00 00
This is a periodic report sent by the converter to the server.
Periodic Report with a Coulomb Counter (0xA6)
This uplink payload is deprecated. Periodic Status Report (0xA7) is currently in use.
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xA6 | Command byte | [1B] | 1 | NONE |
0x05 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 5 [number] |
0x01 0x00 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1 [-] |
0x12 0x0E | Battery voltage (CPU) | [2B] (little endian) | 10 - 11 | 3602 [mV] |
0x12 | Signal | [1B] | 12 | 18 [CSQ units] |
0x12 | Temperature (CPU) | [1B] | 13 | 18 [°C] |
0x06 0x00 | Total consumed energy | [2B] (little endian) | 14 - 15 | 6 [mAh] |
0x2B 0x00 | Equivalent Series Battery Resistance Estimate | [2B] (little endian) | 16 - 17 | 43 [mOhm] |
0xD6 0x0D | Input voltage load | [2B] (little endian) | 18 - 19 | 3542 [mV] |
0x2B | Degree Celsius (CC) | [1B] | 20 | 43 [°C] |
0x47 0x20 0xA6 0x66 | Minimum flow rate timestamp | [4B] (little endian) | 21 - 24 | 1722163271 [s] |
0x40 0x42 0x0F 0x00 0x00 0x00 0x00 0x00 | Minimum flow rate | [8B] (little endian) | 25 - 32 | 1000000 [-] |
0xD6 0xF2 0xAA 0x66 | Maximum flow rate timestamp | [4B] (little endian) | 33 - 36 | 1722479318 [s] |
0x40 0x93 0x34 0x02 0x00 0x00 0x00 0x00 | Maximum flow rate | [8B] (little endian) | 37 - 44 | 37000000 [-] |
0xD9 0x99 0xA5 0x66 | 1st report timestamp | [4B] (little endian) | 45 - 48 | 1722128857 [s] |
0x00 0x00 0x00 0x00 | 1st report value | [4B] (little endian) | 49 - 52 | 0 [count] |
... | ... | ... | ... | ... |
0x12 0xBF 0xB2 0x66 | Nth report timestamp | [4B] (little endian) | 1722990354 [s] | |
0x05 0x0A 0x00 0x00 | Nth report value | [4B] (little endian) | 2565 [count] |
Periodic Report with a Coulomb Counter Byte Stream Payload Example:
38 30 30 30 30 32 A6 05 00 00 00 01 00 00 00 12 0E 12 12 06 00 2B 00 D6 0D 2B 47 20 A6 66 40 42 0F 00 00 00 00 00 D6 F2 AA 66 40 93 34 02 00 00 00 00 D9 99 A5 66 00 00 00 00 ... 12 BF B2 66 05 0A 00 00
This is a periodic report with a Coulomb counter sent by the converter to the server.
Periodic Status Report (0xA7)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xA7 | Command byte | [1B] | 1 | NONE |
0x05 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 5 [number] |
0x01 0x00 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1 [-] |
0x12 0x0E | Battery voltage (CPU) | [2B] (little endian) | 10 - 11 | 3602 [mV] |
0x12 | Signal | [1B] | 12 | 18 [CSQ units] |
0x12 | Temperature (CPU) | [1B] | 13 | 18 [°C] |
0x34 0x21 | Battery capacity | [2B] (little endian) | 14 - 15 | 8500 [mAh] |
0x06 0x00 | Total consumed energy | [2B] (little endian) | 6 [mAh] | |
0x2B 0x00 | Equivalent Series Battery Resistance Estimate | [2B] (little endian) | 43 [mOhm] | |
0xD6 0x0D | Input voltage load | [2B] (little endian) | 3542 [mV] | |
0x2B | Degree Celsius (CC) | [1B] | 43 [°C] | |
0x41 0x43 0x52 0x49 0x4F 0x53 0x00 | Meter ID | [xB] | ACRIOS | |
0x02 | History period length | [1B] | 3 [days] | |
0x60 0x23 0x5D 0x1F | Send timestamp | [4B] (little endian) | 526197600 [s] | |
0x0C 0xD3 0x5B 0x1F | Minimum flow rate timestamp | [4B] (little endian) | 526111500 [s] | |
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 | Minimum flow rate | [8B] (little endian) | 0 [-] | |
0xF4 0x9E 0x5C 0x1F | Maximum flow rate timestamp | [4B] (little endian) | 526163700 [s] | |
0x1A 0x41 0x00 0x00 0x00 0x00 0x00 0x00 | Maximum flow rate | [8B] (little endian) | 16666 [-] | |
0x10 0x0E 0x00 0x00 | Sampling period | [4B] (little endian) | 3600 [s] | |
0x00 0x6A 0x58 0x1F | 1st report timestamp | [4B] (little endian) | 525888000 [s] | |
0x08 0x00 0x00 0x00 | 1st report value | [4B] (little endian) | 8 [count] | |
... | ... | ... | ... | ... |
0x92 0x05 0x00 0x00 | Nth report value | [4B] (little endian) | 1426 [count] |
History period length:
-
0: Only transmits newly collected samples from the past 24 hours.
-
1, 2, 3: Transmits samples from the last day along with an additional history of 1, 2, or 3 preceding days, respectively.
warningThe number of samples transmitted is determined by the sampling rate. The internal buffer capacity is limited to 128 samples. If the number of accumulated samples exceeds this limit, the oldest samples will be overwritten by newer ones, resulting in data loss.
Periodic Status Report Byte Stream Payload Example:
38 30 30 30 30 32 A7 05 00 00 00 01 00 00 00 12 0E 12 12 34 21 06 00 2B 00 D6 0D 2B 41 43 52 49 4F 53 00 03 60 23 5D 1F 0C D3 5B 1F 00 00 00 00 00 00 00 00 F4 9E 5C 1F 1A 41 00 00 00 00 00 00 10 0E 00 00 00 6A 58 1F 08 00 00 00 ... 92 05 00 00
This is a periodic status report sent by the converter to the server.
Read the Archive (0xAA)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xAA | Command byte | [1B] | 1 | NONE |
0x05 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 5 |
0x01 0x00 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1 |
0xFC 0x9F 0x8F 0x1F | Archive start | [4B] | 10 - 13 | 529506300 [s] |
0x2C 0x01 0x00 0x00 | Sampling period | [4B] | 14 - 17 | 300 [s] |
0xC6 0x00 0x00 0x00 | 1st archive value | [4B] | 18 - ^ | 198 [count] |
... | ... | ... | ... | ... |
0xAE 0x04 0x00 0x00 | Nth archive value | [4B] | 1198 [count] | |
0xFF 0xFF 0xFF 0xFE | New timestamp break | [4B] | NONE |
Note that 0xFF 0xFF 0xFF 0xFE serves as a break in case the device stops reporting in scheduled intervals - e.g. in case the battery runs out.
It is followed by timestamp [4B] and the value related to said timestamp [4B] - The format of reports in the archive then follows the usual format. 0xAA is backwards compatible as long as
0xFF 0xFF 0xFF 0xFE
does not occur.
Read the Counter (0xCC)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xCC | Command byte | [1B] | 1 | NONE |
0x72 0x1E 0xA2 0xAB | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x01 0x00 0x00 0x00 | Count | [4B] (little endian) | 6 - 9 |
Read a Device Info (0xDA)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xDA | Command byte | [1B] | 1 | NONE |
0x71 0x1E 0x6B 0x8F | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | Device info | [xB] | 6 - ^ |
Read a Ratio (0xDD)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xDD | Command byte | [1B] | 1 | NONE |
0x71 0x1E 0x6B 0x8F | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x18 0x00 0xC0 0xEB | Ratio | [4B] (little endian) | 6 - 9 |
Ping (0xA0)
Payload Description
Example | Description | Size | Byte Number |
---|---|---|---|
0xA0 | Command byte | [1B] | 1 |
Signal Tester (0xEE)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xEE | Command byte | [1B] | 1 | NONE |
0x00 0x01 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 256 [number] |
0xE8 0x03 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1000 [-] |
0xE8 0x0D | Battery voltage (CPU) | [2B] (little endian) | 10 - 11 | 3560 [mV] |
0x12 | Signal | [1B] | 12 | 18 [CSQ units] |
0x30 | Temperature (CPU) | [1B] | 13 | 48 [°C] |
0xAF 0x25 0x00 0x00 | Pulses | [4B] (little endian) | 21 - 24 | 9647 [count] |
Signal Tester with a Coulomb Counter (0xEF)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xEF | Command byte | [1B] | 1 | NONE |
0x00 0x01 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | 256 [number] |
0xE8 0x03 0x00 0x00 | Ratio | [4B] (little endian) | 6 - 9 | 1000 [-] |
0xE8 0x0D | Battery voltage (CPU) | [2B] (little endian) | 10 - 11 | 3560 [mV] |
0x12 | Signal | [1B] | 12 | 18 [CSQ units] |
0x30 | Temperature (CPU) | [1B] | 13 | 48 [°C] |
0x25 0x00 | Total consumed energy | [2B] (little endian) | 14 - 15 | 37 [mAh] |
0x60 0x01 | Equivalent Series Battery Resistance Estimate | [2B] (little endian) | 16 - 17 | 352 [mOhm] |
0xD7 0x0D | Input voltage under load | [2B] (little endian) | 18 - 19 | 3543 [mV] |
0x1A | Degree Celsius | [1B] | 20 | 26 [°C] |
0xAF 0x25 0x00 0x00 | Pulses | [4B] (little endian) | 21 - 24 | 9647 [count] |
The Table of Signal Values
Value | RSSI dBm | Condition |
---|---|---|
30 | -53 | Excellent |
29 | -55 | Excellent |
28 | -57 | Excellent |
27 | -59 | Excellent |
26 | -61 | Excellent |
25 | -63 | Excellent |
24 | -65 | Excellent |
23 | -67 | Excellent |
22 | -69 | Excellent |
21 | -71 | Excellent |
20 | -73 | Excellent |
19 | -75 | Good |
18 | -77 | Good |
17 | -79 | Good |
16 | -81 | Good |
15 | -83 | Good |
14 | -85 | OK |
13 | -87 | OK |
12 | -89 | OK |
11 | -91 | OK |
10 | -93 | OK |
9 | -95 | Marginal |
8 | -97 | Marginal |
7 | -99 | Marginal |
6 | -101 | Marginal |
5 | -103 | Marginal |
4 | -105 | Marginal |
3 | -107 | Marginal |
2 | -109 | Marginal |
99 | - | Unknown or Undetectable |
Send a Second of the Day (0xB0)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB0 | Command byte | [1B] | 1 | NONE |
0x26 0xED 0x1D 0x39 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x30 0x00 0x00 0xC0 | Second of day | [4B] | 6 - 9 |
Send a Second of the Day - Spread (0xB1)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB1 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Second of day - spread | [4B] (little endian) | 6 - 9 |
Read a Display Count Time (0xB2)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB2 | Command byte | [1B] | 1 | NONE |
0x1F 0x00 0x30 0x10 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x74 0x1E 0xD7 0xE0 | Display count time | [4B] (little endian) | 6 - 9 |
Read a Display Date Time (0xB3)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB3 | Command byte | [1B] | 1 | NONE |
0x71 0x1E 0xEA 0x02 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x18 0x00 0x90 0xC1 | Display date time | [4B] (little endian) | 6 - 9 |
Read a Maximum Detector Period (0xB4)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB4 | Command byte | [1B] | 1 | NONE |
0xXX 0xXX 0xXX 0xXX | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Maximum detector period time | [4B] (little endian) | 6 - 9 |
Read a Sampling Period (0xB5)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB5 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Sampling period | [4B] (little endian) | 6 - 9 |
Read the Config (0xB6)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB6 | Command byte | [1B] | 1 | NONE |
0xEC 0x1D 0x39 0x30 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x00 0x00 0x00 0x00 | Config payload length | [4B] (little endian) | 6 - 9 | |
0xXX ... | Custom APN | [xB] | 10 - ^ | |
0xXX ... | Custom IP | [xB] | ||
0xXX 0xXX 0xXX 0xXX | Custom port | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Custom PLMNID | [4B] | ||
0xXX ... | Custom ID | [xB] | ||
0xXX 0xXX 0xXX 0xXX | Ratio | [4B] (little endian) | ||
0xXX 0xXX 0xXX 0xXX | Mode | [4B] | ||
0xXX ... | UNITSTR | [xB] | ||
0xXX ... | OBISCode | [xB] | ||
0x00 ... | Meter ID | [XB] | ||
0xXX 0xXX 0xXX 0xXX | Second of day | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Second of day - spread | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Display count time | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Display date time | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Maximum detector period | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Sampling period | [4B] | ||
0x00 0x00 | Battery capacity | [2B] (little endian) | ||
0x00 | History period length | [1B] | ||
0xXX ... | LWM2M end point | [xB] | ||
0xXX ... | LWM2M server URL | [xB] | ||
0xXX 0xXX 0xXX 0xXX | LWM2M server port | [4B] | ||
0xXX 0xXX 0xXX 0xXX | LWM2M local port | [4B] | ||
0xXX 0xXX 0xXX 0xXX | LWM2M lifetime | [4B] | ||
0xXX ... | LWM2M PSK ID | [xB] | ||
0xXX ... | LWM2M PSK | [xB] | ||
0xXX 0xXX 0xXX 0xXX | Signal tester period | [4B] | ||
0xXX 0xXX 0xXX 0xXX | Signal tester mode | [4B] | ||
0x00 0x00 0x00 0x00 | Signal tester payload length | [4B] (little endian) |
xB = Variable size
Read an APN (0xB7)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB7 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | Custom APN | [xB] | 6 - ^ |
xB = Variable size
Read an IP (0xB8)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB8 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | Custom IP | [xB] | 6 - ^ |
xB = Variable size
Read a Port (0xB9)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xB9 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Custom port | [4B] (little endian) | 6 - 9 |
Read a PLMN ID (0xBA)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBA | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Custom PLMNID | [4B] (little endian) | 6 - 9 |
Read an ID (0xBB)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBB | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | Custom ID | [xB] | 6 - ^ |
xB = Variable size
Read Mode (0xBC)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBC | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Mode | [4B] (little endian) | 6 - 9 |
Read UNITSTR (0xBD)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBD | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | UNITSTR | [xB] | 6 - ^ |
xB = Variable size
Read OBIS (0xBE)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBE | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | OBIS | [xB] | 6 - ^ |
xB = Variable size
Clear the Archive Acknowledgment (0xBF)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xBF | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 |
Read a Battery Capacity (0xC0)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC0 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x00 0x00 | Battery capacity | [2B] (little endian) | 6 - 7 |
Read a History Period Length (0xC1)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC1 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0x03 | History period length | [1B] | 6 | 4 [days] |
History period length is indexed from 0 to 3, where 0 represents 1 day, 1 represents 2 days, etc.
Read a Meter ID (0xC5)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC5 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0xXX 0x00 | Meter ID | [16B] | 6 - 21 |
Meter ID is a string with up to 15 characters and null terminator.
CRC16 Failed (0xE0)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xE0 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 |
Read a LWM2M Endpoint (0xD0)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD0 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | LWM2M EP | [xB] | 6 - ^ |
xB = Variable size
Read a LWM2M Server URL (0xD1)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD1 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | LWM2M server URL | [xB] | 6 - ^ |
xB = Variable size
Read a LWM2M Server Port (0xD2)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD2 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | LWM2M server port | [4B] (little endian) | 6 - 9 |
Read a LWM2M Local Port (0xD3)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD3 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | LWM2M local port | [4B] (little endian) | 6 - 9 |
Read a LWM2M Lifetime (0xD4)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD4 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | LWM2M lifetime | [4B] (little endian) | 6 - 9 |
Read a LWM2M PSK ID (0xD5)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD5 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | LWM2M PSK ID | [xB] | 6 - ^ |
XB = Variable size
Read a LWM2M PSK (0xD6)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xD6 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX ... | LWM2M PSK | [XB] | 6 - ^ |
XB = Variable size
Read a Signal Tester Period (0xC2)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC2 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Signal tester period | [4B] (little endian) | 6 - 9 |
Read a Signal Tester Mode (0xC3)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC3 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Signal tester mode | [4B] (little endian) | 6 - 9 |
Read a Signal Tester Payload Length (0xC4)
Payload Description
Example | Description | Size | Byte Number | Value |
---|---|---|---|---|
0xC4 | Command byte | [1B] | 1 | NONE |
0x01 0x00 0x00 0x00 | Message sequence number | [4B] (little endian) | 2 - 5 | |
0xXX 0xXX 0xXX 0xXX | Signal tester payload length | [4B] (little endian) | 6 - 9 |
Downlink - Payloads Sent by the Server
The device responds to commands only when they are sent as a reply to a report message. It will not react to commands sent as standalone messages.
Downlink Setters
Command (ASCII) | Description |
---|---|
SET_SEND_DAY_SECOND | Set send day seconds |
SET_SEND_DAY_SECOND_SPREAD | Set send day seconds - spread |
SET_DISPLAY_COUNT_TIME | Set display count time |
SET_DISPLAY_DATE_TIME | Set display date time |
SET_MAXIMUM_DETECTOR_PERIOD | Set maximum detector period |
SET_SAMPLING_PERIOD | Set sampling period |
SET_COUNTER | Set counter |
SET_RATIO | Set ratio |
SET_NBIOT_PORT | Set NBIoT port |
SET_NBIOT_IP | Set NBIoT IP |
SET_NBIOT_APN | Set NBIoT APN |
SET_NBIOT_PLMNID | Set NBIoT PLMNID |
SET_ID | Set ID |
SET_MODE | Set mode |
SET_UNITSTR | Set UNITSTR |
SET_OBIS | Set OBIS |
SET_BATTERY_CAPACITY | Set battery capacity |
SET_HISTORY_PERIOD_LEN | Set history period length |
SET_METER_ID | Set meter ID |
SET_LWM2M_EP | Set LWM2M EP |
SET_LWM2M_URL | Set LWM2M URL |
SET_LWM2M_SERVER_PORT | Set LWM2M server port |
SET_LWM2M_LOCAL_PORT | Set LWM2M local port |
SET_LWM2M_LIFETIME | Set LWM2M lifetime |
SET_LWM2M_PSK_ID | Set LWM2M PSK ID |
SET_LWM2M_PSK | Set LWM2M PSK |
SET_SIGNAL_TESTER_PERIOD | Set signal tester period |
SET_SIGNAL_TESTER_MODE | Set signal tester mode |
SET_CONFIG | Set config |
Downlink Setting Parameter(s)
Parameters are set by sending a payload to the device. The payload consists of a command and a value. The command is an ASCII string that represents the parameter to be set. Command and value are separated by an equal sign [=].
Parameters can be set individually or multiple parameters can be set at once. To set all parameters at once, use the SET_CONFIG command.
Setting parameters related to NB-IoT functionalities will cause the NB-IoT modem to undergo reinitialization in order to apply the new settings.
Example | Description |
---|---|
SET_SEND_DAY_SECOND=24 | Set Send day seconds parameter value to 24 |
GET_SEND_DAY_SECOND command from the example can be replaced by any command from the Downlink Setters list except GET_CONFIG.
ASCII stream payload example:
SET_SEND_DAY_SECOND=24
Multiple setter commands can be combined in one payload. Each command is separated by a blank space (
Example | Description |
---|---|
SET_SEND_DAY_SECOND=24 SET_DISPLAY_COUNT_TIME=10 | Set Send day seconds to 24 and Display count time to 10 |
ASCII stream payload example:
SET_SEND_DAY_SECOND=24 SET_DISPLAY_COUNT_TIME=10
CRC Error Detection
A payload can be secured by CRC. To enable CRC, add the MESSAGE_CRC16
command at the end of the payload.
If the payload secured by CRC fails the check, the device discards the payload and informs the server to process a new command or interrupt the processing.
Example | Description |
---|---|
SET_SEND_DAY_SECOND=24 SET_DISPLAY_COUNT_TIME=10 MESSAGE_CRC16=D6FF | Set two parameters and secure payload with CRC check |
ASCII stream payload example:
SET_SEND_DAY_SECOND=24 SET_DISPLAY_COUNT_TIME=10 MESSAGE_CRC16=D6FF
To use CRC, the CRC check value must be calculated and added to the payload. The CRC check value is a 16-bit integer that represents the CRC of the payload.
Payload to be secured by CRC:
SET_CONFIG=auto,192.168.0.20,4242,0,901288002328121,-1000,0,*m3,3.0.0,14400,300,10,6,60,1800 CLEAR_ARCHIVE RESET
At the end of the payload has to be a blank space!
The CRC check value can be calculated using the following online tool: CRC calc (CRC-16/AUG-CCITT).
Calculated CRC check value:
7AE6
To secure the payload with CRC, add MESSAGE_CRC16=CHECK_VALUE at the end of the payload.
Secured payload with CRC:
SET_CONFIG=auto,192.168.0.20,4242,0,901288002328121,-1000,0,*m3,3.0.0,14400,300,10,6,60,1800 CLEAR_ARCHIVE RESET MESSAGE_CRC16=7AE6
Set Config (SET_CONFIG)
SET_CONFIG command is used to set multiple parameters at once.
Parameter Number | Parameter | Data type |
---|---|---|
1 | Custom APN | String |
2 | Custom IP | String |
3 | Custom port | Integer |
4 | Custom PLMNID | Integer |
5 | Custom ID | String |
6 | Ratio | Integer |
7 | Mode | Integer |
8 | UNITSTR | String |
9 | OBIS | String |
10 | Second of day | Integer |
11 | Second of day - spread | Integer |
12 | Display count time | Integer |
13 | Display date time | Integer |
14 | Maximum detector period | Integer |
15 | Sampling period | Integer |
16 | LWM2M Endpoint | String |
17 | LWM2M Server URL | String |
18 | LWM2M Server Port | Integer |
19 | LWM2M Local Port | Integer |
20 | LWM2M Lifetime | Integer |
Parameters are separated by a comma [,].
Example | Description |
---|---|
SET_CONFIG=auto,192.168.0.20,4242,0,901288002328121,-100,0,*m3,3.0.0,14400,300,10,6,60,1800 | Set config parameters |
SET_CONFIG=auto,192.168.0.20,4242,0,901288002328121,-100,0,*m3,3.0.0,14400,300,10,6,60,1800
Downlink Getters
Command (ASCII) | Description | Answer |
---|---|---|
GET_DEVICE_INFO | Get device info | 0xDA |
GET_SEND_DAY_SECOND | Get send day seconds | 0xB0 |
GET_SEND_DAY_SECOND_SPREAD | Get send day seconds - spread | 0xB1 |
GET_DISPLAY_COUNT_TIME | Get display count time | 0xB2 |
GET_DISPLAY_DATE_TIME | Get display date time | 0xB3 |
GET_MAXIMUM_DETECTOR_PERIOD | Get maximum detector period | 0xB4 |
GET_SAMPLING_PERIOD | Get sampling period | 0xB5 |
GET_COUNTER | Get counter | 0xCC |
GET_RATIO | Get ratio | 0xDD |
GET_CONFIG | Get config | 0xB6 |
GET_NBIOT_PORT | Get NBIoT port | 0xB9 |
GET_NBIOT_IP | Get NBIoT IP | 0xB8 |
GET_NBIOT_APN | Get NBIoT APN | 0xB7 |
GET_NBIOT_PLMNID | Get NBIoT PLMNID | 0xBA |
GET_ID | Get ID | 0xBB |
GET_MODE | Get mode | 0xBC |
GET_UNITSTR | Get UNITSTR | 0xBD |
GET_OBIS | Get OBIS | 0xBE |
GET_BATTERY_CAPACITY | Get battery capacity | 0xC0 |
GET_HISTORY_PERIOD_LEN | Get history period length | 0xC1 |
GET_METER_ID | Get meter ID | 0xC5 |
GET_LWM2M_EP | Get LWM2M EP | 0xD0 |
GET_LWM2M_URL | Get LWM2M URL | 0xD1 |
GET_LWM2M_SERVER_PORT | Get LWM2M server port | 0xD2 |
GET_LWM2M_LOCAL_PORT | Get LWM2M local port | 0xD3 |
GET_LWM2M_LIFETIME | Get LWM2M lifetime | 0xD4 |
GET_LWM2M_PSK_ID | Get LWM2M PSK ID | 0xD5 |
GET_LWM2M_PSK | Get LWM2M PSK | 0xD6 |
GET_SIGNAL_TESTER_PERIOD | Get signal tester period | 0xC2 |
GET_SIGNAL_TESTER_MODE | Get signal tester mode | 0xC3 |
Downlink Getting Parameter(s)
Parameters are retrieved by sending a payload to the device. The payload consists of a command(s). The command is an ASCII string that represents the parameter to be retrieved.
Parameters can be retrieved individually or multiple parameters can be retrieved at once. To retrieve all parameters at once, use the GET_CONFIG command.
Example | Description | Answer |
---|---|---|
GET_SEND_DAY_SECOND | Get Send day seconds parameter value | 0xB0 |
GET_SEND_DAY_SECOND command from the example can be replaced by any command from Downlink Getters list except GET_CONFIG.
Multiple getter commands can be combined in one payload. Each command is separated by a blank space [ ].
Example | Description |
---|---|
GET_SEND_DAY_SECOND GET_DISPLAY_COUNT_TIME | Get Send day seconds and Display count time |
Get Config (GET_CONFIG)
GET_CONFIG command is used to retrieve all the parameters at once.
Read Archive (READ_ARCHIVE)
Read archive command is used to retrieve the archive data from the device within a specified time frame.
Parameter Number | Parameter | Data type |
---|---|---|
1 | Start timestamp | Integer |
2 | End timestamp | Integer |
Timestamps are in seconds since January 1, 2008, UTC.
Example | Description | Answer |
---|---|---|
READ_ARCHIVE=500000000,600000000 | Read archive | 0xAA |
READ_ARCHIVE=500000000,600000000
Downlink Extra Actions
Command (ASCII) | Description | Answer |
---|---|---|
MESSAGE_CRC16 | CRC check | 0xE0 |
CLEAR_ARCHIVE | Clear archive | 0xBF |
RESET | Reset | NONE |
Calculations
Timestamp
uint32_t getTimeStampNow(uint8_t* buffer)
{
extern volatile uint32_t year;
extern volatile uint32_t month;
extern volatile uint32_t day;
extern volatile uint32_t hour;
extern volatile uint32_t minute;
extern volatile uint32_t second;
time_t timestamp;
struct tm currTime;
currTime.tm_year = year - 1900;
currTime.tm_mday = day;
currTime.tm_mon = month - 1;
currTime.tm_hour = hour;
currTime.tm_min = minute;
currTime.tm_sec = second;
timestamp = mktime(&currTime);
timestamp -= 1199145600; // Subtract 1.1.2008 epoch offset
if(buffer)
{
memcpy(buffer, ×tamp, 4);
}
return (uint32_t) timestamp;
}
The getTimeStampNow
function calculates the timestamp based on the current date and time, measuring time from January 1, 2008, in UTC.
The year
, month
, day
, hour
, minute
, and second
variables are updated by the device's NB-IoT module. The getTimeStampNow
function calculates the timestamp based on the current date and time.
Min/Max flow rate
Min flow rate is initialized to the maximum possible value of 64 byte integer, and max flow rate is initialized to the zero.
If calculated flow rate is less than the min flow rate, the min flow rate is updated with the calculated flow rate. If calculated flow rate is greater than the max flow rate, the max flow rate is updated with the calculated flow rate.
- Multiplication by 1,000,000: This scaling factor ensures that the flow rate calculation results in whole numbers rather than fractions.
- Timestamp Difference: The difference between the two timestamps represents the interval between pulse count checks. This interval is crucial for calculating the rate of change accurately.
- Pulse-to-Unit Ratio: The pulse-to-unit ratio is used to convert the pulse count to the desired unit of measurement. This ratio is set by user and is used by backend parser to convert the flow rate to the appropriate unit.
Example calculation of flow rate
This number is send to backend and parsed with the ratio to get the flow rate in the desired unit. If the ratio is 1000:1, the flow rate is calculated as follows:
Troubleshooting & FAQ
The device is not connecting to the GUI
- Please, make sure to use a Chromium based browser, we strongly recommend to use Google Chrome (other Chromium based browsers still may cause unexpected issues). Make also sure that the serial line is not opened on any other serial line monitor.