# LiXee ZLinky\_TIC DDF File

**URL:** <https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164>\
**Category:** DDF-Library\
**Created:** [December 21, 2021, 6:15pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164 "2021-12-21T18:15:32Z")\
**Posts on this page:** 20\
**Page:** 15

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [March 4, 2025, 7:44am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/283 "2025-03-04T07:44:52Z")

</div>

Is a PR possible?  
Because it’s annoying to have to edit the general.xml file and add generic device files state\_xxx.json. I guess these custom files are lost with every deCONZ update.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [March 4, 2025, 4:27pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/284 "2025-03-04T16:27:40Z")

</div>

Sure, you can submit all PR you want, the problem is all are not valided ^^.  
Separe them, I m almost sure a PR with changes on general.xml will be valided, especially since most of them are on cluster 0xff66, so they haven’t impact on other device.  
If I m right you have one on the cluster 0x0702 ?  
Can make like for this one

```auto
        <attribute-set id="0x0300" description="Develco specific" mfcode="0x1015">
          <attribute id="0x0300" name="Pulse Configuration" type="u16" access="rw" required="o" mfcode="0x1015"></attribute>
          <attribute id="0x0301" name="Current Summation" type="u48" access="w" required="o" mfcode="0x1015"></attribute>

```

Now I m almost sure the new field like “state/ngtf\_optarif” will be not accepted, I have already tried with less specific field, and PR are still in waiting list since months.

And without them, the complete DDF miss too much features.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [March 5, 2025, 10:13pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/285 "2025-03-05T22:13:42Z")

</div>

ok I will propose the PR(s).  
I can’t read anywhere if ZHA or Z2MQTT sends this information, apart from the counters wh A et V.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [March 7, 2025, 6:17am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/286 "2025-03-07T06:17:06Z")

</div>

Hello, I made a DDF for the ZLinky module which works in ‘historique’ and ‘standard’ mode, single-phase and three-phase as well as production mode. My linky is in ‘historique’ mode. If anyone is interested in testing the DDF in ‘standard’ mode, I can help you set it up. I’m interested in feedback on how it works.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [March 12, 2025, 8:31am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/287 "2025-03-12T08:31:12Z")

</div>

How can I make the necessary PRs? I don’t know how to request changes in general.xml. I don’t want to lose everything in the next deCONZ update.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [March 12, 2025, 3:44pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/288 "2025-03-12T15:44:17Z")

</div>

If you haven’t already done a PR and have only 1 file to edit, it’s so easy.  
Just go on the file [deconz-rest-plugin/general.xml at master · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/general.xml)

And try to edit the file using the browser.

You will have a message saying you haven’t right, so github will create a Fork under your Girhub account witht your change and start to create the PR.  
Don’t worry rollback are possible. When the PR is done the files are linked, so you can edit the file on your fork and the change will be visible on the PR in same time, so easy to edit.

Else if you have problem, just give me the file you are using I can make the PR.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [March 12, 2025, 5:05pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/289 "2025-03-12T17:05:27Z")

</div>

Yes, I did that for a NodOn pilot wire DDF. The case is more complicated for the ZLinky. There is one DDF file, the general.xml file to complete and six state.xxx.item.json files to add for the DDF to work for all Linky modes.  
I can do the files one by one, but it’s a set to make it work.  
If this is the method, I can do the eight PRs by following the method you explain.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [March 13, 2025, 4:26pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/290 "2025-03-13T16:26:52Z")

</div>

Eight PR ? ^^

I think you can do a PR for the general.xml, this one have 99% chance to be valided  
One more PR for all state.xxx.item.json, but for me thoses one will be not valided, here for exemple [DDF for Sonoff ZBMini R2 Extreme (ZBMINIR2) by duffbeer2000 · Pull Request #8034 · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/pull/8034) a PR blocked just because a config\_on\_delayedpoweron\_item.json

And without thoses one a PR for the device is useless, so for me the DDF need to be with the state.xxx.item.json.

If you have already done a PR, better to delete your fork, and create a new one.  
Then create a new branch [How To Create a New Branch In GitHub? - Blog | GitProtect.io](https://gitprotect.io/blog/how-to-create-a-new-branch-in-github/)  
Call it for exemple general\_xml  
Edit the general.xml file  
Then you can do the PR procedure, Pull Request/New pull request up to have something like That

 ![pr](https://forum.phoscon.de/uploads/default/original/2X/c/cae398647982da19bf9537a27bb4b91f8c9c8bb7.jpeg)

Here the branch is called HS2IRC  
And after it’s always the green button.

For the next PR, create a new branch again  
To make it simple, 1 branch \> 1 PR, and you can edit more than 1 file by branch

NEVER make change on the “master” branch, always on new one.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [April 26, 2025, 7:40am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/291 "2025-04-26T07:40:55Z")

</div>

I didn’t understand that sentence:

> [@Smanar](#):
>
> And without thoses one a PR for the device is useless, so for me the DDF need to be with the state.xxx.item.json.

I didn’t make a PR.  
I wrote a PHP script that reverts my changes to general.xml and restores my state.xxx.item.json files if deCONZ has been updated. But it would be so much better with a PR that validates everything.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [April 26, 2025, 10:39am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/292 "2025-04-26T10:39:03Z")

</div>

Devs are realy shy to add new field, so few chance they accept the PR to add a state.xxx.item.json.

And without thoses fieds the Full DDF can’t work.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [April 30, 2025, 9:56am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/293 "2025-04-30T09:56:08Z")

</div>

Ok. I wrote a php script that allows me to use my DDF and add my state.xxx.item.json files as well as the necessary modifications in general.xml. The php script checks for the presence of a line in general.xml. If the line is missing, in the case of a first installation or an update of deCONZ, the script restores all my necessary modifications. It works well. The script is made for the Synology docker version. It is easily adaptable for anyone who wants to use it.

```auto
function fix_lixie_files()
{
	### check update
	$path = [$_SERVER['DOCUMENT_ROOT'].'/volume1/@docker/btrfs/subvolumes/', '/usr/share/deCONZ/zcl/', '/usr/share/deCONZ/devices/generic/items/', $_SERVER['DOCUMENT_ROOT'].'/volume1/docker/deconz_backup/items/'];
	$scan = scandir($path[0]);
	foreach ($scan as $num => $name) if (file_exists($path[0].$name.$path[1].'general.xml') && str_contains($name, '-init') == false && str_contains($scan[$num+1], '-init') == false) break;
	$xmlPath = $path[0].$name.$path[1]; // general.xml folder
	$jsonPath = $path[0].$name.$path[2]; // state.xxx.item.json folder
	$xml = file_get_contents($xmlPath.'general.xml');
	$xmlOld = $xml;
	$add = ['<attribute id="0x0001" type="cstring" name="Couleur de demain" access="r" required="m"/>',
			'<attribute id="0x0010" type="cstring" name="Période tarifaire" access="r" required="m" default="0x00"/>',
			' <attribute id="0x0020" name="PTEC Période Tarifaire en cours" type="cstring" access="r" required="m"></attribute>'];
	if (substr_count($xml, $add[1]) == 1) return;
	
	### fix general.xml in docker
	echo date('d/m/Y H:i:s').' deCONZ container updated, fixes files for Zlinky...'."\n";

	$src = ['<attribute id="0x0000" type="cstring" name="Option tarifaire" access="r" required="m"/>',
			'<attribute id="0x0008" type="u16" name="Avertissement de Dépassement D\'intensité P3" access="r" required="m" default="0x00"/>',
			'<attribute id="0x0001" name="Current Summation Received" type="u48" access="r" required="o"></attribute>'];
	foreach($src as $num => $name)
	{
		if (substr_count($xml, $name) == 1 && substr_count($xml, $add[$num]) == 0) $xml = str_replace($name, $name."\n".' '.$add[$num], $xml);
		else echo 'Check line '.$add[$num].' in general.xml'."\n";
	}
	if ($xml != $xmlOld) file_put_contents($xmlPath.'general.xml', $xml);
	
	### copy item.json files in docker
	$items = ['state_demain_item.json', 'state_ltarf_item.json', 'state_ngtf_optarif_item.json', 'state_ntarf_item.json', 'state_optarif_item.json', 'state_stge_item.json', 'state_tariffPeriod_item.json'];
	foreach ($items as $item) copy($path[3].$item, $jsonPath.$item);
	echo date('d/m/Y H:i:s').' The files are fixed. You need to Stop/Reset/Start the container ...'."\n";
	return;
}

```

I’ve provided the necessary state.xxx.item.json files above. The script retrieves them from a folder and copies them to the correct deCONZ folder.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [April 30, 2025, 3:04pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/294 "2025-04-30T15:04:55Z")

</div>

But for the “general.xml” change, I think you can make a PR, there is 98% of chance for the PR be valided.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [April 30, 2025, 3:57pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/295 "2025-04-30T15:57:16Z")

</div>

Ok, I made a PR for general.xml file  
Do you know when the next update is planned?

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [May 1, 2025, 6:52am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/296 "2025-05-01T06:52:16Z")

</div>

Manup is correcting so much issue ATM, the project is moving.  
I can’t guess a date, but I think the next one will be in less than 1 month (but can be a Beta)

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [May 10, 2025, 4:06am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/297 "2025-05-10T04:06:20Z")

</div>

There was a beta 2.30.1 and then the stable 2.30.2 two days ago. The PR I proposed in general.xml was not validated. Does that mean it was rejected?

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [May 10, 2025, 10:05am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/298 "2025-05-10T10:05:50Z")

</div>

He ?  
I don’t see it in PR list, do you have the link ?

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [May 10, 2025, 10:29am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/299 "2025-05-10T10:29:24Z")

</div>

> <https://github.com/Cadkey/deconz-rest-plugin/blob/patch-2/general.xml>

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [May 10, 2025, 11:27am UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/300 "2025-05-10T11:27:49Z")

</div>

Ha, ok, but the file is still under your fork, now you need to submit the PR.  
go under your fork, then “Pull Request”, “new pull request”, select the offical master branch, the branch “patch-2” on your fork and submit.

There is a faster way if you start direclty from the “patch-2” branch. Field will be be already completed but the procedure is the same.

Don’t worry, you can make several tries, you can’t broke something, and rollbacks are possible too, so you can make mistake, will be not a problem.

---

<div class="post-metadata">

**Author:** ![Cadkey](https://forum.phoscon.de/user_avatar/forum.phoscon.de/cadkey/32/4913_2.png) [@Cadkey](https://forum.phoscon.de/u/Cadkey)\
**Post date:** [May 10, 2025, 12:10pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/301 "2025-05-10T12:10:50Z")

</div>

It doesn’t work. I can only close the pull request.

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [May 10, 2025, 12:13pm UTC](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164/302 "2025-05-10T12:13:46Z")

</div>

I m seing a start here

> <https://github.com/dresden-elektronik/deconz-rest-plugin/pull/8227>
>
> Duplicate line

`Cadkey wants to merge 1 commit into dresden-elektronik:master from Cadkey:master`

You are on your branch Master, not patch-2 .  
But if you want to edit yor PR, you can just edit the general.xml on your fork on the same branch (here your master)

[Previous page](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164.md?page=14)

[Next page](https://forum.phoscon.de/t/lixee-zlinky-tic-ddf-file/1164.md?page=16)
