Changing a devices attribute (TS011f Plug)

I have a tuya TS011F plug thats showing an insane total power delivered value (it came that way out of the box).

I can find the attribute value when managing the device, but cannot seem to reset it, and assume I need a manufacturers override code?:-

If I type in 0 or 1, then click ‘write attribute’, I see a green tick, but then when I read the attribute again, its the huge number once more.

The device is connected via ZHA.

1 Like

Hi,
In Basic Cluster in Commands is factory reset. So you can reset this value to 0.

Thanks @barcik75. I found the command:-

image

But it appears that command is not support when i attempt to run it. I get this error:-

I’ve tried entering something in the override code section, and leaving it blank, nothing works unless I need a specific value that I dont know.

It is strange. I have several TS011f plug, and I reseted four of then without any problem. I leave blank Manufacture code.
I got this information from here: Problem with write attribute to TS011F · Issue #136 · mdeweerd/zha-toolkit · GitHub
Current_summ_delivered atribute is only to read. You can’t ovveride this value. Only by factory reset.

I have 10x TS011F plug_3 and 4x TS011F plug_1. I’ve just purchased four more plug_3.

Two work correctly but two do not provide any monitoring. The firmware on the broken ones is ‘0122052017’ whereas the working have firmware ‘1.0.5’, the same as my existing ten plugs. All the new plugs are physically identical with the same labelling and same packaging.

On the two failing plugs, I’ve tried pairing with both Zigbee2MQTT (via Sonoff dongle) and with Zigbee Home Automation (via Conbee) and neither integration gives monitoring nor provides a OTA to change the firmware.

Accepting that the plugs are at the cheap end of the market, it is always a risk buying that way, but I thought it worth mentioning my experience, and perhaps hoping someone knows how I can get the full function from the two broken plugs which still act OK as simple switches.

I have two types of plugs, all of which provide power monitoring, the bulk are:-

TS011F_TZ3000_okaz9tjs which does not list a firmware version in ZHA.

I also have one slightly older which is:-

TS011F_TZ3000_1h2x4akh - Firmware: 0x00000045

I think TS011F plugs must be very common. As my failing plugs are new, and I see the working plugs have the same firmware as my original ten plugs, I’m assuming that the firmware is an upgrade that is broken - or breaks MQTT and ZHA. Is it possible to reflash that firmware from another plug? Perhaps there is a problem in MQTT or Zigbee2MQTT.
Anyway I’ve sent copies of the diagnostics to the supplier, but not expecting much because they’d asked for a video of it going wrong !

It would make sense that the firmware revision could have broken Z2M or ZHA.

I had a bit of a job getting the TS011F_TZ3000_okaz9tjs variants to work when I first got them, because at the time, there were pretty new.

I don’t use Z2M so I dont know about that, but in ZHA does a quirk get applied when you use the device ?

And what variant is it ? (You can get this from the device info page)

The two plugs that work are TS011F _TZ3000_cehuw1lw
but the broken plugs are TS011F _TZ3000_o81odtrp

I’ve discovered that TuYa don’t give power figures any more, instead you have to get them by polling. So I’ve set the polling interval to 30 seconds but nothing shows:-

{
    "child_lock": "UNLOCK",
    "indicator_mode": "off/on",
    "last_seen": "2024-10-02T10:32:59.259Z",
    "linkquality": 144,
    "power_outage_memory": "off",
    "state": "ON",
    "update": {
        "installed_version": 268449287,
        "latest_version": 268449287,
        "state": "idle"
    },
    "update_available": false,
    "current": null,
    "energy": null,
    "power": null,
    "voltage": null
}

How have you set HA to poll the device. Thats not something I’ve explored before ?

As for variant o81odtrp I can’t find a single reference to it via google, not even a request for a ZHA quirk or a Z2m converter.

based on Tuya TS011F_plug_3 control via MQTT | Zigbee2MQTT where is says

Broken attribute reporting functionality

Starting with firmware version 1.0.5 (which comes pre-flashed on plugs produced since Q4 2021) core functionality on this plug is broken. TuYa has disabled the automatic reporting of power, voltage and current values meaning they need to be polled instead. The poll interval can be controlled through the measurement_poll_interval option.

this is what I did …

image

but it doesn’t seem to work

On my other working plugs I haven’t touched that setting.

Thats not exposed at all in ZHA, but if I look at the clusters, I can see two that might be the equivalent. One is called profile_interval_period and the other is fast_poll_update_period, but neither return a value if I try to query them.

Also, my latest plugs were purchased in Oct 2023, so by all accounts, according to the date you’ve given, should also be affected, unless they were sitting on a shelf for over 2 years, which seems unlikely.

Do you have a link to the (faulty) ones your bought ?

I have other devices/sensors with the brand Aubess which were problem free. It’s just two from that a batch of four.

I have raised this with the supplier - and sent them some of the info above. They wanted a video of how it was broken ! I haven’t mentioned HomeAssistant because I fear they will say it only works with some TuYa Zigbee hub - which of course I do not have. Thus far no substantive reply - but there is a built in delay for each transaction due to the time zones.

My Z2M just got a version update and I see this in the changes list …

So I think I need to raise this with the Z2M contributors.

So it looks like a Z2M issue after all.

My plugs are the 20a versions which I got from ali express directly (so much cheaper that way):-

https://www.aliexpress.com/item/1005005769511539.html?spm=a2g0o.order_list.order_list_main.24.2e911802v0FeOu

The reason I chose the 20a version was because I’d read somewhere that the sudden shutdown issue if the voltage goes above 250, doesn’t happen on these ones (which appears to be true, but the voltage in my area isn’t close to 250).