Device appear in deCONZ but not in Phoscon

I deleted and re-paired the device several times but it didn’t change anything!
I tried restarting the Pi between deleting and re-pairing the device but with no more success, what should I do to remove:

“uniqueid”: “00:15:8d:00:07:9b:88:e1-01-0b04”

The only thing that I can see is that type $TYPE_POWER_SENSOR makes reference to generic subdevice deconz-rest-plugin/power_sensor.json at master · dresden-elektronik/deconz-rest-plugin · GitHub that is designed to create a sensor with uid ending with 0x0b04

Is there a reason why in the DDF you have

“type”: “$TYPE_POWER_SENSOR”,
“restapi”: “/sensors”,
“uuid”: [
“$address.ext”,
“0x01”,
“0x000C”
],

instead of

“type”: “$TYPE_POWER_SENSOR”,
“restapi”: “/sensors”,
“uuid”: [
“$address.ext”,
“0x01”,
“0x0B04”
],

As all revelant items in this sensor are referenced as special xiaomi (voltage and current) or with reference to other cluster (power) it won’t change anything in retrieving the information.

BTW I also see a config/temperature in this DDF but inluded in the 0x000C sensor … Not sure that it is populated correctly as it’s neither linked to a temp sensor nor explicitely reference cluster 0x0002. Quite sure that it should be state/temperature rather than config/temperature because this one is what you need for this device (deconz-rest-plugin/state_temperature_item.json at master · dresden-elektronik/deconz-rest-plugin · GitHub)

Not being an expert on ddf files, thanks to @Smanar and @BabaIsYou for your analysis. Can anyone post the fixes suggested by @BabaIsYou on github?

Hi,
Here is the DDF file with the changes suggested by @BabaIsYou.
Are the changes I made to the DDF file correct?
If so I will test this DDF.

In “type”: “$TYPE_POWER_SENSOR” section I replace:
“type”: “$TYPE_POWER_SENSOR”,
“restapi”: “/sensors”,
“uuid”: [
“$address.ext”,
“0x01”,
“0x000C”
by
“type”: “$TYPE_POWER_SENSOR”,
“restapi”: “/sensors”,
“uuid”: [
“$address.ext”,
“0x01”,
“0x0B04”
and
{
“name”: “config/temperature”
}
by
{
“name”: “state/temperature”
}

In “type”: “$TYPE_CONSUMPTION_SENSOR” section I replace:
{
“name”: “config/temperature”
}
by
{
“name”: “state/temperature”
}

{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.relay.c2acn01",
  "product": "wireless relay with neutral",
  "sleeper": false,
  "status": "Silver",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "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",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x08",
            "script": "xiaomi_swversion.js"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert"
        },
        {
          "name": "state/on",
          "refresh.interval": 360
        },
        {
          "name": "state/reachable"
        }
      ]
    },
   {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x02"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x08",
            "script": "xiaomi_swversion.js"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert"
        },
        {
          "name": "state/on",
          "refresh.interval": 360
        },
        {
          "name": "state/reachable"
        }
      ]
     },
     {
      "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",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x08",
            "script": "xiaomi_swversion.js"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/temperature"
        },
        {
          "name": "state/current",
          "parse": {
            "at": "0x00F7",
            "eval": "Item.val = Math.round(Attr.val);",
            "fn": "xiaomi:special",
            "idx": "0x97"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval":360,
          "read": {
            "at": "0x0055",
            "cl": "0x000C",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0055",
            "cl": "0x000C",
            "ep": 1,
            "eval": "Item.val = Math.round(Attr.val);"
          }
        },
        {
          "name": "state/voltage",
          "parse": {
            "at": "0x00F7",
            "eval": "Item.val = Math.round(Attr.val / 10);",
            "fn": "xiaomi:special",
            "idx": "0x96"
          },
          "read": {
            "fn": "none"
          }
        }
      ]
    },
    {
      "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",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x08",
            "script": "xiaomi_swversion.js"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/temperature"
        },
        {
          "name": "state/consumption",
          "parse": {
            "at": "0x00f7",
            "fn": "xiaomi:special",
            "idx": "0x95",
            "eval": "Item.val = Math.round(Attr.val);"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 5,
          "max": 300
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 2,
      "dst.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 5,
          "max": 300
        }
      ]
    }
  ]
}

Seems to reflect was I proposed and I guess that will only solved the “ghost” 0x0b04 sensor.

But to be honest I’m still perplex in front of this DDF and I prefer @Smanar to confirm because I don’t really know this type of device. The mix of measure into Zigbee “standard” cluster, Xiaomi special for others, and 0x000c (without binding) for power seems a bit weird to me.

This device don’t use classic cluster for power but the 0x000C
There is no 0x0b04 sensor in the DDF so you need to don’t have one on the API.

Haven’t see the config/temperature, but yes there is a problem on it too. Need to have a state/temperature and it use the 0x0000 cluster from that I m reading, the Xiaomi special stuff, probably something like

        {
          "name": "state/temperature",
          "parse": {
            "at": "0x00F7",
            "eval": "Item.val = Attr.val;",
            "fn": "xiaomi:special",
            "idx": "0x03"
          },
          "read": {
            "fn": "none"
          }
        }