Tuya Power Outlets Spamming Network – Causing Severe Lag & Unresponsiveness

Post:

Hi all,

I’m experiencing serious issues after connecting several Tuya Zigbee power outlets to my deCONZ setup.

Setup:

  • Controller: RaspBee II on Raspberry Pi
  • deCONZ Version: 2.30.2 (commit 3e5698)
  • Firmware: 0x26780700
  • OS: Ubuntu 21.04
  • Device:
    • Type: Power outlet
    • Manufacture: Tuya
    • Manufacture name: _TZ3000_fqoynhku
    • Model identifier: TS0121
    • Branded by: futurehome.io
    • Brand model: Co016

Problem:

Once I connect the 7 outlets, the Zigbee network becomes extremely unstable:

  • Lights stop responding to commands.
  • The deCONZ GUI shows the outlets’ blue dots blinking frequently, suggesting high-frequency reporting.
  • The RaspBee II becomes hot, and only a full power cycle recovers the system sometimes, but only temporarily.
  • Controlling individual bulbs works in Phoscon (with delays), but light groups are unresponsive.
  • I can sometimes control the lights via deCONZ GUI.

What I’ve tried:

  • Manually adjusted attribute reporting (cluster 0x0B04, attribute 0x050B):

    • Min report interval: 10
    • Max report interval: 300
    • Reportable change: 1
  • Applied the above settings to all 7 outlets.

  • Captured debug logs using the following command:

    /usr/bin/deCONZ --dbg-aps=2 --dbg-info=2 --dbg-error=2 | tee debug.txt
    

    Logs are here: https://pastebin.com/sGLz79z3

Additional observations:

  • Changing the Zigbee channel recently and re-pairing all devices temporarily fixed things—until I re-added the outlets. Then everything broke again.
  • I’m wondering whether these Tuya outlets are spamming the network in a non-standard way and whether firmware updates (if available) might help. But I can’t find any firmware for them.
  • If I push and hold the button on the outlet for 5 seconds, it starts to blink and gets unpaired (disconnected) from deCONZ. After disconnecting all outlets, then the Zigbee network becomes healthy again.

Request:

If any devs or advanced users have insight into:

  • Whether these Tuya outlets are known troublemakers.
  • A method to reduce their chatter.
  • Or simply how to prevent them from destabilizing the rest of the Zigbee mesh…

…I’d really appreciate your help!

Thanks in advance!
– Joakim




My changes:

@de_employees can you check this?

Interesting I think the best way would be to create or perhaps extend an existing DDF. This outled doesn’t have one yet (no DDF icon on the nodes).

In the DDF we can specify the reporting configuration to saner values like in your screenshot. The internal machinery then takes care to always ensure the config is applied.

@Smanar is there already a Tuya outlet DDF which only need the modelid / manufacturer added?

But manually adjusting attribute reporting have changed something ?

And there is something I don’t understand, if there is no DDF for the _TZ3000_fqoynhku how you can have sensors created for it ?
By defaut only the “light” entry is created natively.

You haven’t already a Custom DDF ?

Else there is no “defaut DDF” for tuya plug, but you can use the one used for blitzwolf for tests deconz-rest-plugin/devices/blitzwolf/bw_shp13_smart_plug.json at master · dresden-elektronik/deconz-rest-plugin · GitHub
There is already some TS0121 inside, if it work, better to create a new one in the tuya folder.

Defaut report for this DDF are


        {
          "at": "0x0505",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000064"
        },
        {
          "at": "0x050B",
          "dt": "0x29",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }

Unfortunately, manually adjusting the attributes didn’t have any effect.

Not what I am aware of. Some of my devices have DDF icon, some don’t. If I “Edit DDF” for one of the power sockets, and then open the the Preview tab I get this:

DDF JSON Preview. Click to expand...
{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_fqoynhku",
  "modelid": "TS0121",
  "product": "TS0121",
  "sleeper": false,
  "status": "Draft",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_PLUGIN_UNIT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert",
          "description": "The currently active alert effect.",
          "default": "none"
        },
        {
          "name": "state/on",
          "description": "True when device is on; false when off.",
          "refresh.interval": 5,
          "default": false
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0b04"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0009",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0B04"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/mode",
          "description": "Operational mode.",
          "default": 1
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/current",
          "description": "The measured current (in mA).",
          "refresh.interval": 300,
          "default": 0
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "description": "The measured power (in W).",
          "refresh.interval": 300,
          "default": 0
        },
        {
          "name": "state/voltage",
          "description": "The measured voltage (in V).",
          "refresh.interval": 300,
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0009",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0702"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/mode",
          "description": "Operational mode.",
          "default": 1
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "description": "The measured consumption (in Wh).",
          "refresh.interval": 300,
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}

From the log above, I see lots of these:

08:46:56:079 DB SELECT manufacturername FROM nodes WHERE mac LIKE '70:ac:08:ff:fe:4a:6c:90%' COLLATE NOCASE: _TZ3000_fqoynhku
08:46:56:080 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:080 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:081 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:081 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:081 sql exec SELECT * FROM nodes WHERE mac='70:ac:08:ff:fe:4a:6c:90-01' COLLATE NOCASE AND state != 'deleted'
08:46:56:082 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:083 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:083 No Tuya productId entry found for manufacturername: _TZ3000_fqoynhku
08:46:56:083 LightNode 57: Stikk Kjøkken Gulv 1 added

Stikk Kjøkken Gulv 1 is the power outlet, and it seems to have been added as LightNode 57.

I will try the DDF for blitzwolf and come back to you.

Those logs are useless ATM, can be removed now.
But I don’t see how your device can have sensors, you are sure they are for the good device ? They need to have almost the same UniqueID (the MacAdress) than the “light” entry.

Do you mean if it is for the correct device? All the devices that start with “Stikk” are the misbehaving, bad, power outlets.

The power outlets share the same MAC Address prefix (and surprisingly the prefix is shared with some IKEA devices):

No in the API.
On deconz you have only 1 device, but in the API you have more, for exemple for a plug you have a “light” entry a smartplug for exemple and 2 sensors a ZHApower and a ZHAconsumption.

So ATM you have no sensors created, so it mean bind/report are not used yet. I understand better now. But it mean too it’s not spammed by consumption or power report, as they are not created, so not used.

To take a look in the API you can use Phoscon/help/API Information then light or sensor.

But you can add your device to the DDF first now, remember you have 2 lines to add, the manufacture Name and the model ID (even it’s same) and respect the order, then restart deconz (DDF are loaded only at start) and re-include the device.

Here is the light entry and the two sensor entries for the connected power outlet.

Here is a screenshot from Home Assistance:

I added “_TZ3000_fqoynhku” to devices/blitzwolf/bw_shp13_smart_plug.json. Restarted deCONZ and got DDF icons:

Unfortunately, the blue dot still flashes frequently (once per second).

When connecting the rest of the power outlets to the network, everything get still congested.

I changed the “min” values to 100, and it seems to have reduced the blue dots blinking constantly. I can control lights now, even if the power outlets are connected.

    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "at": "0x0505",
          "dt": "0x21",
          "min": 100,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 100,
          "max": 300,
          "change": "0x00000064"
        },
        {
          "at": "0x050B",
          "dt": "0x29",
          "min": 100,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    }

I will use these settings for a few days and see if they have solved the problem. Maybe the “min” value can be reduced even further (e.g., 10). I will conduct some tests and come back to you.

And imagine someone with 20 plugs ^^.
But the zigbee network is strong enought to support them normally, still strange for me.