Hi @Smanar,
I am testing a DDF for all Linky modes. It integrates the variables of prices, HC/HP changes, and the six indexes which increment according to Base, Hphc and Tempo. In the case of a Linky in standard mode, it must display the corresponding tariffs, and the production if current is injected into the network.
My Linky is single-phase Tempo.
It works with a few lines added in general.xml and json items.
Below are the files:
{
"schema": "devcap1.schema.json",
"manufacturername": "LiXee",
"modelid": "ZLinky_TIC",
"vendor": "LiXee",
"product": "zlinky_tic_all_mode",
"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": 300,
"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": 300,
"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": 300,
"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": 300,
"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": 300,
"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": 300,
"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",
"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/mode",
"refresh.interval": 3600,
"read": {
"at": "0x0300",
"cl": "0xFF66",
"ep": "0x01",
"fn": "zcl:attr"
},
"parse": {
"at": "0x0300",
"cl": "0xFF66",
"ep": "0x01",
"eval": "if (Attr.val == 0) { Item.val = 'historique monophase';} else if (Attr.val == 1) { Item.val = 'standard monophase';} else if (Attr.val == 2) { Item.val = 'historique triphase';} else if (Attr.val == 3) { Item.val = 'standard triphase';} else if (Attr.val == 5) { Item.val = 'standard monophase producteur';} else if (Attr.val == 7) { Item.val = 'standard triphase producteur';}",
"fn": "zcl:attr"
},
"write": {
"cl": "0xFF66",
"ep": "0x01",
"cmd": "0x00",
"mf": "0x128b",
"eval": "if (Item.val == 'historique monophase') {0} else if (Item.val == 'standard monophase') {1} else if (Item.val == 'historique triphase') {2} else if (Item.val == 'standard triphase') {3} else if (Item.val == 'standard monophase producteur') {5} else if (Item.val == 'standard triphase producteur') {7}",
"fn": "zcl:cmd"
}
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/alarm",
"refresh.interval": 30,
"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/tariffPeriod"
},
{
"name": "state/demain"
},
{
"name": "state/ngtf_optarif"
},
{
"name": "state/ltarf"
},
{
"name": "state/ntarf"
},
{
"name": "state/production"
},
{
"name": "state/stge"
},
{
"name": "state/lastupdated"
}
]
}
],
"bindings": [
{
"bind": "unicast",
"cl": "0xFF66",
"src.ep": 1,
"report": [
{
"at": "0x0000",
"dt": "0x42",
"min": 0,
"max": 0
},
{
"at": "0x0001",
"dt": "0x42",
"min": 0,
"max": 0
},
{
"at": "0x0005",
"dt": "0x21",
"min": 1,
"max": 15,
"change": "0x00000001"
},
{
"at": "0x0010",
"dt": "0x42",
"min": 0,
"max": 0
},
{
"at": "0x0200",
"dt": "0x42",
"min": 0,
"max": 0
},
{
"at": "0x0201",
"dt": "0x20",
"min": 0,
"max": 0
},
{
"at": "0x0300",
"dt": "0x20",
"min": 0,
"max": 0
},
{
"at": "0x0217",
"dt": "0x42",
"min": 0,
"max": 0
}
]
},
{
"bind": "unicast",
"cl": "0x0702",
"src.ep": 1,
"report": [
{
"at": "0x0100",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x0102",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x0104",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x0106",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x0108",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x010A",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
},
{
"at": "0x0001",
"change": "0x00000001",
"dt": "0x25",
"min": 1,
"max": 120
}
]
}
]
}
{
"schema": "resourceitem1.schema.json",
"id": "state/demain",
"datatype": "String",
"access": "R",
"public": true,
"description": "ZLinky demain",
"read": {
"at": "0x0001",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
{
"schema": "resourceitem1.schema.json",
"id": "state/ltarf",
"datatype": "String",
"access": "R",
"public": true,
"description": "ZLinky ltarf",
"read": {
"at": "0x0200",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0200",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
{
"schema": "resourceitem1.schema.json",
"id": "state/ngtf_optarif",
"datatype": "String",
"access": "R",
"public": true,
"description": "ZLinky ngtf_optarif",
"read": {
"at": "0x0000",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0000",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
{
"schema": "resourceitem1.schema.json",
"id": "state/ntarf",
"datatype": "UInt8",
"access": "R",
"public": true,
"description": "ZLinky ntarf",
"read": {
"at": "0x0201",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0201",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
{
"schema": "resourceitem1.schema.json",
"id": "state/tariffPeriod",
"datatype": "String",
"access": "R",
"public": true,
"description": "ZLinky ptec use tariffPeriod",
"read": {
"at": "0x0010",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0010",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
{
"schema": "resourceitem1.schema.json",
"id": "state/stge",
"datatype": "String",
"access": "R",
"public": true,
"description": "ZLinky stge",
"read": {
"at": "0x0217",
"cl": "0xff66",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0217",
"cl": "0xff66",
"ep": 1,
"eval": "Item.val = Attr.val",
"fn": "zcl"
},
"refresh.interval": 730
}
And here is the information that is returned, in addition to the 6 consumptions:
You find the Linky mode, and the titles corresponding to the historique mode and the standard mode, and the production which is the injection of solar panels into the network.
Of course, only the informations corresponding to the Linky mode are updated.
