How to programmatically execute “Reset to Factory Defaults" in Cluster 0x0000 of TS011F metering plug?

Hello!

Is it possible to programmatically (i.e. some code, MQTT, or other measures) do a “Reset to Factory Defaults" in Cluster 0x0000 of a TS011F metering plug (manufacturer “_TZ3000_rdfh8cfs”, ID 0x1141)?

I ask, because I read the plug’s status in Home Assistant (have deCONZ added to HA), and I would like to reset the consumption (“Current Summation Delivered” in the “Simple Metering” cluster) in certain situations.

Thanks for sharing your thoughts! :heart:

PS - related to:

Something to try, it’s perhaps possible to use “custom” request in DDF

        {
          "name": "config/heatsetpoint",
          "refresh.interval": 3660,
          "write": {
            "fn": "zcl:cmd",
            "ep": "0x01",
            "cl": "0x0201",
            "cmd": "0x40",
            "eval": "'01' + ('00' + Item.val.toString(16)).slice(-2) + ('00' + Item.val.toString(16)).slice(-4,-2);",
            "mf": "0x1246"
          }
        },

Try to simulate your.

          "write": {
            "fn": "zcl:cmd",
            "ep": "0x01",
            "cl": "0x0000",
            "cmd": "0x00",
            "eval": ""
          }

Honnestly IDK how to do with eval, because you don’t need param …

1 Like

Thank you! Now I wish I understood what to do with those code lines or where to insert them. :wink: In the long term, my plan is to run this via Home Assistant (if at all possible).

This code need to be added to the DDF, and yes it will create a new command usable by HA, (visible on the device json) I don’t see wich one field to use but to make test you can use for exemple “config/resetpresence”

1 Like