LiXee ZLinky_TIC DDF File

Hi,

I want to share my ZLinky_TIC DDF File for French Linky electric meter.

Zlinky github repo : https://github.com/fairecasoimeme/Zlinky_TIC

This DDF File is compatible with :

  • Electric meter with single-phase subscription
  • Base subscription without “heure creuse / heure pleine” option

For the moment a PR is in wating state to integrate correcly the specific LiXee Cluster.

Tested with HomeAssitant deCONZ integration 6.11.1.
Instant power, Global consumption and ADPS (Alerte de dépassement de puissance souscrite) are OK.

{
  "schema": "devcap1.schema.json",
  "manufacturername": "LiXee",
  "modelid": "ZLinky_TIC",
  "product": "ZLinky_TIC",
  "sleeper": false,
  "status": "Bronze",
  "path": "/devices/zlinky_tic_with_alarm.json",
  "subdevices": [
    {
      "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"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/current",
          "refresh.interval": 300,
          "read": {
            "at": "0x0508",
            "cl": "0x0b04",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0508",
            "cl": "0x0b04",
            "ep": 1,
            "eval": "if (Attr.val != 65535) { Item.val = Attr.val; }"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 300,
          "read": {
            "at": "0x050f",
            "cl": "0x0b04",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x050f",
            "cl": "0x0b04",
            "ep": 1,
            "eval": "if (Attr.val != -32768) { Item.val = Attr.val; }"
          }
        },
        {
          "name": "state/voltage",
          "refresh.interval": 300
        }
      ]
    },
    {
      "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": "0x0000",
            "cl": "0x0702",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 1,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "ZHAAlarm",
      "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": 30,
          "read": {
            "at": "0x0005",
            "cl": "0xff66",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0005",
            "cl": "0xff66",
            "ep": 1,
            "eval": "Item.val = Attr.val > 0 ? true : false",
            "fn": "zcl"
          },
          "default": false
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x050F",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x23",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0xFF66",
      "report": [
        {
          "at": "0x0005",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    }
  ]
}
2 Likes

I think gold is only done after it’s been verified by multiple users :slight_smile: Otherwise: great job!

Yep, but ATM there is an issue on some DDF at restart if you don’t use Gold status, the endpoint is replaced by 0xFF and the device stop working.

Like @Smanar said, bad devices (with bad endpoint ID) are stored in the database if I start one time deCONZ without DDF loaded.

And, I’ve just understood what DDF status is made for :slight_smile: I didn’t know this status was intended to evaluate the “stability/usability” of the DDF file. Maybe alpha, beta words would have been more evident to understand but it’s not the subject :smiley:
I’ve just discovered that if I manually tick the bronze status box in the GUI, bronze can be also loaded at startup. It’s a good point and I’ll change the status of my file to Bronze .

Thank you for this notice.

Adrien

Hello Alibert,

I am new to the forum and found your post on Zlinky DDF files. I have a single-phase contract, but have not installed your DDF file because I do not have a BASE contract; I have the HCHP contract. I also have solar panels and inject to the grid. It would be nice to be able to read the injection meter, but I would first just like to get the ZLinky to work! If I installed your current DDF file for BASE, would I be hurting anything or creating a problem to change it in the future?

Thank you very much for your time

  • JJF61

If I installed your current DDF file for BASE, would I be hurting anything or creating a problem to change it in the future?

No will not break something, but not sure it will work.
For base it use

#f03c15 BASE 0x0702 0x0000 RP Uint32 9 car Wh Index Base 0

And for HCHP

#c5f015 HCHC 0x0702 0x0100 RO Uint32 9 car Wh Index HCHC 0
#c5f015 HCHP 0x0702 0x0102 RO Uint32 9 car Wh Index HCHP 0

But something strange the first one is reportable, the 2 others seem to be only readable, no reporting.

But if you have access to the gui, the 3 values are visible in it, on cluster 0x0702, attribute 0x0000 0x0100 and 0x0102

Can help you to edit the DDF if needed.

Thank you for your quick answer. I am familiar with VB script, but do not know DDF at all, so I would appreciate some help with the DDF file. Would it be of any use if I send you screen shots of the cluster info on the left side of the deCONZ screen? Thanks again!

It’s just a json, the editor is easy to use, you will see, just need some knowledge on how work zigbee.
Can take a look here https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet

Would it be of any use if I send you screen shots of the cluster info on the left side of the deCONZ screen?

Yes exactly, try to check thoses attributes on cluster 0x0702, attribute 0x0000 0x0100 and 0x0102 Just press the “read” button, it will fill all usable values.

From that I have read previously IDK if the attribute 0x0000 is usefull but for the 2 others, the reporting seem not possible.

So for me:

  • check how look the value in deconz, to check if you need to use 2 or 3 values
  • the DDF core suport only one value for the moment, state/consumption, so will probably need to add 2 json state_consumptionHC_item.json and state_consumptionHP_item.json for exemple
  • configure them for attribute 0x0100 and 0x0102
  • check if the value is updated
  • try making with bind
  • if it don’t work use only polling

Hi,

I just bought a LiXee ZLinky_TIC to work with Deconz to replace my old Ecodevice. This Ecodevice works pretty well but probably consumes more than the Zlink_TIC module.

At home, I have a three-phase electrical installation with “Heure Creuse/Heure Pleine” option. I am not sure the latest version of the DDF file works with my installation. Should it work ?

I installed the Zlinky_TIC module. The association worked since it appears in the list of nodes shown by deconz.

However, its name is 0x7CD6. Moreover It does not appear in Phoscon. I do not know how to include it.

Any help would be extremely valuable.

Thanks in advance

Hello, I m checking for the “triphasé” mode.

  • For power it use the same attribute 0x050F on cluster 0x0B04
  • For current, you will only the phase 1
  • For consumption, it seem you use the same too.

If you have time, can try to add the 2 other currents ?

However, its name is 0x7CD6. Moreover It does not appear in Phoscon. I do not know how to include it.

Yes, the device is not reconized, the DDF is not in deconz yet, so you need to add it yourself, can use a simple text editor, perhaps this link can help you ? LiXee ZLinky_TIC · Issue #5459 · dresden-elektronik/deconz-rest-plugin · GitHub

All DDF coming with deCONZ typically reside in /usr/share/deCONZ/devices/generic/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/deconzuser/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.

BTW @JJF61 do you need some help to adapt your DDF ?

Yes Smanar, I would really like some help. I must mention that I purchased the Linky device, then the Conbee 2 to add ZigBee to my system ; I really don’t know much about ZigBee or how it works at all… this is my first device so I really don’t have any past experience to draw on :frowning:

Hi,

Thanks for your help. Meanwhile, I used the DDF file available in the forum. I was able to get the two values “Heures creuses” and “Heures pleines”. I checked them with what is displayed by the Linky LCD screen. They are correct. In my home automation system (OpenHAB), I used only these two values.

The only remaining problem is to make the connection between deconz and OpenHAB so that I can create a Thing and two items (for the two values). Since Phoscon does not show the Linky_TIC, OpenHAB is not able to create a thing automatically. I tried to do it manually, but I need to have a device id. I do not know how to get it from deconz. I tried Home Assistant, I was unable to get access to Linky_TIC.

Again, thanks for your help.

By the way, I made the inclusion of the Linky_TIC zigbee device before the the installation of the DDF. If I delete the device and make the inclusion again, could the Linky_TIC device appear with the correct name based on the DDF ? Would it help to make the device visible with Phoscon ? If yes, what type of device I should use in Phoscon ? Sensor/Other ?

Thanks in advance

@JJF61 where are you ? Have you create the DDF file on your setup (create the file and copy paste the content from this post) ? even it don’t work correclty.

To know if the DDF is used.

  • Can read log, in deconz/help/debug view, with the flag “info” “info_l2” “DDF”
  • The node name need to change, if you have something like 0xXXXX, it mean the DDF is not used.

If you have the GUI, you can start from scratch DDF cheat sheet · dresden-elektronik/deconz-rest-plugin Wiki · GitHub with fake value, save the file, look the path on the editor title, and just edit the file content with text editor using the one on this post.

You are not forced to re-include the device, on the editor on the menu, you have an option called “hot reload”.

The node name need to change.

For information, you can check all entries in the API using phoscon, help / api Information / sensor

I put the ddf file (zlinky_tic_with_alarm.json) in /opt/deCONZ/devices. In the DDF file:

"path": "/devices/zlinky_tic_with_alarm.json",

I am able to see the ddf file with the editor. I executed the “Hot reload” but the name of the device did not
change (still 0x7CD6).

In the log, when I execute the “Hot reload”, I see only these lines (DDF and Info flags enabled)

I am progressing thanks to your help. I learnt a lot from you. Thanks.

By the way: the deconz version is 2.14.00 / 18/12/2021 (I used a docker container)

Without doing anything, the name of the device changed…

It is now Power 28. I do not know where this name come from.

And using Phoscon, I see a new sensor:

And the good news, I was able to get two additional things with OpenHAB (Alarm, Powerconsumption). I just need to get the values for HCHC and HCHP.

I tried to add the other index (HCHP) in the DDF file but I am note sure I understood all the DDF concepts…

{
  "schema": "devcap1.schema.json",
  "manufacturername": "LiXee",
  "modelid": "ZLinky_TIC",
  "vendor": "LiXee",
  "product": "ZLinky_TIC",
  "sleeper": false,
  "status": "Bronze",
  "path": "/devices/zlinky_tic_with_alarm.json",
  "subdevices": [
    {
      "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"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "refresh.interval": 300,
          "read": {
            "at": "0x0100",
            "cl": "0x0702",
            "ep": 0,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0100",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/current",
          "refresh.interval": 300,
          "read": {
            "at": "0x0508",
            "cl": "0x0b04",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0508",
            "cl": "0x0b04",
            "ep": 1,
            "eval": "if (Attr.val != 65535) { Item.val = Attr.val; }"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 300,
          "read": {
            "at": "0x050f",
            "cl": "0x0b04",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x050f",
            "cl": "0x0b04",
            "ep": 1,
            "eval": "if (Attr.val != -32768) { Item.val = Attr.val; }"
          }
        },
        {
          "name": "state/voltage",
          "refresh.interval": 300
        }
      ]
    },
    {
      "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"
          },
          "parse": {
            "at": "0x0100",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "ZHAAlarm",
      "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": 30,
          "read": {
            "at": "0x0005",
            "cl": "0xff66",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0005",
            "cl": "0xff66",
            "ep": 1,
            "eval": "Item.val = Attr.val > 0 ? true : false",
            "fn": "zcl"
          },
          "default": false
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "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": 259,
          "read": {
            "at": "0x0100",
            "cl": "0x0702",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0100",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x23",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "at": "0x0505",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x050F",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0xFF66",
      "report": [
        {
          "at": "0x0005",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    }
  ]
}

It seems that my modification does not work. This does not create a new sensor in Phoscon for the 2nd Index. I checked with the Phoscon API. I have only the first index (HCHC). Did I forget something in the DDF file ?

Last update: values (power and consumption) are correctly updated within my Home Automation system (OpenHAB). The only issue I must solve is to get the two values (HCHC and HCHP). Nice progress. Thanks Smanar for your help.

Hello Smanar,
Under deCONZ and devices, I created a new folder LiXee, and I placed the DDF file there, named LINKY-DDF-2.json. In deCONZ, I right clicked and edited the DDF file, telling it to use the json file that I saved. I then exited deCONZ and reloaded it. The “Edit DDF” shows that it is indeed using LINKY-DDF-2.json. On the Edit page, in the DDF editor, the status is Bronze. The GUI is showing 0xE9F7, with 00158D005D284DE underneath that. The clusters are showing information, in particular the injection index, apparent power and the HC and HP indexes. Clicking on Read makes the apparent power change every few seconds or so. So the information is there. On the Control page, Basic and Gold are checked. I don’t know if that is correct? There is nothing in Phoscon, and from what I understand, in order for the JowiHue plugin in HomeSeer to see the devices, they have to be in Phoscon. What should I do now?

Yep, your procedure was good, probably a refresh issue.

It is now Power 28. I do not know where this name come from.

Deconz create sensors entries according to the device, and take the first sensor name created to rename the node.

I tried to add the other index (HCHP) in the DDF file but I am note sure I understood all the DDF concepts…

Here you need some help.
First, how you want it will be visible in third app ?
For me the easier way is removing the state/consumption and use instead state/consumptionHP and state/consumptionHC
But the problem is you probly need to make some “stuff” on the third app side, because I don’t thing it will be able to manage natively consumptionHP and consumptionHC.
And another choose you need to make, to create the 2 news fields, there is a barbarian method using only text edition, or creating 2 mores json to have them in the GUI (I will give you the files), there is more thing to do, but the futures fields will be visible in the GUI so easier to use after.

Or can use state/consumption1 and state/consumption2, like that we can use 1 for HP, 2 for HC, or for another contract 1 for consumption and 2 for production. So the news fields will be usable for other purpose.
And same question for current, can use current1/current2/current3 ?
It’s your choose as you are the first one.

@JJF61 I can’t say for file path, there is so much possiblities according to the machine/OS but if you are seing on logs it use the file path for me it’s fine.
“Basic” and “Gold” mean you use only “gold” DDF, so for tests, to be sure your DDF is used, better to set the status to “gold”, less issues like that.
But BTW you need too HP and HC ? it s not you that need consumption and production counter ?

Hello Smanar,
I changed from Bronze to Gold in the DDF editor, saved, shut down and restarted deCONZ. It is now showing Consumption 3 in the GUI. The clusters are the same as before. In “Simple Metering”, I can see the HC and HP totals, and in “Electrical Measurement”, I can see the Apparent Power. (In my case, apparent power is only on Phase 1 because I am on a single-phase system).
I cannot see the injection index (production). I looked for this and I cannot see anywhere in the clusters where it would be. In Phoscom, I now have a sensor device: Alarm 4 LiXee Siren.
Thanks for your help with this, I feel we are making progress! What should I do now? Is the only way to work now with this is through the DDF file? Should I sent it to you?