dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

HEIMAN BW-SHP13 look a like is not showing powerconsumption #3788

Closed canedje closed 2 years ago

canedje commented 3 years ago

Device

Screenshots

image

image

image

image

image

image

image

image

image

I did order in the past from Banggood a Heiman Blitzwolf BW-SPH13 This worked good. I now did order again two devices. These ones are not showing power messaurement. If I look in the Deconz GUI I do see there is not Heiman as Vendor but:

image

If I look at the cluster infor there is power Measurement (See pictures above) In HA there is no power measurement My early one (BlitzWolf 1) has:

image width=1442&height=373 22B68522-5F96-4884-A334-31252EA2D353

MauricioXavier13 commented 3 years ago

Well i'm glad that you all @userMak, @jreidel, @MrMiracles, @jimz011 ,@Pedder007 and @Pr0gr4mm3r have finally your SHP-13 working, integrated and measuring. You're Welcome! πŸ˜‰

Mimiix commented 3 years ago

Case closed!

fridward commented 3 years ago

HI, sorry if I am asking a dumb question but I am a newbie with home assistant and I am stuck with the Blitzwolf problem. I thought it was a good idea not to use phoscon/deconz and go with ZHA. So far everything went great. But I ran into the power consumption problem.

Because of this tried to install phoscon/deconz first as a add on in home-assistant and than I tried to install phoscon/deconz manually. Did not work for me. I can start the phoscon app but the conbee stick will not be recognized ("firmware empty") In deconz . Even worth my entities do not work in the zha integration anymore. So I had to remove the deconz add on. After that my zha integration started to work again. So my question is, if it is not possible to tun deconz zha and deconz at the same time.

spiralshapeturtle commented 3 years ago

Perfect, also works for me.

What I did:

  • previously already added as light. Showed up in Home Assistant, without power measurements.
  • Select the device in Deconz. Right "circle" and Basic -> click on 'exec' (not sure if this was necessary).
  • open Phoscon in second tab side by side with Deconz
  • in Deconz click on 'read'.
  • In Phoscon start a search for a new sensor
  • whist it is searching, start clicking 'read' button in ever couple of seconds in Deconz, start turning the switch (physically) on and off every couple of seconds. I had a desk light attached to it so that there would be actual power usage.
  • in my case Phoscon showed the green bar after 10-15 secnds or so at the first attempt
  • additional power usage entities appeared in HA directly if I remember correctly, but actual figures only started coming in after I had removed the device from the power socket and plugged it in again

Really appreciated this help, fantastic.

canedje commented 3 years ago

I did get 14 plugs up and running showing active power. My problem is that the polling frequence for Active power is about 2 minutes. Thats way to long I tried to change the polling time from 300 to 30 sec. This is only working for one sample, then it is automaticly going back to 300 sec image By dubble clicking on 0x0508 you will get the attribute editor. There you can read the config change it (in my case to 30) save config. the 30 sec will stay there for a short while, then it changes back to 300 is there an other possibility to minimize the polling time?

norman-rennhack commented 2 years ago

Hey,

I do have a similar issue with missing consumption values for a just received SHP-13 from banggood. It has the following manufacturername: "_TZ3000_amdymr7l" See also: https://forum.phoscon.de/t/bw-shp13-consumption-values-not-available/1741

Mimiix commented 2 years ago

Seems to be a new one. @Smanar Can this be done with DDF?

Smanar commented 2 years ago

Yes I think, but from z2m is one of the bugged device that need polling (report can't work)

You have a long story here and the "how to do" https://forum.phoscon.de/t/new-tuya-smart-plug-nas-wr01b-or-tz3000-w0qqde0g/819

Mimiix commented 2 years ago

@Smanar Has always been the case with the SHP13

Smanar commented 2 years ago

Ha ? I haven't followed all the story, but it seem it s firmware dependent too ?

nohn commented 2 years ago

Related: https://github.com/Koenkk/zigbee2mqtt/issues/11800

github-actions[bot] commented 2 years ago

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] commented 2 years ago

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

Remc000tje commented 2 years ago

Seems to be a new one. @Smanar Can this be done with DDF?

Hi all, is : _TZ3000_amdymr7l fixable through DDF, and if so, how should I do this?

kind regards

Smanar commented 2 years ago

Hello, can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_amdymr7l",
  "modelid": "TS011F",
  "vendor": "Tuya",
  "product": "XXXX",
  "sleeper": false,
  "status": "Gold",
  "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"
        },
        {
          "name": "state/on",
          "refresh.interval": 360
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "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": 360,
          "parse": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 1,
            "eval": "Item.val = Attr.val * 10;"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "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": 360
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 360
        },
        {
          "name": "state/voltage",
          "refresh.interval": 360
        }
      ]
    }
  ],
  "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 your model id so have used this one

"modelid": "TS011F",

manup commented 2 years ago

Suppose this is the same Blitzwolf BW-SHP13 we can add the modelid and manufacturername combo to the existing DDF device/blitzwolf/bw_shp13_smart_plug.json.

{
  "manufacturername": ["_TZ3000_g5xawfcq", "_TZ3000_amdymr7l"],
  "modelid": ["TS0121", "TS011F"],
}

Note the modelid TS011F might be different and must be the one shown in Basic cluster.

Remc000tje commented 2 years ago

So this is the "new"one, below the earlier working (in HA and Grafana) SHP13. image

image

does this help?

Smanar commented 2 years ago

Can you try this DDF ?

{
  "schema": "devcap1.schema.json",
  "manufacturername": ["_TZ3000_g5xawfcq", "_TZ3000_amdymr7l"],
  "modelid": ["TS0121", "TS011F"],
  "product": "BW-SHP13",
  "vendor": "Blitzwolf",
  "sleeper": false,
  "status": "Gold",
  "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",
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "../tuya/tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "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",
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "../tuya/tuya_swversion.js"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/current",
          "refresh.interval": 300
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 300
        },
        {
          "name": "state/voltage",
          "refresh.interval": 300
        }
      ]
    },
    {
      "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",
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "../tuya/tuya_swversion.js"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "read": {"at": "0x0000", "cl": "0x0702", "ep": 0, "fn": "zcl" },
          "parse": {"at": "0x0000", "cl": "0x0702", "ep": 0, "eval": "Item.val = Attr.val * 10"},
          "refresh.interval": 300
        },
        {
          "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"
        }
      ]
    }
  ]
}
Remc000tje commented 2 years ago

I would love to do this, but I do not know how to find the folder. I am on a Synology NAS with the VM version of HomeAssistant. within HomeAssistant I use the Deconz Addon.

image

I did, however, gave the Blitzwolf to a friend of mine who is using the ZHA-addon, also with a conbeeII , and this is how it looks on that side.

image

so in basic some mesurements / identity's that are actually in the sensor is not passed through to HA.

what to do?

Smanar commented 2 years ago

Perhaps this can help you to edit the file on HA https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839/2

nohn commented 2 years ago

Those devices are broken, see https://github.com/Koenkk/zigbee2mqtt/issues/11800 for an analysis and can't be fixed. Only way to minimize the impact is pulling the metrics constantly and frequently.

Smanar commented 2 years ago

If I m right It's done too by the setting

"refresh.interval": 300

Remc000tje commented 2 years ago

Hi, tried the suggestion in finding where the files are stored, but I don't no a CLI editor to create a new DDF. but: edited the device/blitzwolf/bw_shp13_smart_plug.json in Deconz, saved the file and Hot-reloaded, but no effect. the BW13 still looks for the "new" TS011F.json. in order to the refresh interval.. it has always been at an interval of 5 sec, now it it 300 . in changing the DDF , it will react as entered, but after a reboot of HA the new default value of 300 is returned again.

is it possible to help me out?

Smanar commented 2 years ago

Hot-reloaded, but no effect

For me the change need to be immediate for plug devices ...

the new default value of 300 is returned again

Deconz doesn't overwrite DDF, so was probably because the change was not applied.

the BW13 still looks for the "new" TS011F.json

I don't understand you haven't saved on the same file ? and have created a new DDF called "TS011F.json" ?

Else about the priority

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//.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

Perhaps this can help you https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839

Pedder007 commented 2 years ago

Hi again, also coming back here after half a year πŸ˜… I got some additonal SHP-13's and they are also the '_TZ3000_amdymr7l' typ. Binded them first as light (via Phoscon) and then tried sensor binding, incl. 'clicking around and switching on and off' to integrate Power, Voltage, etc. like hell, as I did it with the former types, which worked last year, but with this new devices now failed 😒

I came back here and found @Smanar 's explanations around the DDFs (= .json files, I guess?) and followed up. Understood to create a file with the above content, named 'w_shp13_smart_plug.json' in the respective folder (/usr/share/deCONZ/devices/blitzwolf) and learned the plug newly by Phoscon as light. Afterwards started again the sensor search, but again got no consumption data. Also further attempts, incl. clicking around, only caused a deCONZ restart (not quiet sure), as couple of other plugs/lights suddenly switched and also some shutters went up, which wasn't funny at that time with the whole family at home 😞

In the deConz gui I can read the values and they are also properly updated, but they are not handed over to ioBroker, as also the sensor discovery never ended with a green bar in Phoscon.

Does someone maybe have any additional hints? Cheers and good night for today!

Smanar commented 2 years ago

You have used this DDF https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3788#issuecomment-1120395101 So your device is this one

  "manufacturername": ["", "_TZ3000_amdymr7l"],
  "modelid": ["", "TS011F"],

If you select the node, and make "edit DDF", it will open the DDF editor, on the window title, it s your DDF file ?

If yes can try a "hot relaod" in the menu and looking on logs for an error message.

Pedder007 commented 2 years ago

Hi @Smanar, thanks for coming back πŸ‘ Yes, everything as you described, but I missed the edit DDF/hot reload, if that might have been already somewhere in the thread above. I did it now with both plugs and the Debug DDF result is as following:

17:20:37:523 update ddf TS011F index 103
17:20:40:220 60:a4:23:ff:fe:ff:8a:f1-01/state/on expression: Item.val = Attr.val --> false
17:20:41:227 60:a4:23:ff:fe:5e:2a:9f-01/state/on expression: Item.val = Attr.val --> false
17:20:42:178 60:a4:23:ff:fe:65:1e:43-01/state/on expression: Item.val = Attr.val --> false
17:20:57:037 00:17:88:01:08:63:5e:ef-02-0402/state/temperature expression: Item.val = Attr.val + R.item('config/offset').val --> 2036
17:21:11:270 00:17:88:01:08:63:5e:ef-02-0406/state/presence expression: Item.val = Attr.val --> 0
17:21:22:207 60:a4:23:ff:fe:65:1f:20-01/state/on expression: Item.val = Attr.val --> false
17:22:02:478 60:a4:23:ff:fe:65:1f:20-01-0702/state/consumption expression: Item.val = Attr.val * 10 --> 460550
17:22:08:764 update ddf TS011F index 103
17:22:12:214 60:a4:23:ff:fe:ff:8a:f1-01/state/on expression: Item.val = Attr.val --> false
17:22:12:258 60:a4:23:ff:fe:ff:8a:f1-01-0b04/state/power expression: if (Attr.val != -32768 && Attr.val != 32768) { Item.val = Attr.val; } --> 0
17:22:12:298 60:a4:23:ff:fe:ff:8a:f1-01-0b04/state/voltage expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 231
17:22:12:462 60:a4:23:ff:fe:ff:8a:f1-01-0b04/state/current expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 0
17:22:13:237 60:a4:23:ff:fe:5e:2a:9f-01/state/on expression: Item.val = Attr.val --> false
17:22:13:321 60:a4:23:ff:fe:5e:2a:9f-01-0b04/state/power expression: if (Attr.val != -32768 && Attr.val != 32768) { Item.val = Attr.val; } --> 0
17:22:13:545 60:a4:23:ff:fe:5e:2a:9f-01-0b04/state/voltage expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 231
17:22:13:637 60:a4:23:ff:fe:5e:2a:9f-01-0b04/state/current expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 0
17:22:14:225 60:a4:23:ff:fe:65:1e:43-01/state/on expression: Item.val = Attr.val --> false
17:22:23:119 00:0d:6f:00:0f:bf:98:a6-01-0402/state/temperature expression: Item.val = Attr.val + R.item('config/offset').val --> 2055
17:22:36:532 00:17:88:01:08:63:5e:ef-02-0400/state/lightlevel expression: const tholddark = R.item('config/tholddark').val;
const tholdoffset = R.item('config/tholdoffset').val;
const measuredValue = Attr.val;

R.item('state/dark').val = measuredValue <= tholddark;
R.item('state/daylight').val = measuredValue >= tholddark + tholdoffset;
if (measuredValue > 0 && measuredValue < 0xffff) {
    const exp = measuredValue - 1;
    const l = Math.pow(10, exp / 10000.0) + 0.5;
    R.item('state/lux').val = Math.round(l);
}
Item.val = measuredValue;
 --> 14590
17:22:53:785 60:a4:23:ff:fe:65:1e:43-01-0702/state/consumption expression: Item.val = Attr.val * 10 --> 172070
17:22:54:205 60:a4:23:ff:fe:65:1f:20-01/state/on expression: Item.val = Attr.val --> false
17:22:54:255 60:a4:23:ff:fe:65:1f:20-01-0b04/state/power expression: if (Attr.val != -32768 && Attr.val != 32768) { Item.val = Attr.val; } --> 0
17:22:54:316 60:a4:23:ff:fe:65:1f:20-01-0b04/state/voltage expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 221
17:22:54:385 60:a4:23:ff:fe:65:1f:20-01-0b04/state/current expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 0
17:23:44:172 60:a4:23:ff:fe:ff:8a:f1-01/state/on expression: Item.val = Attr.val --> false
17:23:45:176 60:a4:23:ff:fe:5e:2a:9f-01/state/on expression: Item.val = Attr.val --> false
17:23:46:183 60:a4:23:ff:fe:65:1e:43-01/state/on expression: Item.val = Attr.val --> false
17:23:46:243 60:a4:23:ff:fe:65:1e:43-01-0b04/state/power expression: if (Attr.val != -32768 && Attr.val != 32768) { Item.val = Attr.val; } --> 0
17:23:46:309 60:a4:23:ff:fe:65:1e:43-01-0b04/state/voltage expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 220
17:23:46:467 60:a4:23:ff:fe:65:1e:43-01-0b04/state/current expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 0
17:24:21:794 60:a4:23:ff:fe:5e:2a:9f-01-0702/state/consumption expression: Item.val = Attr.val * 10 --> 111990
17:24:26:205 60:a4:23:ff:fe:65:1f:20-01/state/on expression: Item.val = Attr.val --> false
17:24:42:511 a4:c1:38:b8:3a:a2:8e:ad-01/attr/manufacturername expression: Item.val = Attr.val --> _TZ3000_amdymr7l
17:24:42:516 a4:c1:38:b8:3a:a2:8e:ad/attr/manufacturername expression: Item.val = Attr.val --> _TZ3000_amdymr7l
17:24:42:594 a4:c1:38:b8:3a:a2:8e:ad-01/attr/manufacturername expression: Item.val = Attr.val --> _TZ3000_amdymr7l
17:24:42:599 a4:c1:38:b8:3a:a2:8e:ad/attr/manufacturername expression: Item.val = Attr.val --> _TZ3000_amdymr7l
17:24:42:657 a4:c1:38:b8:3a:a2:8e:ad-01/attr/modelid expression: Item.val = Attr.val --> TS011F
17:24:42:662 a4:c1:38:b8:3a:a2:8e:ad/attr/modelid expression: Item.val = Attr.val --> TS011F
17:24:43:544 00:15:8d:00:06:e4:9b:86-01-0402/state/temperature expression: Item.val = Attr.val + R.item('config/offset').val --> 2300
17:24:43:623 00:15:8d:00:06:e4:9b:86-01-0405/state/humidity expression: Item.val = Attr.val + R.item('config/offset').val --> 4686
17:24:43:715 00:15:8d:00:06:e4:9b:86-01-0403/state/pressure expression: Item.val = Attr.val + R.item('config/offset').val --> 993
17:24:50:322 60:a4:23:ff:fe:ff:8a:f1-01-0702/state/consumption expression: Item.val = Attr.val * 10 --> 20920
17:25:12:695 00:17:88:01:08:63:5e:ef-02-0406/config/sensitivity expression: Item.val == 0 ? Item.val = Attr.val : Item.val --> 2
17:25:12:726 00:17:88:01:08:63:5e:ef-02-0406/config/ledindication expression: Item.val = Attr.val --> false
17:25:12:734 00:17:88:01:08:63:5e:ef-02-0406/config/usertest expression: Item.val = Attr.val --> false
17:25:12:740 00:17:88:01:08:63:5e:ef-02-0400/config/ledindication expression: Item.val = Attr.val --> false
17:25:12:745 00:17:88:01:08:63:5e:ef-02-0400/config/usertest expression: Item.val = Attr.val --> false
17:25:12:751 00:17:88:01:08:63:5e:ef-02-0402/config/ledindication expression: Item.val = Attr.val --> false
17:25:12:759 00:17:88:01:08:63:5e:ef-02-0402/config/usertest expression: Item.val = Attr.val --> false
17:25:12:805 00:17:88:01:08:63:5e:ef-02-0406/config/battery expression: Item.val = Attr.val / 2 --> 63
17:25:14:142 00:17:88:01:08:63:5e:ef-02-0400/config/battery expression: Item.val = Attr.val / 2 --> 63
17:25:15:164 00:17:88:01:08:63:5e:ef-02-0402/config/battery expression: Item.val = Attr.val / 2 --> 63
17:25:19:636 60:a4:23:ff:fe:ff:8a:f1-01/state/on expression: Item.val = Attr.val --> false
17:25:20:678 60:a4:23:ff:fe:5e:2a:9f-01/state/on expression: Item.val = Attr.val --> false
17:25:21:748 60:a4:23:ff:fe:65:1e:43-01/state/on expression: Item.val = Attr.val --> false
Pedder007 commented 2 years ago

aha, I guess now I understood the concept πŸ˜„ It is possible to creat an own device-.json simply by drag and drop with the DDF editor. Thus I added some 'parameters' to one of my SHP-13: grafik

But what after this, restart deCONZ? I did a new 'hot reload' and also restarted the adapter in ioBroker, but currently no additional objects are shown in ioBroker. Or do I have to learn the device again via Phoscon and then the right file (ts011f.json) will be taken for the sensor objects?

Thanks for the next tip? πŸ˜ƒ

Smanar commented 2 years ago

So the DDF on the previous link is working ? (To add it officially) From that I m seing, it s complete, no need to add item ?

From log you have the voltage, current , consumption and power

17:22:54:255 60:a4:23:ff:fe:65:1f:20-01-0b04/state/power expression: if (Attr.val != -32768 && Attr.val != 32768) { Item.val = Attr.val; } --> 0
17:23:46:309 60:a4:23:ff:fe:65:1e:43-01-0b04/state/voltage expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 220
17:23:46:467 60:a4:23:ff:fe:65:1e:43-01-0b04/state/current expression: if (Attr.val != 65535) { Item.val = Attr.val; } --> 0
17:24:21:794 60:a4:23:ff:fe:5e:2a:9f-01-0702/state/consumption expression: Item.val = Attr.val * 10 --> 111990

After that, you just need to save the DDF. It will be used on new future detected device, or on actual one (that are already in the API) at next reload, or immediatly if you make the "hot reload".

Third app can have skipped the change, so you can take a look in the API to be sure (in phoscon / help / Api Information) Or generaly just restart the third app (I think all of them resynchronise at start)

Pedder007 commented 2 years ago

I thought the same, that the consumption info was already in the new file. However, I put it additionally with the DDF editor, as a comparison btw. my older SHP-13s and the new ones showed, that in the old one, the parameters have been in (like in the screenshoot above) and in the new ones not. Although I used your prepared file (from above).

However, I just did some additional steps and now its working πŸ˜„ 1st: I additionally (in the DDF editor) changed the paramater 'Status' from 'Draft' to 'Gold', reloaded, but no change (means, measures in deConz, but not in my Home Automation) 2nd: Then deleted the one plug from Phoson/deConz and learned it newly. And now, when learning it secondly as a sensor, the pairing also their ended 'green' and the values were added to my HA πŸ‘

Thus as my learning: First DDF file has to be confirgured propperly, incl. all values and setting it to 'Gold'. Then the device has to be learned newly to Phoscon/deConz, first as light, afterwards as sensor. (I had a little load on it, only as a hint, as this was also a prerequisite when learning the older devices)

Thanks @Smanar for your support, with the right hints 'users' become able to tackle the rest πŸ˜„

Smanar commented 2 years ago

But the status is "Gold" ? https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3788#issuecomment-1120395101

Pedder007 commented 2 years ago

I saw in your file source code that it was GOLD, but however the DDF editor showed it as DRAFT. Thus I set it manually to GOLD. Maybe an individual β€šproblemβ€˜!? Now it works and that is fine 😊

Pedder007 commented 2 years ago

Hi again, having now a rough understanding how the DDF editor works and that one as me might be able to configure personal device configurations in deCONZ, another idea popped up in my mind.

I'm using a couple of shutter devices of the type TS130F (e.g. _TZ3000_fccpjz5z and others). Since I'm using them, I never found a way to trigger the 'stop' function, which the devices do have in deCONZ (gui), from my HA in a smooth way. Means, there was always a respective datapoint missing. Thus, when steering a shutter manually, I always was forced to stop it's movement by a work around and executing a shell command like: 'curl -X PUT http://127.0.0.1:80/api/Axxxxxxxxx/lights/xx/state -d '{"stop":true}' -s' This works, but isn't really convenient.

Now I searched in the DDF editor, but also didn't find a respective item there like a 'stop' for the shutter devices. Would it be possible to implement such?

Mimiix commented 2 years ago

@Pedder007 For that, you need to create a differnet issue. But, if the rest api works with the STOP then it's a HA issue as HA talks to the API (so does phoscon).

Smanar commented 2 years ago

Yep, sorry it s the official method to stop covering, using {"stop":true} But I don't understand why this request is less convenient than the {"open":true} ?

Pedder007 commented 2 years ago

Hi and thanks to you both! I feared for such an answer and thus I asked for a maybe possible solution via the DDF editor πŸ˜‰ And the solution isn’t for sure less convenient then the one for β€˜open’, but I don’t need to use the one for open, as I have the β€˜level’ object/data point in my HA (ioBroker) and this I can steer with simply putting in numbers, like β€š0β€˜ or β€š100β€˜.

Mysticsilent commented 2 years ago

I can also confirm that the energy information is not coming through on the TZ3000_amdymr7l variant. The TZ3000_g5xawfcq works just fine. Can this be supported? Can i somehow help provide the needed information?

Smanar commented 2 years ago

It s a clone ? The same device (To know if we need to create a new DDF or use the same)

Edit the bw_shp13_smart_plug.json file and add the second one

"manufacturername": ["_TZ3000_g5xawfcq", "TZ3000_amdymr7l"], "modelid": ["TS0121", "TS0121"],

Mysticsilent commented 2 years ago

It should be a clone. Same manufacturer, same device, same functionality but different device identity.

Smanar commented 2 years ago

And the DDF is working with the previous modification with your device ?