Home Assistant Energy Meter: MQTT, Modbus TCP & IAMMETER
Home Assistant Energy Meter: MQTT, Modbus TCP & IAMMETER
Home Assistant Power Meter Integration: MQTT, Modbus TCP and IAMMETER-Link
IAMMETER energy meters can be integrated with Home Assistant through local HTTP, Modbus TCP, or MQTT. The best method depends on whether you prefer an official integration, UI-based setup, fast local updates, MQTT auto-discovery, or continued use of IAMMETER Cloud.
This guide compares the available methods and directs you to the appropriate setup guide. It covers all current IAMMETER energy meters. The discontinued WEM3162 is not included.
Quick recommendations:
Choose Home Assistant Core if you want the official built-in integration and a 30-second update interval is sufficient.
Choose HACS HTTP if you prefer UI configuration and do not need fast updates.
Choose HACS Modbus if you want UI configuration with faster local data for dashboards and automations.
Choose Home Assistant Modbus if you are comfortable with YAML and want full control over registers, sensors, and polling intervals.
Choose MQTT Discovery if you already use MQTT and want Home Assistant to create the device and entities automatically.
Choose MQTT Manual if you need complete control over MQTT topics, templates, and entity definitions.
MQTT Manual and MQTT Discovery change the meter's upload mode to MQTT. In these modes, the meter does not simultaneously upload measurements to IAMMETER Cloud. Local HTTP and Modbus TCP integrations can continue to work while the meter uploads to IAMMETER Cloud.
1. Official Home Assistant Core integration
The official IAMMETER integration is included in Home Assistant and reads the meter's local HTTP API. It does not require HACS or an internet connection between Home Assistant and the meter.
Main characteristics:
configured in configuration.yaml;
local HTTP polling every 30 seconds;
can be used together with IAMMETER Cloud;
imported and exported energy entities include the metadata required by the Home Assistant Energy Dashboard;
no automatic device discovery.
Use this method when stability and official Home Assistant support matter more than fast refresh rates.
Official IAMMETER integration in Home Assistant
2. Home Assistant Modbus TCP integration
Home Assistant's built-in Modbus integration reads the meter's local Modbus TCP registers. It is suitable for power-based automations, solar-surplus control, and other applications that need faster updates.
Main characteristics:
configured in YAML;
configurable scan_interval, commonly 1–5 seconds for real-time automation;
completely local and independent of the internet;
can be used together with IAMMETER Cloud;
requires the correct register address, data type, scale, and Energy Dashboard metadata.
Use a longer polling interval when second-level data is not required. Avoid running multiple high-frequency Modbus clients against the same meter.
Home Assistant Modbus TCP energy meter guide
IAMMETER Modbus TCP register map
3. HACS HTTP integration
The IAMMETER HTTP custom integration provides a UI-based alternative to the official YAML integration. It reads /monitorjson over the local network and creates the corresponding Home Assistant entities.
Main characteristics:
installed through HACS;
configured through Home Assistant's Devices & Services UI;
local HTTP polling every 60 seconds;
SSDP can assist device discovery;
compatible with IAMMETER Cloud and the Energy Dashboard.
Use this method when you prefer UI configuration and a one-minute refresh interval is sufficient.
IAMMETER HACS HTTP integration
HACS HTTP setup guide
4. HACS Modbus integration
The IAMMETER Modbus custom integration combines local Modbus TCP polling with Home Assistant UI configuration. It is the most convenient option for users who need faster updates but do not want to define every register in YAML.
Main characteristics:
installed through HACS and configured in the UI;
configurable scan interval, with a default of 3 seconds in the updated integration;
local operation and compatibility with IAMMETER Cloud;
creates power and imported/exported energy entities with the appropriate Home Assistant metadata;
supports all current IAMMETER meters, with different entity counts for single-phase and three-phase models.
IAMMETER HACS Modbus integration
HACS Modbus setup guide
5. Manual MQTT integration
In Manual MQTT mode, the meter publishes measurement data to your MQTT broker and you define the corresponding sensors in Home Assistant.
Meter-side configuration and Home Assistant configuration are separate:
Configure the broker address, port, username, and password in the meter's latest WebUI.
Enable the MQTT integration in Home Assistant.
Define the required MQTT sensors and JSON templates in YAML.
This method is useful when several applications need to subscribe to the same measurements, or when you need custom topics and entity definitions.
Configure an IAMMETER WiFi Energy Meter with an MQTT server
Manual MQTT energy meter setup for Home Assistant
6. Home Assistant MQTT Discovery
MQTT Discovery is intended for users who want the least manual configuration. After you configure the broker and enable HA MQTT Discovery in the meter WebUI, Home Assistant automatically creates the IAMMETER device and its entities.
The generated imported and exported energy entities include:
unit_of_measurement: kWh;
device_class: energy;
state_class: total_increasing.
These attributes provide the metadata required for use in the Home Assistant Energy Dashboard.
MQTT Discovery is supported by all current IAMMETER energy meters. Single-phase and three-phase models create different numbers of entities according to their measurement channels.
Home Assistant MQTT Discovery setup
IAMMETER MQTT Discovery guide
Upgrade to the latest IAMMETER firmware
Supported IAMMETER energy meters
All current IAMMETER energy meters support the integration methods described above. The main difference in Home Assistant is the number of phases or measurement channels and therefore the number of entities created.
WEM3046T and WEM3046TE measure the 5 A secondary output of external current transformers. Applying the CT ratio is a requirement of this metering arrangement, not a Home Assistant compatibility limitation.
Use IAMMETER energy entities in the Energy Dashboard
Home Assistant's Energy Dashboard needs cumulative imported and exported energy entities in kWh, normally with:
device_class: energy;
state_class: total_increasing.
The current Core, HACS HTTP, HACS Modbus, and MQTT Discovery integrations provide the required metadata for their imported/exported energy entities. With manual Modbus or Manual MQTT configuration, you must add the correct unit, device class, and state class yourself.
Do not use an instantaneous power entity in watts as a substitute for a cumulative energy entity in kWh.
Send existing Home Assistant energy data to IAMMETER Cloud
The methods above bring IAMMETER meter data into Home Assistant. IAMMETER-Link works in the opposite direction: it uploads energy entities that already exist in Home Assistant to an IAMMETER Virtual Meter and IAMMETER Cloud.
This is useful when an inverter or third-party meter already has a Home Assistant integration, but you also want IAMMETER Cloud dashboards, reports, or multi-site access.
IAMMETER-Link currently provides:
HACS and UI-based configuration;
single-phase and three-phase virtual-meter mapping;
a 300-second upload interval with IAMMETER Basic;
a 60-second upload interval with IAMMETER Pro.
Connect Home Assistant energy devices to IAMMETER Cloud
IAMMETER-Link GitHub repository
Home Assistant energy monitoring examples
After the meter is integrated, its real-time power and cumulative energy data can be used for:
solar generation, household consumption, and grid import/export monitoring;
real-time relay control using Modbus TCP;
Home Assistant and Grafana dashboards;
solar-surplus EV charging;
solar-surplus water heating.
Need help?
If you have questions about firmware, entity configuration, Energy Dashboard setup, or choosing an integration method, visit the IAMMETER community forum.
We can provide kinds of online energy monitoring system for sale, anything you need, please contact us.

Comments
Post a Comment