suite à tes conseils. Et le DDF officiel ne supprime pas le power, il restait juste à zéro.
Code : Tout sélectionner
{
"schema": "devcap1.schema.json",
"manufacturername": "Sinope",
"modelid": "TH1124ZB",
"product": "TH1124ZB",
"sleeper": false,
"status": "Silver",
"path": "/devices/th1124zb.json",
"subdevices": [
{
"type": "$TYPE_THERMOSTAT",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0201"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x0301",
"endpoint": "0x01",
"in": [
"0x0000",
"0x0201",
"0x0204",
"0x0B05"
]
},
"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/heatsetpoint",
"description": "Target temperature of a thermostat.",
"default": 0
},
{
"name": "config/mode",
"description": "Mode of the device."
},
{
"name": "config/offset",
"description": "Relative offset to the main measured value.",
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "config/schedule",
"description": "On-device heating schedules."
},
{
"name": "config/schedule_on",
"description": "Determines if on-device schedules for setting the heatsetpoint are currently used or if the thermostat is operated manually."
},
{
"name": "state/lastupdated"
},
{
"name": "state/on",
"description": "True when device is on; false when off.",
"refresh.interval": 5
},
{
"name": "state/temperature",
"description": "The current temperature in °C × 100.",
"default": 0
}
]
},
{
"type": "$TYPE_POWER_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0b04"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x0301",
"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": 300
},
{
"name": "state/lastupdated"
},
{
"name": "state/power",
"refresh.interval": 300
},
{
"name": "state/voltage",
"refresh.interval": 300,
"parse": {
"at": "0x0505",
"cl": "0x0b04",
"ep": 0,
"eval": "if (Attr.val != 65535) { Item.val = Attr.val / 10 ; }"
}
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0702"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x0301",
"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
},
{
"name": "state/lastupdated"
},
{
"name": "state/power",
"refresh.interval": 300
}
]
},
{
"type": "$TYPE_TEMPERATURE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0402"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x0301",
"endpoint": "0x01",
"in": [
"0x0000",
"0x0402"
]
},
"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/offset",
"description": "Relative offset to the main measured value.",
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/temperature",
"default": 0
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0204"
},
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0B04",
"report": [
{
"at": "0x050B",
"dt": "0x29",
"min": 1,
"max": 300,
"change": "0x00000001"
},
{
"at": "0x0505",
"dt": "0x21",
"min": 1,
"max": 300,
"change": "0x0000000A"
},
{
"at": "0x0508",
"dt": "0x21",
"min": 1,
"max": 300,
"change": "0x00000001"
}
]
}
]
}
Update: Je viens de rajouter les "bindings" qui manquaient dans le DDF initial.