Setting up MQTT on the meter
- Open the meter’s web interface (the IP address is shown on the display under «Settings» → «IP address») and select the «MQTT» tab.
- Switch on «MQTT enabled».
- Switch on «Manual» to enter your own broker. Without «Manual», the meter accepts an access code for Joulio-Web and sends directly there.
- Set prefix, quality of service and upload interval.
- Enter host name, port, user and password of the broker.
- For an encrypted connection, activate «Use TLS (SSL)» and store certificate, private key and CA chain.
MQTT is available from TCP module firmware 3.0.3. Older meters can be updated with the EMU TCP Update Tool.
What a message looks like
Each message is a JSON object with client ID, serial number, timestamp, current tariff and the readings under values. The values are integers in small units, for example Wh instead of kWh. Extract from the EMU example message:
{
"id": "EMU Professional II Demo-Device",
"sn": "25010203",
"ts": 1788416910,
"t": 1,
"values": {
"16": 863400,
"19": 100,
"20": 863500,
...
}
}
| Key | Reading | Unit |
|---|---|---|
| 16 – 19 | Active energy import L123, tariff 1 to 4 | Wh |
| 20 | Active energy import L123 total | Wh |
| 40 | Active energy export L123 total | Wh |
| 60 | Reactive energy import L123 total | varh |
| 80 | Reactive energy export L123 total | varh |
| 84 | Active power total | W |
| 96 | Current total | mA |
| 97 – 99 | Voltage L1-N, L2-N, L3-N | 0,1 V |
| 106 | Frequency | 0,1 Hz |
Download: JSON schema and example message. Under which topic the message arrives on your broker is visible after the first transmission with an MQTT client such as MQTT Explorer.
Example: Home Assistant
An MQTT sensor reads the import total reading (key 20) and converts it to kWh:
mqtt:
sensor:
- name: "Professional II import total"
state_topic: "<topic of the meter>"
value_template: "{{ value_json['values']['20'] / 1000 }}"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
With device_class: energy and state_class: total_increasing, the sensor can be used directly in the energy dashboard.
MQTT or Modbus TCP?
| MQTT | Modbus TCP | |
|---|---|---|
| Who starts? | the meter sends to the broker | the client queries the meter |
| Firewall | connection goes outwards from the meter | client needs access to the meter |
| Many recipients | any number of subscribers on the broker | up to four simultaneous queries |
| Encryption | TLS possible | – |
| Typical for | cloud, dashboards, home automation | PLC, control system |
Both run in parallel in the same meter. The Modbus register map is on the power meter with Modbus TCP page.
Order numbers
| Version | Article number | Shop |
|---|---|---|
| EMU Professional II 3/100 TCP/IP – direct connection 100 A | P20A000T | Shop: EMU Professional II 3/100 TCP/IP P20A000T → |
| EMU Professional II 3/5 TCP/IP – CT connection | P21A000T | Shop: EMU Professional II 3/5 TCP/IP P21A000T → |
Order online in the EMU Metering shop.