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.
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?
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 :).
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.
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.