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
}
]
}
]
}