Sorry, your browser does not support JavaScript!

Use the WiFi energy meter in Thingsboard

If you have any question about this tutorial, please let us know your thoughts there https://imeter.club/topic/462

Configure the IAMMETER`s WiFi Energy meter

Visit the local IP of the WiFi energy meter.

Run mode and Address

  • RUN Mode: TCP
  • TCP Address: mqtt://10.10.20.21:1883 (This IP is the IP of your ThingsBoard MQTT Broker)

Then click Save&Reboot

configure the Run mode and address to adopt the mqtt broker

Set the user and password of the MQTT

IAMMETER`s product supports MQTT, you an set the user and pwd of the mqtt by the API.

Details: Publish the data of energy monitor to your MQTT server

Now, we would set the mqtt credentials(user/pwd) with below user:laoliu pwd:123456

API: [local IP of the energy meter]/api/mqtt?user=laoliu&pwd=123456

API:set the credentials of the mqtt

Please note:

  • The IP is the local IP of the WiFi energy meter.
  • This credential (laoliu,123456) would be used in the setting of the Thingsboard in next chapter

Thingsboard

Profiles->Device profiles

Thingsboard device profiles

Add "+"

add a device profile in thingsboard

Create new device profile

create device profile

Name: IAMMETER-MQTT

Click Next

add IAMMETER-mqtt in thingsboard

Change Transport type* to MQTT

thingsboard->mqtt

Change Telemetry topic filter* to "device/+/realtime", and Attributes subscribe topic filter* too.

here you can find the IAMMETER topic Publish the data of energy monitor to your MQTT server (iammeter.com)

Then click Next, Next, Add

mqtt topic setting

image-20230613104228463

create the device profile in thingsboard successfully

Devices credentials(client ID,user, pwd)

Add new device

image-20230613104416787

Name: IAMMETER

Select existing device profile: IAMMETER-MQTT

Click Next

select the device profile for the device

Select Add credentials

Credentials type: MQTT Basic

input the mqtt credentials

Client ID

Use the SN of the WiFi energy meter as the client ID of the MQTT.

copy the sn as the clientID

Paste the SN to Client ID

input clientID,username and pwd in thingsboard

User name and password

Use the auth information (laoliu/123456) that set in the energy meter (Refer to first chapter).

mqtt credentials

Next: choose Public

image-20230613105559196

the new created device is listed in thingsboard

show the details of the new devices

View the instant data published from the energy meter

The incoming data is listed here

view the instant incoming data from thingsboard

Or you can Show them on widget

show on the widget in thingsboard

latest telemetry

image-20230613110424183

image-20230613110437790

image-20230613110458910

reference

Parse the data of the energy meter in Thingsboard

Publish the data of energy monitor to your MQTT server (iammeter.com)

Top