Hi. I just got one of these in Australia from Amazon, branded as Meross rather than Refoss, but I think it’s the same thing. Seems to work OK, but struggled to get the integration working in HA. Instead I used MQTT. From the devices own webpage I set up all my mqtt details, and i could see it posting MQTT updates, however it doesn’t do HA Autodiscovery, so I created this automation to make the correct autodiscovery entries…
alias: "MQTT Autodiscovery: Meross EM16P"
description: "Publishes MQTT Discovery configurations with explicit display precision for the Meross EM16P"
trigger:
- platform: homeassistant
event: start
action:
- repeat:
count: 18
sequence:
- variables:
ch: "{{ repeat.index }}"
state_topic: "meross-em16p-XXXXXXXXXX/notify"
device_id: "meross_em16p_XXXXXXXXXX"
# 1. Power Sensors (W)
- service: mqtt.publish
data:
topic: "homeassistant/sensor/{{ device_id }}/power_ch_{{ ch }}/config"
retain: true
payload: >-
{
"name": "EM16P Channel {{ ch }} Power",
"unique_id": "{{ device_id }}_power_ch_{{ ch }}",
"state_topic": "{{ state_topic }}",
"value_template": "{{ '{{' }} value_json.params['em:{{ repeat.index }}'].power if value_json.params is defined and value_json.params['em:{{ repeat.index }}'] is defined else None {{ '}}' }}",
"unit_of_measurement": "W",
"device_class": "power",
"state_class": "measurement",
"device": {
"identifiers": ["{{ device_id }}"],
"name": "Meross EM16P",
"model": "EM16P",
"manufacturer": "Meross"
}
}
# 2. Voltage Sensors (V) -> WITH AUTO DISCOVERY PRECISION INJECTED
- service: mqtt.publish
data:
topic: "homeassistant/sensor/{{ device_id }}/voltage_ch_{{ ch }}/config"
retain: true
payload: >-
{
"name": "EM16P Channel {{ ch }} Voltage",
"unique_id": "{{ device_id }}_voltage_ch_{{ ch }}",
"state_topic": "{{ state_topic }}",
"value_template": "{{ '{{' }} (value_json.params['em:{{ repeat.index }}'].voltage | round(1)) if value_json.params is defined and value_json.params['em:{{ repeat.index }}'] is defined else None {{ '}}' }}",
"unit_of_measurement": "V",
"device_class": "voltage",
"state_class": "measurement",
"suggested_display_precision": 1,
"device": { "identifiers": ["{{ device_id }}"] }
}
# 3. Current Sensors (A)
- service: mqtt.publish
data:
topic: "homeassistant/sensor/{{ device_id }}/current_ch_{{ ch }}/config"
retain: true
payload: >-
{
"name": "EM16P Channel {{ ch }} Current",
"unique_id": "{{ device_id }}_current_ch_{{ ch }}",
"state_topic": "{{ state_topic }}",
"value_template": "{{ '{{' }} ((value_json.params['em:{{ repeat.index }}'].current / 1000) | round(3)) if value_json.params is defined and value_json.params['em:{{ repeat.index }}'] is defined else None {{ '}}' }}",
"unit_of_measurement": "A",
"device_class": "current",
"state_class": "measurement",
"device": { "identifiers": ["{{ device_id }}"] }
}
# 4. Power Factor Sensors (pf)
- service: mqtt.publish
data:
topic: "homeassistant/sensor/{{ device_id }}/pf_ch_{{ ch }}/config"
retain: true
payload: >-
{
"name": "EM16P Channel {{ ch }} Power Factor",
"unique_id": "{{ device_id }}_pf_ch_{{ ch }}",
"state_topic": "{{ state_topic }}",
"value_template": "{{ '{{' }} ((value_json.params['em:{{ repeat.index }}'].pf / 100) | round(2)) if value_json.params is defined and value_json.params['em:{{ repeat.index }}'] is defined else None {{ '}}' }}",
"device_class": "power_factor",
"state_class": "measurement",
"device": { "identifiers": ["{{ device_id }}"] }
}
# 5. Energy Accumulation Sensors (Daily kWh)
- service: mqtt.publish
data:
topic: "homeassistant/sensor/{{ device_id }}/energy_ch_{{ ch }}/config"
retain: true
payload: >-
{
"name": "EM16P Channel {{ ch }} Day Energy",
"unique_id": "{{ device_id }}_energy_ch_{{ ch }}",
"state_topic": "{{ state_topic }}",
"value_template": "{{ '{{' }} ((value_json.params['em:{{ repeat.index }}'].day_energy / 1000) | round(3)) if value_json.params is defined and value_json.params['em:{{ repeat.index }}'] is defined else None {{ '}}' }}",
"unit_of_measurement": "kWh",
"device_class": "energy",
"state_class": "total_increasing",
"device": { "identifiers": ["{{ device_id }}"] }
}
mode: single
Of course you’ll need to change the device IDs at the top of the automation to match your own, but other than that it should work as-is.
Are you on single or 3 phase? I’m looking at one of these currently and have 18 separate circuits to monitor (thinking the 2 big clamps on my kitchen cooktop/stove and oven circuits). The marketing all talks about the 2 big clamps to cover the split phase US style setup but worth checking
Hello, I am on single phase too, and yes, you can use 18 clamps for your 18 circuits.
I Asked Refoss Support Team yesterday and here’s what they told me:
For single-phase installations, there is no need to distinguish between phases. You can connect La, Lb, and Lc to any phase wire(hot wire) or even to the same breaker’s live terminal. The white neutral wire should be connected to the neutral. Then, all 18 channels (A1-A6, B1-B6, C1-C6) will be able to accurately monitor any circuit in your panel.
