Documentation

Test ioBroker Energy Meter Integration with IAMMETER Simulator

Read simulated meter data in ioBroker, build a Lovelace energy dashboard and test grid-power automation over HTTP, with optional Modbus/TCP and MQTT integration.

Before you start

Use IAMMETER Simulator to read voltage, current, power and cumulative energy in ioBroker, build a live dashboard and test grid-power automation without a physical meter.

This tutorial starts with WEM2067 HTTP data: channel A represents solar generation and channel B represents grid import/export. You will get readings every 10 seconds, a Lovelace dashboard, power history and a grid-status automation example. The later sections cover the independent public Modbus/TCP service and optional MQTT testing.

You need an internet-connected ioBroker installation and a browser. Lovelace here is an ioBroker visualization adapter; a separate Home Assistant installation is not required.

The supplied tutorial package records testing on 12 November 2026 with js-controller 7.2.5, Admin 8.3.5, Parser 4.0.2, Lovelace 7.1.0, History 5.1.1, JavaScript 10.4.4 and Modbus 9.2.1. These are the recorded test versions. MQTT is an optional integration approach, not part of that recorded ioBroker validation.

Install the adapters from Adapters and create their instances. The examples use parser.0, lovelace.0, history.0 and javascript.0; adjust all matching instance IDs if your instance numbers differ. Screenshots, object names, configuration files and dashboard labels are in English.

The Admin interface is usually at http://YOUR_IOBROKER_HOST:8081/. Use the ports configured in your own deployment. The ioBroker host or container must resolve simulator.iammeter.com and reach HTTPS port 443; a working browser connection alone does not verify runtime connectivity.

PurposeAdapter
Read HTTP data periodicallyparser
Display the dashboardlovelace
Store power historyhistory
Run the demonstration automationjavascript
Optional Modbus/TCP connectionmodbus

Download the example files

Download the files below. If your browser displays a configuration file as text, save it locally using the listed filename.

For the complete HTTP dashboard, use the objects JSON, the JavaScript example and the Lovelace YAML. The Parser CSV is an alternative for testing HTTP readings only; it does not include Lovelace entity mappings or history settings.

The objects JSON creates or updates parser.0.iammeter2067.*. Check that this demonstration namespace is not already used for another device: importing it will overwrite the configuration of matching objects.

FilePurpose
02-entities.objects.json14 Parser states, Lovelace entity mappings and history settings for both power readings
03-grid-status.jsGrid-status demonstration script
04-lovelace-dashboard.yamlDashboard layout
01-parser-WEM2067.csvAlternative Parser-only rules
05-modbus-registers.csvReference table for 22 Modbus readings
05-modbus-native.jsonMatching native Modbus configuration fragment for comparison

1. Open the WEM2067 simulator

Open the data-source selector, choose Inverter and grid, then open WEM2067. In this default scenario, channel A measures simulated solar generation and channel B represents the grid connection.

WEM2067 has two channels and no C channel. These roles come from the selected simulation scenario. With a physical meter, identify channel roles and power direction from the actual wiring.

A separate request to the public HTTP endpoint below uses the default Inverter and grid source. Changing the scenario in your browser does not automatically change ioBroker requests, because ioBroker does not inherit the browser cookie.

ChannelScenario rolePower direction
ASolar inverterPositive means generation
BGrid connectionPositive means import; negative means export

WEM2067 HTTP endpoint

https://simulator.iammeter.com/WEM2067/monitorjson
WEM2067 simulator showing voltage, current, power and energy for channels A and B
The supplied screenshot shows evening readings: solar generation is zero and the grid is importing power.

2. Read data over HTTP

Open Instances → parser.0 → Settings and apply the settings below. Keep invalid-certificate acceptance disabled. Enable updates for unchanged values so successful polls refresh timestamps even when a reading remains the same; the automation uses these timestamps to detect stale data.

The objects file uses ioBroker’s object-ID-to-configuration format. It defines 14 numeric states for the two channels, including the URL, regular expressions, units, Lovelace names and power-history settings.

  1. Save the Parser settings and enable the instance.
  2. Open Objects and choose Add objects tree from JSON file. Select Text, paste the complete contents of 02-entities.objects.json, and choose Import objects. Alternatively, select From file and import the same JSON.
  3. Wait about 10 seconds, filter the object list by parser.0.iammeter2067, and expand the tree.
  4. Check voltage, current, active power, forward and reverse energy, frequency and power factor for both channels.
Parser settingValue
Poll interval10000 ms
Request timeout8000 ms
Accept invalid certificatesDisabled
Update unchanged valuesEnabled
ioBroker Objects view showing channel A and B power and power-factor states
Filter by parser.0.iammeter2067 to inspect the imported states; this screenshot filters further to power-related values.

2.1. Understand the readings

Datas contains one array per channel. For example, parser.0.iammeter2067.B.power reads Datas[1][2]. HTTP values are already in engineering units: use factor 1 and offset 0, without applying Modbus register scaling.

Parser extracts the numbers with regular expressions supporting negative values, integers, decimals and scientific notation. Its expression field is not JSONPath; do not paste Datas[1][2] into that field.

Power factor is displayed as the returned ratio, such as 0.999, rather than a percentage. Channel B forward energy is grid import energy, and reverse energy is grid export energy. Cumulative counters may start above zero.

Check that timestamps keep advancing and states have ack=true and q=0. Old values may remain visible after a connection failure; a displayed number alone does not prove that the source is online.

For HTTP-only testing, you can instead import 01-parser-WEM2067.csv into the Parser rule table. Do not import the CSV again when using the full objects JSON for this dashboard.

Index within each channelMeasurementUnit
0VoltageV
1CurrentA
2Active powerW
3Forward cumulative energykWh
4Reverse cumulative energykWh
5FrequencyHz
6Power factorDimensionless

Channel arrays

Datas[0] = Channel A
Datas[1] = Channel B

2.2. Add the grid-status automation

In Scripts, create a JavaScript script, paste the contents of 03-grid-status.js and start it. The script reads channel B power and writes a demonstration status to 0_userdata.0.iammeterDemo.gridStatus.

This example only updates a text state and logs status changes. It does not operate loads or send external notifications. A timer also checks data age, so the status can change to Data unavailable when meter updates stop.

ConditionStatus
Power below 0 WExporting to grid
Power above 1000 WGrid import exceeds 1000 W
Power from 0 to 1000 W, including both limitsNormal grid import
Invalid data, bad quality, unacknowledged state or data older than 45 secondsData unavailable

2.3. Add history and the Lovelace dashboard

Enable history.0 and select it as the history instance in lovelace.0 settings. The objects JSON enables history only for the two power states.

Open Lovelace at the URL below, using your actual host and mapped port. Docker users must expose the Lovelace port; the supplied test environment used port 18091 instead of the default 8091.

History charts need time to collect real samples. They do not contain a prefilled day of data. The supplied screenshot shows evening grid import with zero solar generation.

Entity IDs are fixed in the objects JSON and the grid-status script. If Entity not found appears, check that lovelace.0 is enabled in the relevant object’s custom settings, that its entity type is sensor and that its name matches the YAML; then restart lovelace.0.

  1. Create a separate demonstration dashboard to avoid replacing an existing layout.
  2. Choose Edit dashboard, open the dashboard menu and select Raw configuration editor. If prompted to take control of the dashboard, switch to manual editing.
  3. Paste the complete 04-lovelace-dashboard.yaml configuration and save it.
  4. Confirm both channels, energy counters and the grid-status sensor are shown. Wait for multiple polls to see the power-history curves.

Default Lovelace URL

http://YOUR_IOBROKER_HOST:8091/

Example entity IDs

sensor.iammeter2067_a_power
sensor.iammeter2067_b_power
sensor.iammeter_grid_status
ioBroker Lovelace dashboard with solar power, grid import, energy counters and power history
The dashboard combines live channel readings, power history and the grid-status demonstration.

2.4. Switch to a physical meter

Replace the URL in every Parser rule with your meter’s LAN endpoint, such as the example below. Verify access from the ioBroker runtime before checking the dashboard.

Check the returned data structure, channel count and units for your actual model and firmware. Do not assume every IAMMETER device uses the same seven-value channel array as this WEM2067 example.

If the device requires authentication, configure its supported authentication method. The public simulator needs no username or password; this does not require disabling protection on a physical device.

Example physical-meter endpoint

http://192.168.1.100/monitorjson

3. Test Modbus/TCP

The public Modbus/TCP endpoint is separate from the HTTP meter page and exposes the WEM3050T three-phase register layout. Opening WEM2067 in a browser does not turn the shared TCP service into a two-channel meter.

Install the modbus adapter and create a TCP client (Master) instance. Configure the connection below and use Holding Registers, function code 03.

SettingValue
ModeTCP client / Master
Hostsimulator.iammeter.com
TCP port502
Unit ID1
Poll interval10000 ms
Timeout5000 ms
Register areaHolding Registers (FC03)

3.1. Configure the registers

Use zero-based register addresses, big-endian byte order and the high word first for 32-bit values. Disable register aliases to enter the addresses below directly; with aliases enabled, address 0 corresponds to 40001.

Each 32-bit value occupies two registers. Set every offset to 0. Signed int32 active power preserves negative grid-export readings. Energy scaling by 0.00125 is equivalent to dividing by 800; do not enter 800 as the multiplier.

Enable Poll for every row and leave CW (cyclic write) and WP (write pulse) disabled. Switch to expert mode if the factor and offset columns are hidden.

05-modbus-registers.csv lists all 22 readings. 05-modbus-native.json provides the matching native configuration fragment for comparison. These reference files are not replacements for the Parser objects JSON import.

MeasurementA addressB addressC addressTypeFactorUnit
Voltage01020uint16be0.01V
Current11121uint16be0.01A
Active power21222int32be1W
Forward energy41424uint32be0.00125kWh
Reverse energy61626uint32be0.00125kWh
Power factor81828int16be0.001—

3.2. Check frequency and totals

Configure the remaining shared readings below. In the default scenario, A represents generation, B represents the grid and C active power is zero. C voltage is not necessarily zero.

Check that values update and their quality is good. HTTP and Modbus differ in device layout and numeric precision; compare matching channel roles, units and sample times rather than expecting every instantaneous value to be identical.

MeasurementAddressTypeFactorUnit
Frequency30uint16be0.01Hz
Total active power32int32be1W
Total forward energy34uint32be0.00125kWh
Total reverse energy36uint32be0.00125kWh
ioBroker Modbus objects showing three-phase power and total active power
The public TCP service uses three-phase registers independently of the WEM2067 HTTP example.

4. Understand the simulated data

Simulation values change with real time through an approximately 24-hour scenario cycle. Polling does not advance the simulation clock. Solar generation can be near zero at night, while cumulative energy counters can continue to grow and should not be assumed to reset every day.

Browser scenario selection is session-specific. For another independent client, use the data-source mechanism described in the simulator documentation; changing a browser page alone does not configure ioBroker.

5. Try other tests

MQTT: upload simulator readings to your own MQTT broker and subscribe with the ioBroker MQTT adapter. The broker must be reachable from the simulator server; a listener available only on your PC or LAN cannot be reached directly by the public simulator.

With HA MQTT Discovery disabled, the WEM2067 realtime topic is device/ZAT3LQD9/realtime. If Discovery is enabled in an existing session, use the Topic shown in the page’s Debug information. Parse the Datas channel arrays explicitly; receiving JSON does not automatically create the Lovelace entities in this tutorial.

Simulator uploads stop after a period of page inactivity. Follow the MQTT guide and the current page prompts, and confirm actual messages arrive in ioBroker. The supplied package does not claim an end-to-end MQTT test.

Data-loss test: in a test instance, pause Parser or interrupt simulator access and check that the status becomes Data unavailable after more than 45 seconds, allowing for the script’s 10-second check interval. Restore access and confirm that timestamps, acknowledgement and quality recover.

Troubleshooting

SymptomWhat to check
No HTTP readingsParser instance status, URL, DNS and outbound HTTPS access from the ioBroker host or container.
Values are visible but staleTimestamp updates, ack=true, q=0, and Parser’s update-unchanged-values setting.
Entity not foundLovelace custom settings, sensor entity names, instance IDs and a Lovelace restart.
No power-history curvehistory.0 is running, selected in lovelace.0, enabled for both power states, and has collected samples.
Modbus timeoutTCP client mode, simulator.iammeter.com, port 502 and outbound TCP access.
Huge positive value during exportSigned int32 power, zero-based addresses and big-endian word order.
Wrong energy scaleUse Modbus factor 0.00125; use factor 1 for HTTP values.

Related documentation

← Back to simulator