[RELEASE] Tuya Zigbee Metering Plug (w/ healthStatus)

Can you post the Manufacturer and the Model from the device Data section for theseAjax / Zignato plugs? In the same section there the Application version ( firmware version) should be visible as well.

Hopefully this is what you asked for

Data * endpointId: 01

  • application: 45

  • softwareBuild:

  • driver: v1.0.1.1123b

  • inClusters: 0000,0003,0004,0005,0006,0702,0B04,E000,E001

  • endpointId: 01

  • profileId: 0104

  • outClusters: 0019,000A

  • model: TS011F

  • powerCluster: 0B04

  • manufacturer: _TZ3000_1h2x4akh

  • model : TS011F

Can’t find a fw version, where would I find that?

1 Like

Found this

My interest is that this is the first time I have found a UK zigbee plug/switch that monitors energy, and for £14.99 feels like exceptional value.

The risk of purchasing one to test and got it working with HE is the cherry on top.

I have 6 now..

1 Like

Ajax / Zagnito is Tuya products white label. These plugs use standard ZIgbee clusters, that's why they can be directly controlled from Alexa Zigbee hub as well.

It's actually shown as 'application' in HE.
I will add these plugs fingerprints in the driver next update.

1 Like

I felt sure something on the Ajaxonline website had indicated to me that Zignito was a specifically different protocol that couldn't work with normal Zigbee radio - but then I suppose they had not heard of Kkossev who is working miracles around here :smiley:

2 Likes

Aha so it is fw version 45 - got it- thanks!!

Really liking this metering switch so far, tempted to get some more while they are cheap.

1 Like

one more fingerprint to add:

    fingerprint profileId:"0104", endpointId:"01", inClusters:"0003,0004,0005,0006,0702,0B04,E001,E000,0000", outClusters:"0019,000A", model:"TS011F", manufacturer:"_TZ3000_ky0fq4ho", deviceJoinName: "ATMS1602Z Din Rail switch"  

Works quite well, however sometimes the relay turns itself off without any obious reason... waiting for my Tuya hub to arrive, I'm going to check if they behave the same way with their official hub.

1 Like

Thanks for the fingerprint, will include it in the next update.

I am a bit worried about the relay turning off without reason... Recently I read similar complaints in Home Assistant forums, the reason for this is still a mystery. There are speculations this may happen if there are high voltage spikes or electromagnetic interferences, or the unexpected turn off happens only with some new models that have new chipsets and so on. Others say that this happens only when there is no load on the plus, etc.. And unfortunately some say that the same problem happens when the plugs are paired to Tuya hub...but there are no definite answers to these questions or speculations.

I have 5 different models of Tuya plugs but have never observed such erratic behavior. Two of the plugs are supplying the mains power to two different PCs that are always on (or in sleep mode when not in use), so they always have some minimum load.

I will keep an eye on this issue.

Hmmm... these switches of mine are in testing phase right now, so there's no load connected to them, but it's quite stange anyhow...
The electric network here is quite stable, I have many zigbee devices connected to it without any issues, the solar inverter monitors the network, and no issues are shown, so it must be a bug in the switch itself... hopefully just a sw bug that can (and will) be fixed in a soon-to-be-released firmware upgrade, but I'm pretty sure I won't deploy them to control my hot water system as long as they're this unreliable...

Just bought 4 ZigBee 16A power plugs and when using the Generic ZigBee outlet the power reporting was off by one digit short (200W reported as 20W).
Found this thread and installed the driver and it reports as it should now. Thank you!!!

1 Like

It would be nice if someone we could get our own firmware uploaded to some of these products. Would solve a lot of issues.

Custom firmware would involve too much and too complicated work to handle all the different hardware variations / different chipsets. I don't think anyone has the time to do it.

1 Like

I guess for tweaks it might be useful.. But you are probably right (I mean face it, I'm just a hardware guy, not a developer) I can fantasize though!!! :rofl:

:frowning:
Zigbee2MQTT have put a warning on their device compatibility page:

While we wait for a fix...

I found it quite annoying that the LED on the relay is red when it is ON, and green, when it is OFF, so I dug out a solution for it:

def setLed(value) {
    List<String> cmds = []
    cmds += zigbee.writeAttribute(zigbee.ON_OFF_CLUSTER, 0x8001, 0x30, value.toInteger())
    sendZigbeeCommands(cmds)
}

I don't know how other Tuya devices behave, but I can use the following parameters:

0 (or any other value): Always green
1: red when ON, green when OFF (it was the default in my case)
2: green when ON, red when OFF
3: always red

One can even make a warning indicator with it by periodically toggling between mode 1 and mode 2... :slight_smile:

Maybe I'm the only one whose OCD was triggered by the LED's color, but it might be a useful feature for someone, so I thought I should share it with you.

1 Like

It's strange for me too, but I read somewhere that this is a kind of a standard for circuit breakers, the red color meaning 'warning, high voltage!'

Thank you very much, I will implement it as a command in the next driver release, hopefully very soon.

Do you happen to know how to configure the 'power on behavior'? :slight_smile: It is probably very similar, attribute 0x8000 or 0x8002 or ..... This is in my TODO list for a long time, but I started too many other projects here and never had the time to research and implement it.

I think that the 'LED status' and the 'Power on Behaviour' options will be handled better if implemented as parameters/preferences instead of commands. However, this approach will require some more significant changes in the driver code. Currently, all parameters are always initialized with a default value. But for parameters like these where the default value is unknown, there should be a 'not initialized' or null value. Only if the same parameter was read or received from the device, or if it was explicitly manually changed from the device page web UI - only then the driver should send a command to change it to the device.

BTW, I will gladly accept any Pull Requests for this (and my other drivers) on GitHub.

Are you looking for this, Sir?

/*
Power on mode

0: OFF
1: ON
2: remember state
*/
def setPowerOnMode(value) {
    List<String> cmds = []
    cmds += zigbee.writeAttribute(zigbee.ON_OFF_CLUSTER, 0x8002, 0x30, value.toInteger())
    sendZigbeeCommands(cmds)
}

Had no time to test it yet, but it should work...

1 Like

Thank you! This should work for some of the Tuya plugs/relays, for the rest that do not support the standard Zigbee OnOff cluster I already have the DataPoints, so hopefully these configurations will work for almost all of the supported models/manufacturers.

@kkossev I just received several of these Tuya TS011Fs today. They easily paired and work with you driver. I'm curious as to why these plugs are labeled on the physical plug with a model number BSD01 which appears to be a Casalink wifi plug but are sold as Tuya 20 Amp Zigbee Smart Plug.

Many thanks for the driver.

image

1 Like