Subscribe topic from IAMMETER by Home Assistant


Introduction

The Wi-Fi Energy meter of IAMMETER( WEM3080 and WEM3080T) had been an integration of Home Assistant.

IAMMETER Wi-Fi Energy meter in Home Assistant

Besides reading data from the local api of hardware (refer to above link) ,you can also subscribe the topic from IAMMETER directly. This document will show how to integrate with Home assistant by subscribing topic from IAMMETER cloud .

 

img

 


 

Subscribe Topic from IAMMETER

image-20210513155808381

Please refer to How to subscribe topic from IAMMETER cloud

 

Configuration in Home Assistant

MQTT setting

Use IAMMETER MQTT server only

Add the following to your configuration.yaml file:

Replace the Username/your MQTT password to the MQTT username/password in IAMMETER.

mqtt:
  broker: mqtt.iammeter.com
  client_id: homeassistant
  keepalive: 60
  username: Username
  password: yourmqttpassword


There is already MQTT server in Home assistant

You need do the MQTT bridge firstly.

Data parser

WEM3080(single phase Wi-Fi energy meter), replace the SN with the real SN of your product.


# Example configuration.yaml entry
sensor:
  - platform: mqtt
    name: "voltage"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Data[0] }}"
    unit_of_measurement: "V"
  - platform: mqtt
    name: "current"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Data[1] }}"
    unit_of_measurement: "A"
  - platform: mqtt
    name: "power"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Data[2] }}"
    unit_of_measurement: "W"
  - platform: mqtt
    name: "importenergy"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Data[3] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "exportgrid"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Data[4] }}"
    unit_of_measurement: "kWh"


WEM3080T(three phase Wi-Fi energy meter), replace the SN with the real SN of your product.

# Example configuration.yaml entry
sensor:
  - platform: mqtt
    name: "voltage_a"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[0][0] }}"
    unit_of_measurement: "V"
  - platform: mqtt
    name: "current_a"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[0][1] }}"
    unit_of_measurement: "A"
  - platform: mqtt
    name: "power_a"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[0][2] }}"
    unit_of_measurement: "W"
  - platform: mqtt
    name: "importenergy_a"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[0][3] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "exportgrid_a"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[0][4] }}"
    unit_of_measurement: "kWh"
    
  - platform: mqtt
    name: "voltage_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][0] }}"
    unit_of_measurement: "V"
  - platform: mqtt
    name: "current_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][1] }}"
    unit_of_measurement: "A"
  - platform: mqtt
    name: "power_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][2] }}"
    unit_of_measurement: "W"
  - platform: mqtt
    name: "importenergy_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][3] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "exportgrid_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][4] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "frequency_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][5] }}"
    unit_of_measurement: "Hz"
  - platform: mqtt
    name: "pf_b"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[1][6] }}"
    unit_of_measurement: ""
  - platform: mqtt
    name: "voltage_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][0] }}"
    unit_of_measurement: "V"
  - platform: mqtt
    name: "current_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][1] }}"
    unit_of_measurement: "A"
  - platform: mqtt
    name: "power_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][2] }}"
    unit_of_measurement: "W"
  - platform: mqtt
    name: "importenergy_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][3] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "exportgrid_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][4] }}"
    unit_of_measurement: "kWh"
  - platform: mqtt
    name: "frequency_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][5] }}"
    unit_of_measurement: "Hz"
  - platform: mqtt
    name: "pf_c"
    state_topic: "device/sn/realtime"
    value_template: "{{ value_json.Datas[2][6] }}"
    unit_of_measurement: ""


Reboot your Home Assistant

If everything is OK, you will find the new entity in your Home Assistant.

Home Assistant and IAMMETER system

image-20210514125233760

image-20210514125252917

 

Ref

How to subscribe topic from IAMMETER cloud

How to integrated Wi-Fi Energy meter into Home Assistant

Local api calling in Wi-Fi energy meter

 

Thread Status
0
124
1
0
0

Sort replies by:
Looks like you are new here. Register for free, learn and contribute.