Skip to content

AkuaTech/eineage-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ESP32 EM2M MQTT

MQTT-based telemetry system for SELEC EM2M energy meter using ESP32.

This project demonstrates a complete IoT pipeline: ESP32 → Modbus (EM2M) → MQTT → Cloud / Dashboard

Features

  • Clean integration with EM2M Modbus driver
  • Publishes structured JSON data
  • Multi-rate telemetry:
    • Fast (3s): Voltage, Current, Frequency, PF
    • Power (10s): Active/Reactive/Apparent Power
    • Energy (60s): Energy + Demand metrics
  • MQTT ready (HiveMQ, Mosquitto, etc.)

Hardware

  • ESP32
  • MAX485 (RS485 to TTL)
  • SELEC EM2M Energy Meter

Wiring

ESP32 MAX485
TXD2 DI
RXD2 RO
GPIO4 RE/DE

Topics

em2m/device-id/fast em2m/device-id/power em2m/device-id/energy

Example Payload

{ "voltage": 230.5, "current": 0.42, "frequency": 50.0, "pf": 0.98 }

Setup

  1. Install dependencies:

    • WiFi
    • PubSubClient
    • EM2M driver
  2. Replace user configurable settings

    • WiFi Ssid
    • WiFi Password
    • MQTT Broker
    • MQTT Port
    • MQTT ClientId
    • MQTT Topics
  3. Upload to ESP32

    • Select correct board and port
    • Flash using ArduinoIDE / PlatformIO

Architecture

ESP32 reads meter data via Modbus RTU (RS485) Data is processed using EM2M driver JSON payloads are published to MQTT broker Can be consumed by dashboards, databases, or analytics systems

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors