Update frequency Blitzwolf BW-SHP13 (TZ3000_g5xawfcq)

I use a Blitzwolf BW-SHP13 (TZ3000_g5xawfcq) to measure energy consumption of my washing machine (and create notifications).

Currently it updates the power measurements about every 5 minutes. Previously it updated at a higher interval.
Did something change in the handling of this device? Perhaps now via DDF?
Can I increase the update frequency?

Deconz (docker) v2.17.1

Hello, you have the setting on tab “binding” on the DDF editor or on the text file

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

“cl” is the cluster, “at” the attribute, “min” the minimum delay between report, “max” the maximum and “change” the value change minimum need to trigger a report.

For device that don’t support reporting, you have too this setting

"refresh.interval": 300

Thanks, fixed my ‘issue’.
Changed via the DDF editor.

Will DDF changes be persistent when updating Deconz?

Herrr, I don’t think.
There is at least 2 folders for DDF (or more if you use your own). One of them is reserved to deconz and all DDF in this one are reseted.
But in other folder they are persistent.

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/<DECONZUSER>/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

Thanks Smanar.

The docker instructions mention mounting the folder /opt/deCONZ. This folder also has a sub-folder devices.

I assume that placing DDF files in this folder (/opt/deCONZ/devices) will also work. Can you (or someone else ) confirm?

If it’s not you that have created the folder “devices” I think it’s deconz so yes it will be used.
And by deduction, from the documentation

Change the container mount point for your existing deCONZ volume from /root/.local/share/dresden-elektronik/deCONZ to /opt/deCONZ.

Its the persistent one, this one is not reseted by deconz.

Mean it can be a better way to use DDF than this method How to add/edit a DDF on Home assistant using text editor?

Thanks for your explanations. Learned some things these days :grinning:

DDF-Files in /opt/deCONZ/devices are loaded after a docker restart, so seems to be correct.

And just to know, how to access /opt/deCONZ ?
It’s possible using the HA VNC ? To know if there is an easy way to put DDF on deconz with HA ?

I run Deconz via Docker on my Synology NAS. The /opt/deCONZ folder is accessible as a local folder on my NAS.

Don’t know how this works for Deconz as a HA-addon

Ha yes right, HA is able to make more complex than using a “standard” docker ystem.

@jjansen85

  1. Can you please share what precisely you changed (and how did that improve your update frequency)?
  • I lowered the “max interval” value(s) from 300 to 10, saved the DDF and performed a “hot reload”. Still, the update frequency is slow (10 seconds are not respected, instead it took 8 minutes…). What am I doing wrong?
  • I also lowered the “refresh interval” for “state/power” from 300 to 10. Still not working as expected/configured (still took 60 to 120 seconds to update).
  • Would you mind sharing your whole .json file/content?
  1. What is the final “solution” to make those changes permanent (HA environment running deCONZ as addon)?

8 mn ? for me the reporting is not working on your device, but strange the “refresh interval” is not working too, perhaps something visible in logs ? It 's a poll, so so you probbly can see the periodic request.

To make thoses change permanent, put the the DDF on a “user folder”.

No problem:

{
  "schema": "devcap1.schema.json",
  "manufacturername": [
    "_TZ3000_g5xawfcq",
    "_TZ3000_amdymr7l"
  ],
  "modelid": [
    "TS0121",
    "TS011F"
  ],
  "vendor": "Blitzwolf",
  "product": "BW-SHP13",
  "sleeper": false,
  "status": "Gold",
  "path": "/devices/bw_shp13_smart_plug_JJ.json",
  "subdevices": [
    {
      "type": "$TYPE_SMART_PLUG",
      "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",
          "default": "none"
        },
        {
          "name": "state/on",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0b04"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0B04"
        ]
      },
      "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": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/current",
          "refresh.interval": 10,
          "default": 0
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 10,
          "default": 0
        },
        {
          "name": "state/voltage",
          "refresh.interval": 60,
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0702"
        ]
      },
      "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": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "refresh.interval": 60,
          "read": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 0,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val * 10"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 1,
          "max": 300
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x25",
          "min": 1,
          "max": 300,
          "change": "0x0000000A"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "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"
        }
      ]
    }
  ]
}

I don’t know. I use deCONZ within its own docker environment. I don’t use the HA addon.

Thank you both @Smanar and @jjansen85.

Now I use the same DDF (content). Still I get update times (tested 2 times with 2 plugs) of 30, 34, 46, 54, 60, 71, 85, 90 seconds. Still inacceptable.

  1. What do I need to do after editing the DDF in deCONZ? I saved it and performed a “File / Hot reload”.
    → Do I need to restart the whole deCONZ addon/container for the changes to take effect? I don’t think so, according to the docs hot reload is sufficient.

  2. I have no idea where such “user” folder would be using the HA deCONZ addon. And how I can tell the devices (BW-SHP 13) where to find their DDF file… - or do they find each other based on the content (hardware/model id), no matter where the DDFs are located?

@jjansen85 You did move your /devices/blitzwolf/bw_shp13_smart_plug.json to /devices/bw_shp13_smart_plug_JJ.json, did you?

  1. Well the logging for a newby looks like a pure mess… which of theses is of interest to check if the polling happens?
    grafik
    I see some entries for the device but no idea if I’m looking at the right lines (or what I’m looking at all). E. g.:
22:53:48:976 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0006, attr: 0x0000, mfcode: 0x0000, aps.id: 208, zcl.seq: 9
22:53:49:057 ZCL got data for node=0xF05A, cl=0x0006, at=0x0000, status=0x00, type=0x10
22:53:49:065 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x0508, mfcode: 0x0000, aps.id: 210, zcl.seq: 10
22:53:49:107 ZCL got data for node=0xF05A, cl=0x0B04, at=0x0508, status=0x00, type=0x21
22:53:49:132 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x050B, mfcode: 0x0000, aps.id: 212, zcl.seq: 11
22:53:49:163 ZCL got data for node=0xF05A, cl=0x0B04, at=0x050B, status=0x00, type=0x29
22:53:49:190 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x0505, mfcode: 0x0000, aps.id: 214, zcl.seq: 12
22:53:49:221 ZCL got data for node=0xF05A, cl=0x0B04, at=0x0505, status=0x00, type=0x21
...
22:55:30:485 	0x84FD27FFFE5F07DE force poll (2)
...
22:56:04:976 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0006, attr: 0x0000, mfcode: 0x0000, aps.id: 104, zcl.seq: 153
22:56:05:006 ZCL got data for node=0xF05A, cl=0x0006, at=0x0000, status=0x00, type=0x10
22:56:05:020 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x0508, mfcode: 0x0000, aps.id: 106, zcl.seq: 154
22:56:05:052 ZCL got data for node=0xF05A, cl=0x0B04, at=0x0508, status=0x00, type=0x21
22:56:05:079 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x050B, mfcode: 0x0000, aps.id: 109, zcl.seq: 156
22:56:05:125 ZCL got data for node=0xF05A, cl=0x0B04, at=0x050B, status=0x00, type=0x29
22:56:05:156 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x0505, mfcode: 0x0000, aps.id: 111, zcl.seq: 157

Thank you for pointing me into the right direction, appreciate your help a lot.

As sample

22:53:49:107 ZCL got data for node=0xF05A, cl=0x0B04, at=0x0508, status=0x00, type=0x21

This one mean you have a attribute report for the node 0xF05A for the current (at=0x0508), 0x050B is for the power.

22:56:05:156 ZCL read attr 0x84FD27FFFE5F07DE, ep: 0x01, cl: 0x0B04, attr: 0x0505, mfcode: 0x0000, aps.id: 111, zcl.seq: 157

This one is not nice, it’s deconz that read itself a value, mean generaly the reporting is not working for your device, if I m right the timing for this action is the one set by “refresh.interval”.
On your log for the attrbute 0x050B you have one at 22:53:49:190 and another at 22:56:05:079 so with 3mn delay.

For plugs the “hot relaod” is immediate.

Try to check if in logs you haven’t closer “ZCL read attr”, less than the 3mn one from your capture.
Or you can use the GUI to ask the attribute value every 10s (for exemple the attribute 0x0508 in the cluster 0x0B04 and check if the device support it ? Perhaps you will have an error message.

Current status: update of current consumption happens every 60 to 70 seconds - even 10 seconds are configured - which is lightyears better than the many minutes (5 to 8) like before.

Next to the log thing I have one DDF content question:
How important is the "path": "/devices/blitzwolf/bw_shp13_smart_plug.json", line?

Because I store my custom DDF for testint purposes on another location as mentioned here. It is now located at /data/.local/share/dresden-elektronik/deCONZ/devices/bw_shp13_smart_plug_MyCustomConfig.json, which should be a permanent storage for the Home Assistant deCONZ addon.

My full DDF looks like this (path line still unchanged):

bw_shp13_smart_plug_MyCustomConfig.json
{
  "schema": "devcap1.schema.json",
  "manufacturername": [
    "_TZ3000_g5xawfcq",
    "_TZ3000_amdymr7l"
  ],
  "modelid": [
    "TS0121",
    "TS011F"
  ],
  "vendor": "Blitzwolf",
  "product": "BW-SHP13",
  "sleeper": false,
  "status": "Gold",
  "path": "/devices/blitzwolf/bw_shp13_smart_plug.json",
  "subdevices": [
    {
      "type": "$TYPE_SMART_PLUG",
      "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",
          "default": "none"
        },
        {
          "name": "state/on",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0b04"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0B04"
        ]
      },
      "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": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/current",
          "refresh.interval": 10,
          "default": 0
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 10,
          "default": 0
        },
        {
          "name": "state/voltage",
          "refresh.interval": 10,
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0702"
        ]
      },
      "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": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "refresh.interval": 300,
          "read": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 0,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val * 10"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 1,
          "max": 300
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x25",
          "min": 1,
          "max": 300,
          "change": "0x0000000A"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "at": "0x0505",
          "dt": "0x21",
          "min": 1,
          "max": 20,
          "change": "0x00000001"
        },
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 1,
          "max": 20,
          "change": "0x00000064"
        },
        {
          "at": "0x050B",
          "dt": "0x29",
          "min": 1,
          "max": 10,
          "change": "0x00000001"
        }
      ]
    }
  ]

Good question, I don’t know if it’s used, on my side I remove all “path” line for DDF.

That’s interesting. Couldn’t find it in the docs. Where did you get this quoted text from, maybe there’s the answer to that path question too?

I will try to ask to other devs about the “path” field.

1 Like

@bcutter ok, so I have answer from manup, he do like me, he remove all “path” field on DDF, so I think we can say it s totally useless.

1 Like