Multi-protocol reader for ESP32-S3-ETH with support for RS-485 and M-Bus
Provided by the customer:
Breadboard
ESP32-S3-ETH
RS-485 TTL modules HW-519 — 4 pcs.
Multiplexers: HW-178 or CJMCU-4051
M-Bus master to TTL converter
DC-DC converter 24V → 5V
Power supply 24V 3A
Temperature sensor XY-MD02
2 water meters with M-Bus overlays
Sharky 775 heat meter with M-Bus module
NIK meters:
NIK 2100 AP6T.2200.MC.11
NIK 2307 0.5s ART T.1620.MC.22
Manufacturer documentation on the RS-485 protocol (for meter operation)
1. Hardware platform:
Controller: ESP32-S3-ETH
Available UARTs: 3 hardware UARTs
Converters:
5 x RS485-TTL (HW-519 or compatible)
1 x M-Bus-TTL Master
Multiplexer: HW-178 or CJMCU-4051
Additional modules: DC-DC, temperature/environment sensors
2. Connection:
One UART (UART1 or another available) of ESP32 is used for reading from 6 channels via the multiplexer.
The multiplexer switches access to one of the 6 converters at any given time.
Multiplexer switching logic is implemented through 3 GPIO (S0, S1, S2).
3. Main firmware functionality:
3.1. M-Bus (1 channel)
Scanning devices on M-Bus: identifying active addresses
Polling each M-Bus device by its unique address (identifier)
Collecting and parsing consumption values or other indicators
3.2. RS-485 (5 channels)
Scanning each of the 5 RS-485 channels for devices (can be implemented via polling known addresses or NIK protocols)
Polling each device on the channel (address, model)
Supporting requests for NIK 2100 and NIK 2307 (details in notes)
3.3. Generating output data
All results should be structured in JSON format, for example :
{
"data": [
{
"device": "NIK 2100 AP6T.2200.MC.11",
"id": "1234567890",
"type": "rs485-1",
"value": "128.45",
"timestamp": "2025-05-05T12:34:56"
}
// ...other devices
]
}
The final format will be determined during collaboration
4. Firmware requirements:
Output file in .ino format for Arduino framework (for PlatformIO or Arduino IDE)
Implement polling loop:
Polling interval — configurable (e.g., once every 5 minutes)
Store JSON results in RAM (output via Serial, UART, or Ethernet)
Timestamps — via RTC or NTP (if needed)
5. Development result:
Ready and tested .ino firmware file that:
polls all 6 channels (M-Bus and RS485-1…5)
generates valid JSON with device data
outputs JSON via Serial
2. Firmware documentation
Notes:
Additional information regarding RS-485 operation for NIK meters:
NIK 2100 AP6T.2200.MC.11 and NIK 2307 0.5s ART T.1620.MC.22 use a protocol based on IEC 62056-46, -53, -61, -62 standards, which involves HDLC framing and COSEM/DLMS data structures.
Communication with the meter includes stages:
Initialization of connection (sending SNRM frame and receiving UA response).
Authorization via AARQ packet with password (user, operator, or administrator).
Processing AARE response to verify authorization.
After authorization — exchanging GET requests using OBIS codes to read indicators.
Ending session with DISC packet.
Authorization uses a 16-byte password transmitted in the AARQ field. Access type (user/operator/admin) is set in the user ID.
After 5 unsuccessful authorization attempts with the same ID, access is blocked for 30 minutes.
All packets are wrapped in HDLC structure with CRC checksums (calculated with 16-bit CRC, algorithm provided in the documentation).
Meter addressing is done in HDLC format based on serial number (conversion algorithm also provided in the documentation).
Note that not all meters may respond to address scans — in such cases, polling by a known list of serial numbers is possible.
-
282 1 0 Good day, if you have all the documentation with the set of commands, I am ready to complete your task
-
это на ПК даже будет довольно сложно реализовать, а вы хотите на ЕСП32 что бы фрилансер сделал
нанимайте команду какуюто или фирму
-
Добрый день!
Для этого проекта ESP 32 будет явно слабовата для стандарта DLMS/COSEM запроса. Если взять RPI можно продолжить разговор...
-
Current freelance projects in the category C & C++
Reverse engineering of console utilities for querying SSD controllers (Flash ID)1. Purpose of the work Extraction of the application programming interface (API) for interaction with SSD/NVMe controllers from the provided set of console utilities (Phison, Silicon Motion, Realtek, Maxiotek, Marvell, JMicron, etc.). The result should be working code in C/C++… C & C++, Desktop Apps ∙ 6 days back ∙ 6 proposals |
Development of a Minecraft Java Seed Map / Seed Viewer for the websiteDevelopment of Minecraft Java Seed Map / Seed Viewer for the websiteProject Description A browser-based tool Minecraft Java Seed Map / Seed Viewer needs to be developed, which will work on our website and allow the user to enter a seed from Minecraft Java Edition and view an… C & C++, HTML & CSS ∙ 6 days 7 hours back ∙ 15 proposals |
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x)
22 USD
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x) on the identical hardware platform (ESP32 + SX1268, 2W) based on the criteria of range, throughput, link stability, and power consumption. Conduct tests with… C & C++, C# ∙ 10 days 14 hours back ∙ 2 proposals |
Consultation and audit of the current project on Odoo 19 Community EditionWe are looking for an Odoo Developer — a solo developer with experience in Odoo 19 Community Edition, including using Claude Code. We need a specialist who has successfully implemented projects in Odoo and practical experience in development using Claude Code. Important: we only… C & C++, Javascript and Typescript ∙ 13 days 15 hours back ∙ 8 proposals |