# Données de consommation compteur Linky

**URL:** <https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061>\
**Category:** Demandes livrées\
**Tags:** feature-integration\
**Created:** [Janvier 27, 2021, 3:47 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061 "2021-01-27T15:47:48Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 22, 2022, 5:24 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/81 "2022-06-22T17:24:29Z")

</div>

Je vais essayer de me débrouiller.

Non pas de test sur la PR le type numeric est déjà couvert.

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 24, 2022, 2:53 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/82 "2022-06-24T14:53:10Z")

</div>

Bon je vois pas comment faire ( j’ai regarder comment c’était fait ) mais je ne sais pas comment spammer le service.

De plus d’après la sortie de la lib ( et si je comprends bien ) , c’est la lib mqtt qui bloque non ?

```auto
Blocked for 36.14090771484375ms, operation started here: [
  ' at Socket.connect (net.js:970:7)',
  ' at Object.connect (net.js:201:17)',
  ' at Object.streamBuilder (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/connect/tcp.js:18:14)',
  ' at MqttClient.wrapper [as streamBuilder] (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/connect/index.js:154:36)',
  ' at MqttClient._setupStream (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:298:22)',
  ' at new MqttClient (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/client.js:277:8)',
  ' at Object.connect (/src/server/services/zigbee2mqtt/node_modules/mqtt/lib/connect/index.js:156:16)',
  ' at Zigbee2mqttManager.connect (/src/server/services/zigbee2mqtt/lib/connect.js:16:40)',
  ' at Zigbee2mqttManager.init (/src/server/services/zigbee2mqtt/lib/init.js:88:18)',
  ' at async Object.start (/src/server/services/zigbee2mqtt/index.js:17:5)',
  ' at async Service.start (/src/server/lib/service/service.start.js:33:7)'
]

```

D’ailleurs je ne comprends pas bien le lifecycle ici , pourquoi y’a t il un connect à chaque publish d’un device.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 24, 2022, 3:05 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/83 "2022-06-24T15:05:59Z")

</div>

Pour spammer le service, tu appelles depuis un test cette fonction avec l’objet Z2M de ton Lixee TIC:

> <https://github.com/GladysAssistant/Gladys/blob/master/server/services/zigbee2mqtt/lib/handleMqttMessage.js#L13>

Le test associé:

> <https://github.com/GladysAssistant/Gladys/blob/master/server/test/services/zigbee2mqtt/lib/handleMqttMessage.test.js>

Dans les tests, le device Z2M qui est envoyé ressemble à ça:

> <https://github.com/GladysAssistant/Gladys/blob/master/server/test/services/zigbee2mqtt/lib/payloads/mqtt_devices_get.json>

Essaie de chopper le même message Z2M pour le Lixee TIC, créé un nouveau fichier JSON et créé un nouveau test qui envoie ce JSON.

Ensuite c’est de la mesure ligne par ligne pour comprendre ce qui se passe / ce qui est trop lourd à faire.

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 24, 2022, 8:52 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/84 "2022-06-24T20:52:41Z")

</div>

J’ai juste ajouter mon device dans les json et ajouter ce test ( pire que mieux )

```auto
  it('BIG PAYLOAD', async () =\u003e {
    // PREPARE
    stateManagerGetStub = sinon.stub();
    stateManagerGetStub.onFirstCall().returns(null);
    zigbee2mqttManager.gladys.stateManager.get = stateManagerGetStub;
    // EXECUTE
    await zigbee2mqttManager.handleMqttMessage('zigbee2mqtt/0x00158d0005d29aa0', `{\"active_enerfy_out_d01\":8015,\"active_enerfy_out_d02\":10819,\"active_enerfy_out_d03\":4081,\"active_enerfy_out_d04\":5549,\"active_power\":1126,\"active_power_max\":2360,\"active_power_ph_b\":464,\"apparent_power\":415,\"available_power\":6,\"average_rms_voltage_meas_period\":233,\"current_date\":\"E220524164514\",\"current_index_tarif\":2,\"current_price\":\"HEURE PLEINE\",\"current_summ_delivered\":28947,\"current_tarif\":\"H PLEINE/CREUSE\",\"current_tier10_summ_delivered\":0,\"current_tier1_summ_delivered\":12307,\"current_tier2_summ_delivered\":16640,\"current_tier3_summ_delivered\":0,\"current_tier4_summ_delivered\":0,\"current_tier5_summ_delivered\":0,\"current_tier6_summ_delivered\":0,\"current_tier7_summ_delivered\":0,\"current_tier8_summ_delivered\":0,\"current_tier9_summ_delivered\":0,\"device\":{\"applicationVersion\":4,\"dateCode\":\"20220217\",\"friendlyName\":\"Lixee TIC\",\"hardwareVersion\":1,\"ieeeAddr\":\"0x00158d0005d29aa0\",\"manufacturerID\":4151,\"manufacturerName\":\"LiXee\",\"model\":\"ZLinky_TIC\",\"networkAddress\":32871,\"powerSource\":\"Mains (single phase)\",\"softwareBuildID\":\"4000-0005\",\"stackVersion\":2,\"type\":\"Router\",\"zclVersion\":3},\"drawn_v_a_max_n1\":2940,\"last_seen\":\"2022-06-24T15:33:28+00:00\",\"linkquality\":78,\"message1\":\"PAS DE MESSAGE\",\"message2\":\"\",\"meter_serial_number\":\"811775803140\",\"power_threshold\":6,\"relais\":1,\"rms_current\":2,\"rms_voltage\":231,\"site_id\":\"XXXXXX\",\"software_revision\":2,\"status_register\":\"003A4401\",\"update\":{\"state\":\"idle\"},\"update_available\":false}`);
    // ASSERT
    assert.calledOnce(gladys.event.emit);
  });

```

ça fout en l’air tous les tests. ( discover et handlemqtt )

Bref c’est pas mon domaine. ( très frustrant j’y comprend rien )

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 7:34 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/85 "2022-06-27T07:34:55Z")

</div>

C’est dans ton code ça ou c’est une erreur de copier coller sur le forum ?

 ![Screenshot 2022-06-27 at 09.34.03](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/af44d27c484850e5d8bd79919dbff736c1575710.png)

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 7:53 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/86 "2022-06-27T07:53:41Z")

</div>

Dans le code, je vais remplacer par un single quote

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 8:04 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/87 "2022-06-27T08:04:23Z")

</div>

Ah mais attend en fait censé être un string j’imagine, donc ça peut-être normal.

Tu as quoi comme erreur sinon?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 8:11 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/88 "2022-06-27T08:11:29Z")

</div>

Ouai je viens de check les autres tests sont comme ça

Le fail complet, j’ai l’impression que les features se «&nbsp;décalle&nbsp;» ( GIST car ça passe pas sur le fofo )

> <https://gist.github.com/VonOx/3408e88d231594fc530bdbabcbe5f71a#file-gistfile1-txt>

Problème de taille de tableau a priori

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 8:46 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/89 "2022-06-27T08:46:48Z")

</div>

Du coup ce qui est normal, quel est le problème ?

Si tu modifie l’input des tests, c’est normal que l’output soit différent.

Après en soit là on s’en fout que les tests passent ou non sur le CI, l’idée c’était juste d’avoir ce test localement pour pouvoir tester comment réagissait l’intégration Z2M en recevant ce gros payload, et comprendre quel bout de code créé ces blocages de l’event loop.

Après je reconnais que c’est une démarche il faut s’y connaitre un peu 😅

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 3:01 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/90 "2022-06-27T15:01:46Z")

</div>

Si j’ignore les autres tests pas de blocage sur le gros payload

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/45eed43b787841041bae923cf1e2dbb44d7f2fc7.png)

Là où ça bloque, je ne sais pas si ça aide ( pas de stack )

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/cc5d858da09aad9d0c91125bfddf120e55ebc4a6.png)

Rien d’autre

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 3:35 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/91 "2022-06-27T15:35:17Z")

</div>

> [@VonOx](#):
>
> Là où ça bloque, je ne sais pas si ça aide ( pas de stack )

 ![Screenshot 2022-06-27 at 17.33.54](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/f/fc7eeaa1332d589c1704fbc8f7a01bd92ccbbf2e.png)

Pas de surprise, c’est le JSON.parse qui bloque, c’est un classique, JSON.parse est une opération synchrone bloquante en Javascript, sur les gros payload ça prend du temps.

Par curiosité, il ressemble à quoi ce JSON ?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 3:48 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/92 "2022-06-27T15:48:47Z")

</div>

Le Lixee en +

```json
[
  {
    "external_id": "zigbee2mqtt:0x00158d00033e88d5",
    "features": [
      {
        "category": "battery",
        "external_id": "zigbee2mqtt:0x00158d00033e88d5:battery:integer:battery",
        "has_feedback": false,
        "max": 100,
        "min": 0,
        "name": "Battery",
        "read_only": true,
        "selector": "zigbee2mqtt-0x00158d00033e88d5-battery-integer-battery",
        "type": "integer",
        "unit": "percent"
      },
      {
        "category": "button",
        "external_id": "zigbee2mqtt:0x00158d00033e88d5:button:click:action",
        "has_feedback": false,
        "max": 7,
        "min": 0,
        "name": "Action",
        "read_only": true,
        "selector": "zigbee2mqtt-0x00158d00033e88d5-button-click-action",
        "type": "click",
        "unit": null
      },
      {
        "category": "switch",
        "external_id": "zigbee2mqtt:0x00158d00033e88d5:switch:voltage:voltage",
        "has_feedback": false,
        "max": 10000,
        "min": 0,
        "name": "Voltage",
        "read_only": true,
        "selector": "zigbee2mqtt-0x00158d00033e88d5-switch-voltage-voltage",
        "type": "voltage",
        "unit": "millivolt"
      }
    ],
    "model": "WXKG01LM",
    "name": "0x00158d00033e88d5",
    "service_id": "f87b7af2-ca8e-44fc-b754-444354b42fee",
    "should_poll": false
  },
  {
    "name": "0x00158d0004019127",
    "model": "WXKG11LM",
    "external_id": "zigbee2mqtt:0x00158d0004019127",
    "features": [
      {
        "name": "Battery",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 100,
        "category": "battery",
        "type": "integer",
        "unit": "percent",
        "external_id": "zigbee2mqtt:0x00158d0004019127:battery:integer:battery",
        "selector": "zigbee2mqtt-0x00158d0004019127-battery-integer-battery"
      },
      {
        "name": "Voltage",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 10000,
        "category": "switch",
        "type": "voltage",
        "unit": "millivolt",
        "external_id": "zigbee2mqtt:0x00158d0004019127:switch:voltage:voltage",
        "selector": "zigbee2mqtt-0x00158d0004019127-switch-voltage-voltage"
      }
    ],
    "should_poll": false,
    "service_id": "f87b7af2-ca8e-44fc-b754-444354b42fee"
  },
  {
    "name": "0x00158d00045b2740",
    "model": "WSDCGQ11LM",
    "external_id": "zigbee2mqtt:0x00158d00045b2740",
    "features": [
      {
        "name": "Battery",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 100,
        "category": "battery",
        "type": "integer",
        "unit": "percent",
        "external_id": "zigbee2mqtt:0x00158d00045b2740:battery:integer:battery",
        "selector": "zigbee2mqtt-0x00158d00045b2740-battery-integer-battery"
      },
      {
        "name": "Temperature",
        "read_only": true,
        "has_feedback": false,
        "min": -100,
        "max": 150,
        "category": "temperature-sensor",
        "type": "decimal",
        "unit": "celsius",
        "external_id": "zigbee2mqtt:0x00158d00045b2740:temperature-sensor:decimal:temperature",
        "selector": "zigbee2mqtt-0x00158d00045b2740-temperature-sensor-decimal-temperature"
      },
      {
        "name": "Humidity",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 100,
        "category": "humidity-sensor",
        "type": "decimal",
        "unit": "percent",
        "external_id": "zigbee2mqtt:0x00158d00045b2740:humidity-sensor:decimal:humidity",
        "selector": "zigbee2mqtt-0x00158d00045b2740-humidity-sensor-decimal-humidity"
      },
      {
        "name": "Alarm",
        "read_only": false,
        "has_feedback": true,
        "min": 0,
        "max": 1,
        "category": "siren",
        "type": "binary",
        "unit": null,
        "external_id": "zigbee2mqtt:0x00158d00045b2740:siren:binary:alarm",
        "selector": "zigbee2mqtt-0x00158d00045b2740-siren-binary-alarm"
      },
      {
        "name": "Pressure",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 10000,
        "category": "pressure-sensor",
        "type": "decimal",
        "unit": "hPa",
        "external_id": "zigbee2mqtt:0x00158d00045b2740:pressure-sensor:decimal:pressure",
        "selector": "zigbee2mqtt-0x00158d00045b2740-pressure-sensor-decimal-pressure"
      },
      {
        "name": "Voltage",
        "read_only": true,
        "has_feedback": false,
        "min": 0,
        "max": 10000,
        "category": "switch",
        "type": "voltage",
        "unit": "millivolt",
        "external_id": "zigbee2mqtt:0x00158d00045b2740:switch:voltage:voltage",
        "selector": "zigbee2mqtt-0x00158d00045b2740-switch-voltage-voltage"
      }
    ],
    "should_poll": false,
    "service_id": "f87b7af2-ca8e-44fc-b754-444354b42fee"
  },
  {
    "service_id": "f87b7af2-ca8e-44fc-b754-444354b42fee",
    "name": "0x00158d0005d29aa0",
    "model": "ZLinky_TIC",
    "external_id": "zigbee2mqtt:0x00158d0005d29aa0",
    "should_poll": false,
    "features": [
      {
        "name": "Numéro tarif",
        "selector": "zigbee2mqtt-0x00158d0005d29aa0-energy-sensor-index-current-index-tarif",
        "external_id": "zigbee2mqtt:0x00158d0005d29aa0:energy-sensor:index:current_index_tarif",
        "category": "energy-sensor",
        "type": "index",
        "read_only": true,
        "has_feedback": false,
        "unit": "kilowatt-hour",
        "min": 0,
        "max": 10000
      },
      {
        "name": "Puissance apprente",
        "selector": "zigbee2mqtt-0x00158d0005d29aa0-energy-sensor-power-apparent-power",
        "external_id": "zigbee2mqtt:0x00158d0005d29aa0:energy-sensor:power:apparent_power",
        "category": "energy-sensor",
        "type": "power",
        "read_only": true,
        "has_feedback": false,
        "unit": "volt-ampere",
        "min": 0,
        "max": 10000
      },
      {
        "name": "Index Total",
        "selector": "zigbee2mqtt-0x00158d0005d29aa0-energy-sensor-index-current-summ-delivered",
        "external_id": "zigbee2mqtt:0x00158d0005d29aa0:energy-sensor:index:current_summ_delivered",
        "category": "energy-sensor",
        "type": "index",
        "read_only": true,
        "has_feedback": false,
        "unit": "kilowatt-hour",
        "min": 0,
        "max": 1000000
      },
      {
        "name": "Heures creuses",
        "selector": "zigbee2mqtt-0x00158d0005d29aa0-energy-sensor-index-current-tier1-summ-delivered",
        "external_id": "zigbee2mqtt:0x00158d0005d29aa0:energy-sensor:index:current_tier1_summ_delivered",
        "category": "energy-sensor",
        "type": "index",
        "read_only": true,
        "has_feedback": false,
        "unit": "kilowatt-hour",
        "min": 0,
        "max": 1000000
      },
      {
        "name": "Heures pleines",
        "selector": "zigbee2mqtt-0x00158d0005d29aa0-energy-sensor-index-current-tier2-summ-delivered",
        "external_id": "zigbee2mqtt:0x00158d0005d29aa0:energy-sensor:index:current_tier2_summ_delivered",
        "category": "energy-sensor",
        "type": "index",
        "read_only": true,
        "has_feedback": false,
        "unit": "kilowatt-hour",
        "min": 0,
        "max": 1000000
      }
    ]
  }
]

```

Ou celui ci je ne sais pas trop lequel est utilisé

```json
[
  {
    "definition": null,
    "endpoints": {
      "1": {
        "bindings": [],
        "clusters": {
          "input": ["genBasic", "genTime", "genOta"],
          "output": ["genPowerCfg", "genPollCtrl", "ssIasZone"]
        },
        "configured_reportings": []
      },
      "242": {
        "bindings": [],
        "clusters": {
          "input": [],
          "output": ["greenPower"]
        },
        "configured_reportings": []
      }
    },
    "friendly_name": "Coordinator",
    "ieee_address": "0x00212effff06ddd8",
    "interview_completed": true,
    "interviewing": false,
    "network_address": 0,
    "supported": false,
    "type": "Coordinator"
  },
  {
    "definition": {
      "description": "MiJia wireless switch",
      "exposes": [
        {
          "access": 1,
          "description": "Remaining battery in %",
          "name": "battery",
          "property": "battery",
          "type": "numeric",
          "unit": "%",
          "value_max": 100,
          "value_min": 0
        },
        {
          "access": 1,
          "description": "Triggered action (e.g. a button click)",
          "name": "action",
          "property": "action",
          "type": "enum",
          "values": ["single", "double", "triple", "quadruple", "hold", "release", "many"]
        },
        {
          "access": 1,
          "description": "Voltage of the battery in millivolts",
          "name": "voltage",
          "property": "voltage",
          "type": "numeric",
          "unit": "mV"
        },
        {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "WXKG01LM",
      "supports_ota": false,
      "vendor": "Xiaomi"
    },
    "endpoints": {
      "1": {
        "bindings": [],
        "clusters": {
          "input": [],
          "output": []
        },
        "configured_reportings": []
      }
    },
    "friendly_name": "0x00158d00033e88d5",
    "ieee_address": "0x00158d00033e88d5",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "LUMI",
    "model_id": "lumi.sensor_switch",
    "network_address": 44173,
    "power_source": "Battery",
    "supported": true,
    "type": "EndDevice"
  },
  {
    "date_code": "20180525",
    "definition": {
      "description": "Aqara wireless switch",
      "exposes": [
        {
          "access": 1,
          "description": "Remaining battery in %",
          "name": "battery",
          "property": "battery",
          "type": "numeric",
          "unit": "%",
          "value_max": 100,
          "value_min": 0
        },
        {
          "access": 1,
          "description": "Voltage of the battery in millivolts",
          "name": "voltage",
          "property": "voltage",
          "type": "numeric",
          "unit": "mV"
        },
        {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "WXKG11LM",
      "supports_ota": false,
      "vendor": "Xiaomi"
    },
    "endpoints": {
      "1": {
        "bindings": [],
        "clusters": {
          "input": ["genBasic", "genMultistateInput", "genIdentify"],
          "output": ["genBasic"]
        },
        "configured_reportings": []
      }
    },
    "friendly_name": "0x00158d0004019127",
    "ieee_address": "0x00158d0004019127",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "LUMI",
    "model_id": "lumi.remote.b1acn01",
    "network_address": 47250,
    "power_source": "Battery",
    "software_build_id": "3000-0001",
    "supported": true,
    "type": "EndDevice"
  },
  {
    "date_code": "20220217",
    "definition": {
      "description": "Lixee ZLinky",
      "exposes": [
        {
          "access": 1,
          "description": "Serial Number",
          "name": "ADSC",
          "property": "meter_serial_number",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Supplier pricing schedule name",
          "name": "NGTF",
          "property": "current_tarif",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Current supplier price label",
          "name": "LTARF",
          "property": "current_price",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Current tariff index number",
          "name": "NTARF",
          "property": "current_index_tarif",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Customer tele-information protocol version",
          "name": "VTIC",
          "property": "software_revision",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Current date and time",
          "name": "DATE",
          "property": "current_date",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Total active power delivered",
          "name": "EAST",
          "property": "current_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 01)",
          "name": "EASF01",
          "property": "current_tier1_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 02)",
          "name": "EASF02",
          "property": "current_tier2_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 03)",
          "name": "EASF03",
          "property": "current_tier3_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 04)",
          "name": "EASF04",
          "property": "current_tier4_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 05)",
          "name": "EASF05",
          "property": "current_tier5_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 06)",
          "name": "EASF06",
          "property": "current_tier6_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 07)",
          "name": "EASF07",
          "property": "current_tier7_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 08)",
          "name": "EASF08",
          "property": "current_tier8_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 09)",
          "name": "EASF09",
          "property": "current_tier9_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 10)",
          "name": "EASF10",
          "property": "current_tier10_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 01)",
          "name": "EASD01",
          "property": "active_enerfy_out_d01",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 02)",
          "name": "EASD02",
          "property": "active_enerfy_out_d02",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 03)",
          "name": "EASD03",
          "property": "active_enerfy_out_d03",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 04)",
          "name": "EASD04",
          "property": "active_enerfy_out_d04",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "RMS current",
          "name": "IRMS1",
          "property": "rms_current",
          "type": "numeric",
          "unit": "A"
        },
        {
          "access": 1,
          "description": "RMS voltage",
          "name": "URMS1",
          "property": "rms_voltage",
          "type": "numeric",
          "unit": "V"
        },
        {
          "access": 1,
          "description": "Apparent power of reference",
          "name": "PREF",
          "property": "available_power",
          "type": "numeric",
          "unit": "kVA"
        },
        {
          "access": 1,
          "description": "Register of Statutes",
          "name": "STGE",
          "property": "status_register",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Apparent power threshold",
          "name": "PCOUP",
          "property": "power_threshold",
          "type": "numeric",
          "unit": "kVA"
        },
        {
          "access": 1,
          "description": "Current point of the active load curve drawn",
          "name": "CCASN",
          "property": "active_power",
          "type": "numeric",
          "unit": "W"
        },
        {
          "access": 1,
          "description": "Previous point of the active load curve drawn",
          "name": "CCASN-1",
          "property": "active_power_ph_b",
          "type": "numeric",
          "unit": "W"
        },
        {
          "access": 1,
          "description": "Average RMS voltage (phase 1)",
          "name": "UMOY1",
          "property": "average_rms_voltage_meas_period",
          "type": "numeric",
          "unit": "V"
        },
        {
          "access": 1,
          "description": "Immediate apparent power delivered",
          "name": "SINSTS",
          "property": "apparent_power",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Apparent power delivered peak",
          "name": "SMAXN",
          "property": "active_power_max",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Apparent power max. draw-off n-1",
          "name": "SMAXN-1",
          "property": "drawn_v_a_max_n1",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Message short",
          "name": "MSG1",
          "property": "message1",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Message ultra-short",
          "name": "MSG2",
          "property": "message2",
          "type": "text"
        },
        {
          "access": 1,
          "description": "PRM number",
          "name": "PRM",
          "property": "site_id",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Start mobile point 1",
          "name": "DPM1",
          "property": "start_mobile_point1",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 1",
          "name": "FPM1",
          "property": "stop_mobile_point1",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Start mobile point 2",
          "name": "DPM2",
          "property": "start_mobile_point2",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 2",
          "name": "FPM2",
          "property": "stop_mobile_point2",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Start mobile point 3",
          "name": "DPM3",
          "property": "start_mobile_point3",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 3",
          "name": "FPM3",
          "property": "stop_mobile_point3",
          "type": "numeric"
        },
        {
          "access": 1,
          "name": "RELAIS",
          "property": "relais",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Current day number supplier calendar",
          "name": "NJOURF",
          "property": "days_number_current_calendar",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Next day number supplier calendar",
          "name": "NJOURF+1",
          "property": "days_number_next_calendar",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Profile of the next supplier calendar day",
          "name": "PJOURF+1",
          "property": "days_profile_current_calendar",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Profile of the next check-in day",
          "name": "PPOINTE1",
          "property": "days_profile_next_calendar",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "ZLinky_TIC",
      "supports_ota": true,
      "vendor": "LiXee"
    },
    "endpoints": {
      "1": {
        "bindings": [
          {
            "cluster": "haElectricalMeasurement",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "seMetering",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "haMeterIdentification",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "liXeePrivate",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          }
        ],
        "clusters": {
          "input": [
            "genBasic",
            "genIdentify",
            "seMetering",
            "haElectricalMeasurement",
            "haMeterIdentification",
            "liXeePrivate"
          ],
          "output": ["genOta"]
        },
        "configured_reportings": [
          {
            "attribute": "currentSummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier1SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier2SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier3SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "rmsCurrent",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePower",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePowerPhB",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "apparentPower",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePowerMax",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          }
        ],
        "scenes": []
      },
      "242": {
        "bindings": [],
        "clusters": { "input": ["greenPower"], "output": ["greenPower"] },
        "configured_reportings": [],
        "scenes": []
      }
    },
    "friendly_name": "0x00158d0005d29aa0",
    "ieee_address": "0x00158d0005d29aa0",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "LiXee",
    "model_id": "ZLinky_TIC",
    "network_address": 32871,
    "power_source": "Mains (single phase)",
    "software_build_id": "4000-0005",
    "supported": true,
    "type": "Router"
  }
]

```

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 3:53 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/93 "2022-06-27T15:53:24Z")

</div>

Tu es sûr que c’est ces JSON ?

C’est des petits JSON, et un simple test chez toi me donne 0.1ms de temps de parsing pour ces JSON, c’est pas le bon JSON à mon avis ^^

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 4:00 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/94 "2022-06-27T16:00:01Z")

</div>

Edit je vais push car trop long pour le forum

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 4:04 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/95 "2022-06-27T16:04:29Z")

</div>

[https://pastebin.com/](https://pastebin.com/) sinon !

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 4:07 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/96 "2022-06-27T16:07:03Z")

</div>

Tiens j’ai fais une branche pur le debug

> **[Comparing GladysAssistant:master...VonOx:z2m-debug · GladysAssistant/Gladys](https://github.com/GladysAssistant/Gladys/compare/master...VonOx:Gladys:z2m-debug)**
>
> A privacy-first, open-source home assistant. Contribute to GladysAssistant/Gladys development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 4:12 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/97 "2022-06-27T16:12:56Z")

</div>

Tu peux me copier coller (sur pastebin) un exemple de gros body JSON venant de Zigbee2mqtt ?

Si c’est de la data perso sensible, tu peux aussi me l’envoyer en DM 🙂

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 4:17 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/98 "2022-06-27T16:17:46Z")

</div>

> [@Données de consommation compteur Linky](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/84):
>
> J’ai juste ajouter mon device dans les json et ajouter ce test ( pire que mieux ) it('BIG PAYLOAD', async () =\> { // PREPARE stateManagerGetStub = sinon.stub(); stateManagerGetStub.onFirstCall().returns(null); zigbee2mqttManager.gladys.stateManager.get = stateManagerGetStub; // EXECUTE await zigbee2mqttManager.handleMqttMessage('zigbee2mqtt/0x00158d0005d29aa0', `{"active\_enerfy\_out\_d01":8015,"active\_enerfy\_out\_d02":10819,"active\_enerfy\_out\_d03":4081,"active\_enerfy\_out\_…

Il est là pour le Lixee ( new state )

Sinon le device en lui même pour le discover est déjà sur github

> <https://github.com/GladysAssistant/Gladys/pull/1492#issuecomment-1082728844>
>
> This is zigbee2mqtt/bridge/devices for Lixee TIC
> 
> If mapping is based on name …and not property I'm wrong
> 
> eg: I've mapped property 'current\_summ\_delivered' but I need to use the name 'EAST' instead , right ?
> 
> \`\`\`json
> {
> "date\_code": "20220217",
> "definition": {
> "description": "Lixee ZLinky",
> "exposes": \[
> {
> "access": 1,
> "description": "Serial Number",
> "name": "ADSC",
> "property": "meter\_serial\_number",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Supplier pricing schedule name",
> "name": "NGTF",
> "property": "current\_tarif",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Current supplier price label",
> "name": "LTARF",
> "property": "current\_price",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Current tariff index number",
> "name": "NTARF",
> "property": "current\_index\_tarif",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Customer tele-information protocol version",
> "name": "VTIC",
> "property": "software\_revision",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Current date and time",
> "name": "DATE",
> "property": "current\_date",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Total active power delivered",
> "name": "EAST",
> "property": "current\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 01)",
> "name": "EASF01",
> "property": "current\_tier1\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 02)",
> "name": "EASF02",
> "property": "current\_tier2\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 03)",
> "name": "EASF03",
> "property": "current\_tier3\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 04)",
> "name": "EASF04",
> "property": "current\_tier4\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 05)",
> "name": "EASF05",
> "property": "current\_tier5\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 06)",
> "name": "EASF06",
> "property": "current\_tier6\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 07)",
> "name": "EASF07",
> "property": "current\_tier7\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 08)",
> "name": "EASF08",
> "property": "current\_tier8\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 09)",
> "name": "EASF09",
> "property": "current\_tier9\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Total provider active power delivered (index 10)",
> "name": "EASF10",
> "property": "current\_tier10\_summ\_delivered",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Active energy withdrawn Distributor (index 01)",
> "name": "EASD01",
> "property": "active\_enerfy\_out\_d01",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Active energy withdrawn Distributor (index 02)",
> "name": "EASD02",
> "property": "active\_enerfy\_out\_d02",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Active energy withdrawn Distributor (index 03)",
> "name": "EASD03",
> "property": "active\_enerfy\_out\_d03",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "Active energy withdrawn Distributor (index 04)",
> "name": "EASD04",
> "property": "active\_enerfy\_out\_d04",
> "type": "numeric",
> "unit": "kWh"
> },
> {
> "access": 1,
> "description": "RMS current",
> "name": "IRMS1",
> "property": "rms\_current",
> "type": "numeric",
> "unit": "A"
> },
> {
> "access": 1,
> "description": "RMS voltage",
> "name": "URMS1",
> "property": "rms\_voltage",
> "type": "numeric",
> "unit": "V"
> },
> {
> "access": 1,
> "description": "Apparent power of reference",
> "name": "PREF",
> "property": "available\_power",
> "type": "numeric",
> "unit": "kVA"
> },
> {
> "access": 1,
> "description": "Register of Statutes",
> "name": "STGE",
> "property": "status\_register",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Apparent power threshold",
> "name": "PCOUP",
> "property": "power\_threshold",
> "type": "numeric",
> "unit": "kVA"
> },
> {
> "access": 1,
> "description": "Current point of the active load curve drawn",
> "name": "CCASN",
> "property": "active\_power",
> "type": "numeric",
> "unit": "W"
> },
> {
> "access": 1,
> "description": "Previous point of the active load curve drawn",
> "name": "CCASN-1",
> "property": "active\_power\_ph\_b",
> "type": "numeric",
> "unit": "W"
> },
> {
> "access": 1,
> "description": "Average RMS voltage (phase 1)",
> "name": "UMOY1",
> "property": "average\_rms\_voltage\_meas\_period",
> "type": "numeric",
> "unit": "V"
> },
> {
> "access": 1,
> "description": "Immediate apparent power delivered",
> "name": "SINSTS",
> "property": "apparent\_power",
> "type": "numeric",
> "unit": "VA"
> },
> {
> "access": 1,
> "description": "Apparent power delivered peak",
> "name": "SMAXN",
> "property": "active\_power\_max",
> "type": "numeric",
> "unit": "VA"
> },
> {
> "access": 1,
> "description": "Apparent power max. draw-off n-1",
> "name": "SMAXN-1",
> "property": "drawn\_v\_a\_max\_n1",
> "type": "numeric",
> "unit": "VA"
> },
> {
> "access": 1,
> "description": "Message short",
> "name": "MSG1",
> "property": "message1",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Message ultra-short",
> "name": "MSG2",
> "property": "message2",
> "type": "text"
> },
> {
> "access": 1,
> "description": "PRM number",
> "name": "PRM",
> "property": "site\_id",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Start mobile point 1",
> "name": "DPM1",
> "property": "start\_mobile\_point1",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Stop mobile point 1",
> "name": "FPM1",
> "property": "stop\_mobile\_point1",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Start mobile point 2",
> "name": "DPM2",
> "property": "start\_mobile\_point2",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Stop mobile point 2",
> "name": "FPM2",
> "property": "stop\_mobile\_point2",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Start mobile point 3",
> "name": "DPM3",
> "property": "start\_mobile\_point3",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Stop mobile point 3",
> "name": "FPM3",
> "property": "stop\_mobile\_point3",
> "type": "numeric"
> },
> {
> "access": 1,
> "name": "RELAIS",
> "property": "relais",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Current day number supplier calendar",
> "name": "NJOURF",
> "property": "days\_number\_current\_calendar",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Next day number supplier calendar",
> "name": "NJOURF+1",
> "property": "days\_number\_next\_calendar",
> "type": "numeric"
> },
> {
> "access": 1,
> "description": "Profile of the next supplier calendar day",
> "name": "PJOURF+1",
> "property": "days\_profile\_current\_calendar",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Profile of the next check-in day",
> "name": "PPOINTE1",
> "property": "days\_profile\_next\_calendar",
> "type": "text"
> },
> {
> "access": 1,
> "description": "Link quality (signal strength)",
> "name": "linkquality",
> "property": "linkquality",
> "type": "numeric",
> "unit": "lqi",
> "value\_max": 255,
> "value\_min": 0
> }
> \],
> "model": "ZLinky\_TIC",
> "options": \[
> {
> "access": 2,
> "description": "This device does not support reporting electric measurements so it is polled instead. The default poll interval is 60 seconds, set to -1 to disable.",
> "name": "measurement\_poll\_interval",
> "property": "measurement\_poll\_interval",
> "type": "numeric",
> "value\_min": -1
> },
> {
> "access": 2,
> "description": "Counter with TIC in mode standard or historique. May require restart (default: auto)",
> "name": "linky\_mode",
> "property": "linky\_mode",
> "type": "enum",
> "values": \["auto", "historique", "standard"\]
> },
> {
> "access": 2,
> "description": "Power with single or three phase. May require restart (default: auto)",
> "name": "energy\_phase",
> "property": "energy\_phase",
> "type": "enum",
> "values": \["auto", "single\_phase", "three\_phase"\]
> },
> {
> "access": 2,
> "description": "If you produce energy back to the grid (works ONLY when linky\_mode: standard, default: auto)",
> "name": "production",
> "property": "production",
> "type": "enum",
> "values": \["auto", "true", "false"\]
> },
> {
> "access": 2,
> "description": "Overrides the automatic current tarif. This option will exclude unnecesary attributes. Open a issue to support more of them. Default: auto",
> "name": "tarif",
> "property": "tarif",
> "type": "enum",
> "values": \[
> "Historique - BASE",
> "Historique - HCHP",
> "Historique - EJP",
> "Historique - BBR",
> "Standard - Sem WE Mercredi",
> "Standard - Heure Pleine Heure Creuse",
> "auto"
> \]
> },
> {
> "access": 2,
> "description": "Number of digits after decimal point for kWh, takes into effect on next report of device.",
> "name": "kWh\_precision",
> "property": "kWh\_precision",
> "type": "numeric",
> "value\_max": 3,
> "value\_min": 0
> },
> {
> "access": 2,
> "description": "During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requieres Z2M restart. Default: 1",
> "name": "measurement\_poll\_chunk",
> "property": "measurement\_poll\_chunk",
> "type": "numeric",
> "value\_min": 1
> },
> {
> "access": 2,
> "description": "List of TIC commands to be exposed (separated by comma). Reconfigure device after change. Default: all",
> "name": "tic\_command\_whitelist",
> "property": "tic\_command\_whitelist",
> "type": "text"
> }
> \],
> "supports\_ota": true,
> "vendor": "LiXee"
> },
> "endpoints": {
> "1": {
> "bindings": \[
> {
> "cluster": "haElectricalMeasurement",
> "target": {
> "endpoint": 1,
> "ieee\_address": "0x00124b0021b95104",
> "type": "endpoint"
> }
> },
> {
> "cluster": "seMetering",
> "target": {
> "endpoint": 1,
> "ieee\_address": "0x00124b0021b95104",
> "type": "endpoint"
> }
> },
> {
> "cluster": "haMeterIdentification",
> "target": {
> "endpoint": 1,
> "ieee\_address": "0x00124b0021b95104",
> "type": "endpoint"
> }
> },
> {
> "cluster": "liXeePrivate",
> "target": {
> "endpoint": 1,
> "ieee\_address": "0x00124b0021b95104",
> "type": "endpoint"
> }
> }
> \],
> "clusters": {
> "input": \[
> "genBasic",
> "genIdentify",
> "seMetering",
> "haElectricalMeasurement",
> "haMeterIdentification",
> "liXeePrivate"
> \],
> "output": \["genOta"\]
> },
> "configured\_reportings": \[
> {
> "attribute": "currentSummDelivered",
> "cluster": "seMetering",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 100
> },
> {
> "attribute": "currentTier1SummDelivered",
> "cluster": "seMetering",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 100
> },
> {
> "attribute": "currentTier2SummDelivered",
> "cluster": "seMetering",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 100
> },
> {
> "attribute": "currentTier3SummDelivered",
> "cluster": "seMetering",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 100
> },
> {
> "attribute": "rmsCurrent",
> "cluster": "haElectricalMeasurement",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 1
> },
> {
> "attribute": "activePower",
> "cluster": "haElectricalMeasurement",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 1
> },
> {
> "attribute": "activePowerPhB",
> "cluster": "haElectricalMeasurement",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 1
> },
> {
> "attribute": "apparentPower",
> "cluster": "haElectricalMeasurement",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 1
> },
> {
> "attribute": "activePowerMax",
> "cluster": "haElectricalMeasurement",
> "maximum\_report\_interval": 900,
> "minimum\_report\_interval": 60,
> "reportable\_change": 1
> }
> \],
> "scenes": \[\]
> },
> "242": {
> "bindings": \[\],
> "clusters": { "input": \["greenPower"\], "output": \["greenPower"\] },
> "configured\_reportings": \[\],
> "scenes": \[\]
> }
> },
> "friendly\_name": "Lixee TIC",
> "ieee\_address": "0x00158d0005d29aa0",
> "interview\_completed": true,
> "interviewing": false,
> "manufacturer": "LiXee",
> "model\_id": "ZLinky\_TIC\\u0000",
> "network\_address": 32871,
> "power\_source": "Mains (single phase)",
> "software\_build\_id": "4000-0005",
> "supported": true,
> "type": "Router"
> }
> \`\`\`

```auto
{
    "date_code": "20220217",
    "definition": {
      "description": "Lixee ZLinky",
      "exposes": [
        {
          "access": 1,
          "description": "Serial Number",
          "name": "ADSC",
          "property": "meter_serial_number",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Supplier pricing schedule name",
          "name": "NGTF",
          "property": "current_tarif",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Current supplier price label",
          "name": "LTARF",
          "property": "current_price",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Current tariff index number",
          "name": "NTARF",
          "property": "current_index_tarif",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Customer tele-information protocol version",
          "name": "VTIC",
          "property": "software_revision",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Current date and time",
          "name": "DATE",
          "property": "current_date",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Total active power delivered",
          "name": "EAST",
          "property": "current_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 01)",
          "name": "EASF01",
          "property": "current_tier1_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 02)",
          "name": "EASF02",
          "property": "current_tier2_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 03)",
          "name": "EASF03",
          "property": "current_tier3_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 04)",
          "name": "EASF04",
          "property": "current_tier4_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 05)",
          "name": "EASF05",
          "property": "current_tier5_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 06)",
          "name": "EASF06",
          "property": "current_tier6_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 07)",
          "name": "EASF07",
          "property": "current_tier7_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 08)",
          "name": "EASF08",
          "property": "current_tier8_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 09)",
          "name": "EASF09",
          "property": "current_tier9_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Total provider active power delivered (index 10)",
          "name": "EASF10",
          "property": "current_tier10_summ_delivered",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 01)",
          "name": "EASD01",
          "property": "active_enerfy_out_d01",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 02)",
          "name": "EASD02",
          "property": "active_enerfy_out_d02",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 03)",
          "name": "EASD03",
          "property": "active_enerfy_out_d03",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "Active energy withdrawn Distributor (index 04)",
          "name": "EASD04",
          "property": "active_enerfy_out_d04",
          "type": "numeric",
          "unit": "kWh"
        },
        {
          "access": 1,
          "description": "RMS current",
          "name": "IRMS1",
          "property": "rms_current",
          "type": "numeric",
          "unit": "A"
        },
        {
          "access": 1,
          "description": "RMS voltage",
          "name": "URMS1",
          "property": "rms_voltage",
          "type": "numeric",
          "unit": "V"
        },
        {
          "access": 1,
          "description": "Apparent power of reference",
          "name": "PREF",
          "property": "available_power",
          "type": "numeric",
          "unit": "kVA"
        },
        {
          "access": 1,
          "description": "Register of Statutes",
          "name": "STGE",
          "property": "status_register",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Apparent power threshold",
          "name": "PCOUP",
          "property": "power_threshold",
          "type": "numeric",
          "unit": "kVA"
        },
        {
          "access": 1,
          "description": "Current point of the active load curve drawn",
          "name": "CCASN",
          "property": "active_power",
          "type": "numeric",
          "unit": "W"
        },
        {
          "access": 1,
          "description": "Previous point of the active load curve drawn",
          "name": "CCASN-1",
          "property": "active_power_ph_b",
          "type": "numeric",
          "unit": "W"
        },
        {
          "access": 1,
          "description": "Average RMS voltage (phase 1)",
          "name": "UMOY1",
          "property": "average_rms_voltage_meas_period",
          "type": "numeric",
          "unit": "V"
        },
        {
          "access": 1,
          "description": "Immediate apparent power delivered",
          "name": "SINSTS",
          "property": "apparent_power",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Apparent power delivered peak",
          "name": "SMAXN",
          "property": "active_power_max",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Apparent power max. draw-off n-1",
          "name": "SMAXN-1",
          "property": "drawn_v_a_max_n1",
          "type": "numeric",
          "unit": "VA"
        },
        {
          "access": 1,
          "description": "Message short",
          "name": "MSG1",
          "property": "message1",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Message ultra-short",
          "name": "MSG2",
          "property": "message2",
          "type": "text"
        },
        {
          "access": 1,
          "description": "PRM number",
          "name": "PRM",
          "property": "site_id",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Start mobile point 1",
          "name": "DPM1",
          "property": "start_mobile_point1",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 1",
          "name": "FPM1",
          "property": "stop_mobile_point1",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Start mobile point 2",
          "name": "DPM2",
          "property": "start_mobile_point2",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 2",
          "name": "FPM2",
          "property": "stop_mobile_point2",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Start mobile point 3",
          "name": "DPM3",
          "property": "start_mobile_point3",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Stop mobile point 3",
          "name": "FPM3",
          "property": "stop_mobile_point3",
          "type": "numeric"
        },
        {
          "access": 1,
          "name": "RELAIS",
          "property": "relais",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Current day number supplier calendar",
          "name": "NJOURF",
          "property": "days_number_current_calendar",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Next day number supplier calendar",
          "name": "NJOURF+1",
          "property": "days_number_next_calendar",
          "type": "numeric"
        },
        {
          "access": 1,
          "description": "Profile of the next supplier calendar day",
          "name": "PJOURF+1",
          "property": "days_profile_current_calendar",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Profile of the next check-in day",
          "name": "PPOINTE1",
          "property": "days_profile_next_calendar",
          "type": "text"
        },
        {
          "access": 1,
          "description": "Link quality (signal strength)",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "ZLinky_TIC",
      "options": [
        {
          "access": 2,
          "description": "This device does not support reporting electric measurements so it is polled instead. The default poll interval is 60 seconds, set to -1 to disable.",
          "name": "measurement_poll_interval",
          "property": "measurement_poll_interval",
          "type": "numeric",
          "value_min": -1
        },
        {
          "access": 2,
          "description": "Counter with TIC in mode standard or historique. May require restart (default: auto)",
          "name": "linky_mode",
          "property": "linky_mode",
          "type": "enum",
          "values": ["auto", "historique", "standard"]
        },
        {
          "access": 2,
          "description": "Power with single or three phase. May require restart (default: auto)",
          "name": "energy_phase",
          "property": "energy_phase",
          "type": "enum",
          "values": ["auto", "single_phase", "three_phase"]
        },
        {
          "access": 2,
          "description": "If you produce energy back to the grid (works ONLY when linky_mode: standard, default: auto)",
          "name": "production",
          "property": "production",
          "type": "enum",
          "values": ["auto", "true", "false"]
        },
        {
          "access": 2,
          "description": "Overrides the automatic current tarif. This option will exclude unnecesary attributes. Open a issue to support more of them. Default: auto",
          "name": "tarif",
          "property": "tarif",
          "type": "enum",
          "values": [
            "Historique - BASE",
            "Historique - HCHP",
            "Historique - EJP",
            "Historique - BBR",
            "Standard - Sem WE Mercredi",
            "Standard - Heure Pleine Heure Creuse",
            "auto"
          ]
        },
        {
          "access": 2,
          "description": "Number of digits after decimal point for kWh, takes into effect on next report of device.",
          "name": "kWh_precision",
          "property": "kWh_precision",
          "type": "numeric",
          "value_max": 3,
          "value_min": 0
        },
        {
          "access": 2,
          "description": "During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requieres Z2M restart. Default: 1",
          "name": "measurement_poll_chunk",
          "property": "measurement_poll_chunk",
          "type": "numeric",
          "value_min": 1
        },
        {
          "access": 2,
          "description": "List of TIC commands to be exposed (separated by comma). Reconfigure device after change. Default: all",
          "name": "tic_command_whitelist",
          "property": "tic_command_whitelist",
          "type": "text"
        }
      ],
      "supports_ota": true,
      "vendor": "LiXee"
    },
    "endpoints": {
      "1": {
        "bindings": [
          {
            "cluster": "haElectricalMeasurement",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "seMetering",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "haMeterIdentification",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          },
          {
            "cluster": "liXeePrivate",
            "target": {
              "endpoint": 1,
              "ieee_address": "0x00124b0021b95104",
              "type": "endpoint"
            }
          }
        ],
        "clusters": {
          "input": [
            "genBasic",
            "genIdentify",
            "seMetering",
            "haElectricalMeasurement",
            "haMeterIdentification",
            "liXeePrivate"
          ],
          "output": ["genOta"]
        },
        "configured_reportings": [
          {
            "attribute": "currentSummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier1SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier2SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "currentTier3SummDelivered",
            "cluster": "seMetering",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 100
          },
          {
            "attribute": "rmsCurrent",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePower",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePowerPhB",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "apparentPower",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          },
          {
            "attribute": "activePowerMax",
            "cluster": "haElectricalMeasurement",
            "maximum_report_interval": 900,
            "minimum_report_interval": 60,
            "reportable_change": 1
          }
        ],
        "scenes": []
      },
      "242": {
        "bindings": [],
        "clusters": { "input": ["greenPower"], "output": ["greenPower"] },
        "configured_reportings": [],
        "scenes": []
      }
    },
    "friendly_name": "Lixee TIC",
    "ieee_address": "0x00158d0005d29aa0",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "LiXee",
    "model_id": "ZLinky_TIC\u0000",
    "network_address": 32871,
    "power_source": "Mains (single phase)",
    "software_build_id": "4000-0005",
    "supported": true,
    "type": "Router"
  }

```

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Juin 27, 2022, 4:22 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/99 "2022-06-27T16:22:35Z")

</div>

Ok, dans ce cas c’est pas le JSON.parse, c’est un relativement petit JSON qui ne devrait pas poser problème.

Maintenant il faut tester ligne par ligne qu’est-ce qui prend du temps et qui bloque.

Tu peux rajouter dans le code des:

```auto
console.time('nameOfMyTimer');
// Le code ici
console.timeEnd('nameOfMyTimer');

```

(tu peux donner un nom à chaque étape)

Tu lances individuellement le test `handleMqttMessage` et tu vois ligne par ligne ce qui prend le plus de temps.

C’est fastidieux, mais bon il n’y pas vraiment d’autre méthode pour trouver des solutions !

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [Juin 27, 2022, 4:32 UTC](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061/100 "2022-06-27T16:32:56Z")

</div>

C’est pas trop violent

```auto
2022-06-27T18:32:27+0200 <log> handleMqttMessage.js:22 (Zigbee2mqttManager.handleMqttMessage) Getting config devices from Zigbee2mqtt
Devices map: 0.264ms
Event: 4.241ms
handleMqttMessage: 7.189ms
Gladys Blocked for 28.98486499786377ms, operation started here: []

```

EDIT:

Un deuxième avec le parse ( j’étais sur batterie en mode éco lors du test précedent )

```auto
2022-06-27T18:43:39+0200 <log> handleMqttMessage.js:22 (Zigbee2mqttManager.handleMqttMessage) Getting config devices from Zigbee2mqtt
JSONParse: 0.191ms
Devices map: 0.034ms
Event: 1.049ms
handleMqttMessage: 2.195ms

```

[Page précédente](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061.md?page=4)

[Page suivante](https://community.gladysassistant.com/t/donnees-de-consommation-compteur-linky/6061.md?page=6)
