Ci-dessous le contenu du fichier qu'utilise deconz pour la capteur. Est-il possible d'en faire qqchose ?
Code : Tout sélectionner
{
"schema": "devcap1.schema.json",
"manufacturername": "$MF_IKEA",
"modelid": "VINDSTYRKA",
"product": "Vindstyrka Air Quality Sensor",
"sleeper": false,
"status": "Gold",
"subdevices": [
{
"type": "$TYPE_TEMPERATURE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"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",
"refresh.interval": 360,
"read": {
"at": "0x0000",
"cl": "0x0402",
"fn": "zcl"
},
"default": 0
}
]
},
{
"type": "$TYPE_HUMIDITY_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0405"
],
"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/humidity",
"refresh.interval": 360,
"read": {
"at": "0x0000",
"cl": "0x0405",
"fn": "zcl"
},
"default": 0
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_AIR_QUALITY_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042A"
],
"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/lastupdated"
},
{
"name": "state/pm2_5",
"refresh.interval": 360,
"read": {
"at": "0x0000",
"cl": "0x042a",
"fn": "zcl"
},
"parse": {
"at": "0x0000",
"cl": "0x042a",
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"default": 0
},
{
"name": "state/airquality",
"parse": {
"fn": "numtostr",
"srcitem": "state/pm2_5",
"op": "le",
"to": [
10,
"excellent",
20,
"good",
25,
"moderate",
50,
"poor",
75,
"unhealthy",
65535,
"out of scale"
]
}
}
]
},
{
"type": "$TYPE_AIR_QUALITY_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0xfc7e"
],
"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/airqualityppb",
"refresh.interval": 360,
"read": {
"at": "0x0000",
"cl": "0xfc7e",
"fn": "zcl",
"mf": "0x117c"
},
"parse": {
"at": "0x0000",
"cl": "0xfc7e",
"eval": "Item.val = Attr.val",
"fn": "zcl",
"mf": "0x117c"
}
},
{
"name": "state/airquality",
"description": "Text representation of the air quality.",
"parse": {
"fn": "numtostr",
"srcitem": "state/airqualityppb",
"op": "le",
"to": [
65,
"excellent",
220,
"good",
660,
"moderate",
5000,
"unhealthy",
65535,
"out of scale"
]
}
},
{
"name": "state/lastupdated"
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0402",
"report": [
{
"at": "0x0000",
"dt": "0x29",
"min": 1,
"max": 300,
"change": "0x00000032"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0405",
"report": [
{
"at": "0x0000",
"dt": "0x21",
"min": 1,
"max": 300,
"change": "0x00000032"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x042A",
"report": [
{
"at": "0x0000",
"dt": "0x39",
"min": 1,
"max": 300,
"change": "0x00000001"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0xFC7E",
"report": [
{
"at": "0x0000",
"dt": "0x39",
"mf": "0x117C",
"min": 1,
"max": 300,
"change": "0x00000001"
}
]
}
]
}