Sorry, your browser does not support JavaScript!

Publish the data of energy monitor to your MQTT server

If you are looking for a power meter , please read this article first. It will help you to confirm whether IAMMETER`s product meets your requirements quickly. How to choose the power meter with regard to your requirements

The latest firmware can support MQTT publishing. You can send the energy data of the WiFi energy meter to your own MQTT server.

Publish-energy-data-by-mqtt-2021110201

1. Key Word

MQTT home energy meter, MQTT energy monitor

2. Upload to Third-party MQTT server

2.1 Device configuration

Run Mode: TCP

Tcp Address: mqtt://[URL of your mqtt server]:[port]

configure the energy meter to upload by mqtt

2.2 Set the username and password of MQTT

If you want to set the username and PWD of the MQTT, you should upgrade the firmware to i.75.97.5(or greater).

The Wi-Fi energy meter work as an MQTT client in this mode. it can be connected to the MQTT broker from such authentications below.

Authentication mode:

  1. Username and password
  2. ClientID (use SN as the ClientID)
  3. Anounymous

You can set/get the username and password by the local API.

SET the Username and PWD of the MQTT

URL: http://{the local IP of the energy meter}/api/mqtt?user=laoliu&pwd=123456

Like this pic below

set the username and pwd of the MQTT for IAMMETER`s energy meter

please note:

  • replace the username(laoliu) and pwd(123456) with your real setting.
  • The maximum length for both username and PWD is 20.
  • Do not support using the character of "&" in the username or PWD.

GET the current setting (Username and PWD) of the MQTT

URL: http://{the local IP of the energy meter}/api/mqtt

get the username and PWD of the MQTT

Please note: The PWD of the MQTT would not be returned, only return the length of the PWD.

2.3 Subscribe the corresponding topic from MQTT server

Topic: device/sn/realtime

If everything is OK, you will be able to subscribe the corresponding topic from MQTT server now.

subscribe the mqtt energy data from IAMMETER

3. Interpreting the JSON Data

Regardless of whether the meter is set up to upload data to a third-party server (using HTTP/HTTPS, TCP/TLS, MQTT) or to retrieve data through a local API, the JSON format remains consistent across all methods.

JSON Data Definition of IAMMETER`s product

4 Reference

1. The latest firmware of the wifi energy meter

2. Integrate with Third-Party Server

3. How to subscribe MQTT topic from IAMMETER

4.Develop your own web monitoring view

5.Trigger the SonOff (tasmota firmware ) from IAMMETER

6.You can trigger MQTT and web hook in auto sending page now.

7.Subscribe topic from IAMMETER by Home Assistant

8.Monitor the solar pv system by 3 phase energy meter of IAMMETER

9.Monitor the energy consumption in IAMMETER

The "hiden" features in the firmware of the Wi-Fi energy meter

How to use the WiFi energy meter without the access of internet

Develop Your Own System

Top