Documentation

Upload data via MQTT / MQTTS

Configure a broker, receive live JSON and verify delivery from the backend uploader.

Official IAMMETER documentation

IAMMETER devices support MQTT/MQTTS publishing. This tutorial describes the simulator backend; real-device configuration and TLS behavior depend on firmware.

Goal and tools

Use your own MQTT broker and an MQTT subscriber. The simulator backend makes the connection; the broker must be reachable from the simulator server.

localhost in the broker address refers to the simulator backend environment, not your computer. Use a broker hostname or IP reachable by that server.

Subscribe first

Subscribe to the topic below before saving Settings. All simulated devices share the fixed SN and topic; use a dedicated broker to avoid mixing messages from other users.

MQTT topic

device/1AD9B537/realtime

Mosquitto subscriber example

mosquitto_sub -h YOUR_BROKER -p 1883 -t 'device/1AD9B537/realtime' -v

Configure the meter

  1. On the homepage choose a data source, then open WEM3050T.
  2. In Settings choose mqtt. Enter mqtt://YOUR_BROKER:1883, or YOUR_BROKER:1883 for plain MQTT. Enter your broker username and password if required.
  3. Set Upload Interval to 10 seconds and Save. Keep the meter tab visible.
  4. Check the debug section below the product interface and confirm messages in your subscriber.

Repeat with MQTTS

Use mqtts://YOUR_BROKER:8883 for TLS; the default ports are 1883 and 8883. Credentials belong in the separate form fields, not inside the URL.

The backend verifies certificate trust and hostname using system CAs. Custom CA upload and skipping certificate verification are not supported. Configure your subscriber for TLS separately.

Expected results

Messages use legacy JSON: method, mac, version, server, SN and Data/Datas, plus optional EA. MQTT uses version 3.1.1, QoS 0 and non-retained messages.

WEM3050T payload shape

{
  "method": "4-9",
  "mac": "020000003050",
  "version": "simulator-1.0",
  "server": "em",
  "SN": "1AD9B537",
  "Datas": [
    [230.0,1.252,270.0,2.092,0.000,50.00,0.94],
    [229.5,0.487,110.0,1.280,0.000,50.00,0.98],
    [229.0,0.399,90.0,0.747,0.000,50.00,0.98]
  ]
}

Stop and resume

Choose stand alone and Save to stop uploads. By default, five minutes without page activity also stops the worker; configuration remains until the session expires. Administrators can change this timeout.

Return to the visible meter page to resume retained settings. Reloading getadv leaves the password field empty; re-enter it when saving through the device form, because an empty password replaces the saved password.

Troubleshooting

Saved is not delivered: confirm broker reachability, credentials, topic and subscriber connection. QoS 0 send counters do not prove subscriber delivery.

A private address on your laptop network is normally unreachable from the public simulator. Use a reachable receiver. For MQTTS failures, check the certificate chain and hostname.

← Back to simulator