© 2015-2023 mister3D.fr - Signaler un bug - Mentions légales - Contact

Articles - Domotique - Ajouter le support des ampoules Enki à Zigbee2MQTT

Pour mettre l’ampoule en mode "Jumelage", il faut l'allumé 6 fois d'affilé, une fois fait, elle devrais effectuer une transition rapide de couleur RVB.

Entré dans le répertoire de zigbee2mqtt
cd /opt/zigbee2mqtt/


Changer le "friendly_name" dans le fichier :
nano data/configuration.yaml


Ensuite faire :
nano node_modules/zigbee-herdsman-converters/devices.js


Dans la constante devices, ajouter :
    // Adeo Enki Lampe
{
zigbeeModel: ['LXEK-1', 'LXEK-4'],
model: '9CZA-A806ST',
vendor: 'Lexman',
description: 'Lexman LED RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
fromZigbee: [
fz.brightness, fz.color_colortemp, fz.on_off, fz.xiaomi_bulb_interval,
],
},

Si votre amoule affiche une message comme quoi le materiel n'est pas reconnu, recoper le model et ajouter le dans le code ci-dessus.

Et ne pas oublier de relancer le service pour prendre en compte les modifications :
sudo systemctl restart zigbee2mqtt


Et pour terminer, un exemple d'usage basique et partiel du contrôle d'une ampoule à importer dans Node-RED :
[
{
"id":"8c3d56de.eb94a",
"type":"tab",
"label":"Flow 2",
"disabled":false,
"info":""
},
{
"id":"e3bc5860.d6aed",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"On",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"on",
"payloadType":"str",
"x":410,
"y":140,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"d194043c.55146",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Off",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"off",
"payloadType":"str",
"x":410,
"y":180,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"1ec9b59c.9d10ea",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Brightness foncé",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"brightness\":55}",
"payloadType":"json",
"x":380,
"y":220,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"eb5a3d7d.d82f48",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Brightness a fond",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"brightness\":255}",
"payloadType":"json",
"x":370,
"y":260,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"220a0c48.6d188c",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Couleur Rouge",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"color\":{\"r\":255,\"g\":0,\"b\":0}}",
"payloadType":"json",
"x":380,
"y":300,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"fe1e79ab.6184e",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Couleur Vert",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"color\":{\"r\":0,\"g\":255,\"b\":0}}",
"payloadType":"json",
"x":390,
"y":340,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"7fefcbc6.06ca2c",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Couleur Bleu",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"color\":{\"r\":0,\"g\":0,\"b\":255}}",
"payloadType":"json",
"x":390,
"y":380,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"aa6c518e.c2d6",
"type":"inject",
"z":"8c3d56de.eb94a",
"name":"Gradiateur",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"",
"crontab":"",
"once":false,
"onceDelay":0.1,
"topic":"",
"payload":"{\"color\":{\"r\":0,\"g\":0,\"b\":255},\"transition\":5}",
"payloadType":"json",
"x":400,
"y":420,
"wires":[
[
"6baf9e5a.2754f8"
]
]
},
{
"id":"6baf9e5a.2754f8",
"type":"mqtt out",
"z":"8c3d56de.eb94a",
"name":"",
"topic":"zigbee2mqtt/Cuisine01/set",
"qos":"0",
"retain":"",
"broker":"bdf3e252.fcf36",
"x":880,
"y":260,
"wires":[

]
},
{
"id":"bdf3e252.fcf36",
"type":"mqtt-broker",
"name":"",
"broker":"localhost",
"port":"1883",
"clientid":"",
"usetls":false,
"compatmode":false,
"keepalive":"60",
"cleansession":true,
"birthTopic":"",
"birthQos":"0",
"birthPayload":"",
"closeTopic":"",
"closeQos":"0",
"closePayload":"",
"willTopic":"",
"willQos":"0",
"willPayload":""
}
]


Par Mister3D le 19/12/2020, vu 1584 fois
Aucun commentaire
Vous devez vous connecter pour poster un commentaire.