I completed your json and added ‘PTEC’ and ‘OPTARIF’. I didn’t change ‘DEMAIN’, I’ll check if it works as you defined it.
I used “$TYPE_ALARM_SENSOR” for ‘PTEC’ and ‘OPTARIF’. This may not be the most suitable $type, tell me if there is something better because I don’t know enough.
These two added labels make it possible to manage all subscriptions with a linky in historical mode, BASE, HPHC, TEMPO and EJP.
I have questions to optimize:
what does “max”:600 and “min”:120 correspond to in “bindings”? and same question for “refresh.interval”?
In my case I only need the values to be refreshed when I do a GET of the sensors concerned, at 00h00mn, 00h30mn, 01h00mn, 01h30mn… 23h00mn, 23h30mn.
But the data must be very precise, ideally updated instantly, 48 times a day and the first time at 00:00
{
"schema": "devcap1.schema.json",
"manufacturername": "LiXee",
"modelid": "ZLinky_TIC",
"vendor": "LiXee",
"product": "linky historique_tout tarif_monophase_sans production",
"sleeper": false,
"status": "Gold",
"subdevices": [
{
"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,
"read": {
"at": "0x0100",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0100",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x02",
"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,
"read": {
"at": "0x0102",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0102",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x03",
"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,
"read": {
"at": "0x0104",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0104",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x04",
"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,
"read": {
"at": "0x0106",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0106",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x05",
"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,
"read": {
"at": "0x0108",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0108",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x06",
"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,
"read": {
"at": "0x010A",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x010A",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_ALARM_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x07",
"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/colormode",
"refresh.interval": 360,
"read": {
"at": "0x0020",
"cl": "0x0702",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0020",
"cl": "0x0702",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl:attr"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_ALARM_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0xff66"
],
"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/alarm",
"refresh.interval": 360,
"read": {
"at": "0x0005",
"cl": "0xff66",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0005",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val > 0 ? true : false",
"fn": "zcl:attr"
},
"default": false
},
{
"name": "state/colormode",
"refresh.interval": 360,
"read": {
"at": "0x0001",
"cl": "0xff66",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0001",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl:attr"
}
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_ALARM_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x02",
"0xff66"
],
"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/colormode",
"refresh.interval": 360,
"read": {
"at": "0x0000",
"cl": "0xff66",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0000",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl:attr"
}
},
{
"name": "state/lastupdated"
}
]
}
],
"bindings": [
{
"bind": "unicast",
"cl": "0x0702",
"src.ep": 1,
"report": [
{
"at": "0x0100",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x0102",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x0104",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x0106",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x0108",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x010A",
"change": "0x00000001",
"dt": "0x25",
"max": 600,
"min": 120
},
{
"at": "0x0020",
"dt": "0x42",
"max": 600,
"min": 120
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0xFF66",
"report": [
{
"at": "0x0005",
"dt": "0x21",
"min": 60,
"max": 300,
"change": "0x00000001"
},
{
"at": "0x0001",
"dt": "0x42",
"min": 120,
"max": 600
},
{
"at": "0x0000",
"dt": "0x42",
"min": 120,
"max": 600
}
]
}
]
}