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 .
Subscribe Topic from IAMMETER
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.comclient_id: homeassistantkeepalive: 60username: Usernamepassword: 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 entrysensor:- platform: mqttname: "voltage"state_topic: "device/sn/realtime"value_template: "{{ value_json.Data[0] }}"unit_of_measurement: "V"- platform: mqttname: "current"state_topic: "device/sn/realtime"value_template: "{{ value_json.Data[1] }}"unit_of_measurement: "A"- platform: mqttname: "power"state_topic: "device/sn/realtime"value_template: "{{ value_json.Data[2] }}"unit_of_measurement: "W"- platform: mqttname: "importenergy"state_topic: "device/sn/realtime"value_template: "{{ value_json.Data[3] }}"unit_of_measurement: "kWh"- platform: mqttname: "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 entrysensor:- platform: mqttname: "voltage_a"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[0][0] }}"unit_of_measurement: "V"- platform: mqttname: "current_a"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[0][1] }}"unit_of_measurement: "A"- platform: mqttname: "power_a"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[0][2] }}"unit_of_measurement: "W"- platform: mqttname: "importenergy_a"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[0][3] }}"unit_of_measurement: "kWh"- platform: mqttname: "exportgrid_a"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[0][4] }}"unit_of_measurement: "kWh"- platform: mqttname: "voltage_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][0] }}"unit_of_measurement: "V"- platform: mqttname: "current_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][1] }}"unit_of_measurement: "A"- platform: mqttname: "power_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][2] }}"unit_of_measurement: "W"- platform: mqttname: "importenergy_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][3] }}"unit_of_measurement: "kWh"- platform: mqttname: "exportgrid_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][4] }}"unit_of_measurement: "kWh"- platform: mqttname: "frequency_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][5] }}"unit_of_measurement: "Hz"- platform: mqttname: "pf_b"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[1][6] }}"unit_of_measurement: ""- platform: mqttname: "voltage_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][0] }}"unit_of_measurement: "V"- platform: mqttname: "current_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][1] }}"unit_of_measurement: "A"- platform: mqttname: "power_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][2] }}"unit_of_measurement: "W"- platform: mqttname: "importenergy_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][3] }}"unit_of_measurement: "kWh"- platform: mqttname: "exportgrid_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][4] }}"unit_of_measurement: "kWh"- platform: mqttname: "frequency_c"state_topic: "device/sn/realtime"value_template: "{{ value_json.Datas[2][5] }}"unit_of_measurement: "Hz"- platform: mqttname: "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.
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
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.