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
10
1563
3
1
1

Sort replies by:

Any support for the delta version? 

Whether to support WYE(STAR) connection or Delta connection is just the hardware model difference.

it is just the difference in the metering part, the wifi firmware is still the same. So both WEM3080T(WYE connection) and WEM3080TD(Delta connection) support Home assistant
Like this https://www.iammeter.com/docs/homeassistant

WEM3080T: three-phase energy meter, wifi,3 phase 4 wire (WYE connection) , support net energy metering. This is the most common model of IAMMETER, we sold it in all of our retail channels.

WEM3080TD: three phase energy meter ,delta connection. We only sold it in our alibaba store. If you want to buy it ,please contact to our sales.

Sorry didnt read the last message

Any support for the delta version? 

What is the topic for the day/month billing, Is it possible to pull that data from cloud?

Hi

we have not provided such a topic yet.

Because we thought these were not real-time information that did not need to be added to the MQTT messages. 

Could you please give us your specific idea why you need such information and how do you plan to use them?

What is the topic for the day/month billing, Is it possible to pull that data from cloud?

Sorry i didnt got email notification that you replied, i want to see the day/month billing in my home assistant server. In the moment im using modbus/tcp and is working great, i dont need realtime billing information i just want to put the info there so everyone in my house know the estimate of the bill and to start saving some energy :). 

Hiwe have not provided such a topic yet.Because we thought these were not real-time information that did not need to be added to the MQTT messages. Could you please give us your specific idea why you need such information and how do you plan to use them?

Hi:

If you want to set a billing template in Home Assistant, there are some video tutorials here 

https://imeter.club/topic/392#5-set-the-bill-template-in-the-home-assistant


If you also use IAMMETER-cloud, there is a very useful feature, the system can help you to forecast energy consumption.

https://www.iammeter.com/docs/energy_forecast


You can use the sub-agent function to share the forecast result to the people in your house.

https://www.iammeter.com/docs/subaccount

Wow, thanks this is what i was looking for!

Can you help me please with the setup, i see that there is tiered price yaml, but i also have time use billing and on iammeter cloud i use (Advanced time of use) in the screenshot is my config. 

Do you mean you want to set up an advanced tired billing template like the snapshot in the home assistant?



If so, please post a new post with a clear title of your requirements.
It will be more attractive and get the replies sooner.

Can you help me please with the setup, i see that there is tiered price yaml, but i also have time use billing and on iammeter cloud i use (Advanced time of use) in the screenshot is my config. 
Looks like you are new here. Register for free, learn and contribute.