TUYA 1 or 3 phase Energy Meter

Lucius, here is the result, finally i wrote all in Customize.yaml.
It works perfectly.
THANK YOU !!!

No NEED to buy another power clamp, this one works fine thanks to your help
THANK YOU !!!

Glad you managed to get it to work yann1966!

Let me know if in the future you experience the same issue as myself:
ā€œThe energy consumption was displayed on the energy dashboards without any problems, but recently it stopped working. Somehow I get only a bar every 12 hours, instead of the energy consumption every hour. Has anybody experienced similar behaviour?ā€

I had to reset the power clamp and add it again into home assistant. Not a big deal, but certainly annoyingā€¦

Ok Lucius, for sure i will tell you if I have same issue
Have a nice day and thanks again ! :slight_smile:

Lucius, for now Iā€™ve been monitoring and it is ok. Will see after a couple of days if something change Iā€™ll tell you:-)

Hello, I have the same three-phase power clamp. Could you describe which sensor number corresponds to which measurement and relative scale ?

Auto-answer :slight_smile:

NĀ° LibellĆ© Phase Scale Unit
101 Tension 1 0.1 V
102 Courant 1 0.001 A
103 Puissance 1 1 W
104 Cos phi 1 0.01 1
106 Energie 1 0.01 kWh
111 Tension 2 0.1 V
112 Courant 2 0.001 A
113 Puissance 2 1 W
114 Cos phi 2 0.01 1
116 Energie 2 0.01 kWh
121 Tension 3 0.1 V
122 Courant 3 0.001 A
123 Puissance 3 1 W
124 Cos phi 3 0.01 1
126 Energie 3 0.01 kWh
131 Energie Total 0.01 kWh
132 Courant Total 0.001 A
133 Puissance Total 1 W
135 Frequence Total 1 Hz
136 Temperature Total 0.1 Ā°C
4 Likes

I finally got mine to work. I got the Tuya 3 phase power clamp and it took me a few days to figure out how to show the data in the Energy dashboard. Iā€™m using HA OS with KVM installation on Proxmox. I was stumbling with the Scaling but managed to get it to work. @Thierry34 , thanks for the table with the scale. I had difficulties entering the decimal points as the web GUI kept preventing me from going beyond .1 points. After a few tries, it works.

I was also getting the same error message in the configuration.yaml and had difficulties learning how to integrate with the customize.yaml. After learning for you guys, below is what I had with mine to get it to work.
configuration.yaml file:
'# Loads default set of integrations. Do not remove.
default_config:

'# Text to speech
tts:
ā€™ - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

homeassistant:
customize: !include customize.yaml

customize.yaml file:
sensor.total_energy_consumed:
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing

I did not ā€œdiscoverā€ all the sensors in the Tuya power clamp, I only discovered 4 items, Active Power, Current, Total Energy, and Voltage. I will most likely play around with this and might discover the rest later.

It took a while for me to understand the usages of yaml files and sensors before I could get it to show up in my Energy dashboard. @Lucius , currently my dashboard is showing every hour, but I only have 3 hours right now. Iā€™m going to let it run a few days before I do any modifications to see if the configurations is what I want. Will update again here if there is any significant changes.

Thanks everyone for contributing!! Helped me a lot !!

1 Like

Hello guys,

I have a problem with power clamp and local tuya. It was working fine but after few months it stopped responding. No data is taken from the power clamp.

If I manualy open settings of power clamp and click through it (without changing) then after HA reset I get readings for couple of minutes and then again nothing :frowning:

Do you have similar issue? How can I deal with it?

I seem to have found an issue - Phase Factor measaurement was haotic at my home chaning multiple times per minute and probably this caused Tuya Local to fail. I disabled collection of PF and now it seems to work stable - probably an issue with multiple refreshed issued by power clamp per minute

Hi,

Iā€™ve got mine working with Tuya local. However I have an issue with the energy measurements. It seems that the device is re-connecting to wifi every 30-60 minutes. When it reconnects, tuya local seems to skip a heartbeat and therefore the device is considered not connected.

I can recover from this with an automation that reload localtuya when the total energy sensor goes unavailable. The problem with this solution is that reloading of the tuyalocal seems to restore the state of the energy sensor to the last energy state when HA started. This causes issues in the energy measurements, since the next real measurement from the device is significantly higher and itā€™s considered as big consumption momentarily.

Another question I has is that I can see that the device has also DPS 137 and 138 and those have values 0 and 1 respectively. Does anyone know the function of these ?

1 Like

Anyone using the zigbee version? TuYa TS0601_3_phase_clamp_meter control via MQTT | Zigbee2MQTT

I donā€™t have any device connected to zigbee, but I have connected coordinator (sonoff P).
I wonder if this version of the energy meter is doing well after this protocol.

Due to the support from Zigbee2Mqtt, maybe you donā€™t need to configure anything after pairing and the values with the unit will be displayed correctly?

1 Like

Hello everyone
, I have become a wonderful owner of this device, but I canā€™t add it through local tuya in any way

other devices I have added via local true, only if it is important, they are added via another ios account tuya, when this device came, it was necessary to create a new account to get a local key, please tell me what you need to do to add the device to ha? thanks

log:

Source: custom_components/localtuya/pytuya/__init__.py:1172
Integration: LocalTuya integration (documentation, issues)
First occurred: 03:05:50 (1 occurrences)
Last logged: 03:05:50

Unexpected exception: [Errno 113] Connect call failed ('192.168.1.129', 6668)
Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 582, in async_step_configure_device
    self.dps_strings = await validate_input(self.hass, user_input)
  File "/config/custom_components/localtuya/config_flow.py", line 240, in validate_input
    interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 1172, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 541, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.129', 6668)
`type or paste code here`

Yes, it works and the setup with Zigbee2MQTT was very smooth.

However there are still some (small) issues, see: MatSeePlus PC321-Z-TY 3-phase Clamp Power Meter Ā· Issue #14790 Ā· Koenkk/zigbee2mqtt Ā· GitHub

1 Like

Hi @yann1966 Iā€™m planning to buy wifi version of this energy meter: https://www.amazon.com/gp/product/B0B3XFLFHM/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&th=1
wondering if itā€™s the same one you already configured. and wondering if you can tell us how itā€™s working after a couple of weeks? any issue?

thank you in advance

Iā€™m using the Tuya/WiFi version of this. It disconnects every now and then for 5min. It might be WiFi signal but not sure. Otherwise it works.

Sorry Hollman, we were busy with our building. So yes this is this version, but I do not really recommend. I get disconnected again and cannot get it back from Local Tuya integration. I finally order an IAMMETERā€¦much more expensive but seems more reliable.

Can you please help me? I did everything but im stuck in configuring the entities. I send you a screenshot.

Hi, I have a version of tuya energy meter with just two clamps called WIFI Dual Meter. I managed to install local tuya and the device is correctly identified, but like you, I just see one entity.
Since the codes I already noticed that are different from the three clamps version, can I ask you where did you find the description of every code number? I just would need that to get all my entities.
Thank you