Je viens de tester la procédure d’écrite ici Support new devices | Zigbee2MQTT
Du coup, j’ai crée un fichier 067696.js et j’ai mis ces éléments.
const {windowCovering, binary, commandsWindowCovering} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: [' NLJ - Garage door'],
model: ' NLJ - Garage door',
vendor: ' Legrand',
description: 'Automatically generated definition',
extend: [windowCovering({"controls":["lift","tilt"]}), binary({"name":"binary_input_1","cluster":"genBinaryInput","attribute":"presentValue","reporting":{"attribute":"presentValue","min":"MIN","max":"MAX","change":1},"valueOn":["ON",1],"valueOff":["OFF",0],"description":"binary_input_1","access":"STATE_GET","endpointName":"1"}), commandsWindowCovering()],
meta: {},
};
module.exports = definition;
Dans les paramètres, de Z2M, j’ai sélectionné le fichier 067696.js et j’ai redémarré le demon.
Je vois maintenant l’état changer.
{
"linkquality": 255,
"position": 0,
"state": "CLOSE",
"device": {
"applicationVersion": 0,
"dateCode": " \u000020240117\u0000\u0000\u0000\u0000\u0000",
"friendlyName": "0x0004740000280f20",
"hardwareVersion": 1,
"ieeeAddr": "0x0004740000280f20",
"manufacturerID": 4129,
"manufacturerName": " Legrand",
"model": " NLJ - Garage door\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"networkAddress": 56364,
"powerSource": "Mains (single phase)",
"softwareBuildID": "000b",
"stackVersion": 69,
"type": "Router",
"zclVersion": 8
}
}
{
"linkquality": 255,
"position": 100,
"state": "OPEN",
"device": {
"applicationVersion": 0,
"dateCode": " \u000020240117\u0000\u0000\u0000\u0000\u0000",
"friendlyName": "0x0004740000280f20",
"hardwareVersion": 1,
"ieeeAddr": "0x0004740000280f20",
"manufacturerID": 4129,
"manufacturerName": " Legrand",
"model": " NLJ - Garage door\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"networkAddress": 56364,
"powerSource": "Mains (single phase)",
"softwareBuildID": "000b",
"stackVersion": 69,
"type": "Router",
"zclVersion": 8
}
}
Et du coup, après, il faut que je mette un message ici dans Pull request ? GitHub - Koenkk/zigbee-herdsman-converters: Collection of device converters to be used with zigbee-herdsman