@Pulpy et @Carthage merci pour votre retour.
Effectivement je n’ai rien mis dans exposes
car je ne savais pas encore quoi mettre.
Je pensais que grâce au fz.tuya_data_point_dump
et au tz.tuya_data_point_test
, j’allais récupérer des logs en appairant à nouveau le module et que dans ces logs j’aurais récupéré les data points qui m’auraient servis à compléter ce champs exposes
et à ajouter la config des data points dans les fichiers fromZigbee.js
et toZigbee.js
.
Si je vous comprends bien, vous me conseillez d’utiliser les converters du module « similaire » et de reprendre également son exposes
. Je trouve ça bizarre d’utiliser le converter fz.matsee_garage_door_opener
alors que mon vendor est Loratap au lieu de Matsee, mais j’ai essayé quand même en modifiant seulement fingerprint.manufacturerName
, model
, whiteLabel.vendor
et whiteLabel.model
:
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require("zigbee-herdsman-converters/lib/tuya");
const definition = {
// Since a lot of Tuya devices use the same modelID, but use different data points
// it's usually necessary to provide a fingerprint instead of a zigbeeModel
fingerprint: [
{
// The model ID from: Device with modelID 'TS0601' is not supported
// You may need to add \u0000 at the end of the name in some cases
modelID: 'TS0601',
// The manufacturer name from: Device with modelID 'TS0601' is not supported.
manufacturerName: '_TZE200_wfxuhoea'
},
],
model: 'GDC311ZBQ1',
vendor: 'Tuya',
description: 'Garage door opener',
fromZigbee: [fz.matsee_garage_door_opener, fz.ignore_basic_report, fz.tuya_data_point_dump],
toZigbee: [tz.matsee_garage_door_opener, tz.tuya_data_point_test],
// onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
whiteLabel: [{vendor: 'Loratap', model: 'GDC311ZBQ1'}],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
},
exposes: [exposes.binary('trigger', ea.STATE_SET, true, false).withDescription('Trigger the door movement'),
e.action(), exposes.binary('garage_door_contact', ea.STATE, true, false)],
};
module.exports = definition;
Ensuite j’ai redémarré l’intégration Zigbee2MQTT. Puis j’ai reset et appairé à nouveau le module.
Bonne nouvelle, maintenant, dans l’onglet Etat
du module, j’ai plus de données. Par contre tout est à null.
{
"action": null,
"garage_door_contact": null,
"linkquality": 220,
"trigger": null
}
Voici mes logs qui suivent l’apparairage avec la config ci-dessus (désolé il y a aussi des logs de 2 autres modules lave vaisselle et lave ligne) :
Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"j8h41-2","value":true}'
Info Zigbee: allowing new devices to join.
Info MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"j8h41-2"}'
Warning Device '0xa4c138f12c3108ac' left the network
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xa4c138f12c3108ac","ieee_address":"0xa4c138f12c3108ac"},"type":"device_leave"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0xa4c138f12c3108ac"},"type":"device_removed"}'
Info Device '0xa4c138f12c3108ac' joined
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xa4c138f12c3108ac","ieee_address":"0xa4c138f12c3108ac"},"type":"device_joined"}'
Info Configuring '0xa4c138f12c3108ac'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0xa4c138f12c3108ac"},"type":"device_connected"}'
Info MQTT publish: topic 'homeassistant/switch/0xa4c138f12c3108ac/switch_trigger/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"command_topic":"zigbee2mqtt/0xa4c138f12c3108ac/set/trigger","device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac trigger","payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_switch_trigger_zigbee2mqtt","value_template":"{% if value_json.trigger %} true {% else %} false {% endif %}"}'
Info MQTT publish: topic 'homeassistant/sensor/0xa4c138f12c3108ac/action/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac action","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
Info MQTT publish: topic 'homeassistant/binary_sensor/0xa4c138f12c3108ac/garage_door_contact/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac garage door contact","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_garage_door_contact_zigbee2mqtt","value_template":"{{ value_json.garage_door_contact }}"}'
Info MQTT publish: topic 'homeassistant/sensor/0xa4c138f12c3108ac/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Info Starting interview of '0xa4c138f12c3108ac'
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xa4c138f12c3108ac","ieee_address":"0xa4c138f12c3108ac","status":"started"},"type":"device_interview"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0xa4c138f12c3108ac"},"type":"pairing"}'
Debug Received MQTT message on 'homeassistant/switch/0xa4c138f12c3108ac/switch_trigger/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"command_topic":"zigbee2mqtt/0xa4c138f12c3108ac/set/trigger","device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac trigger","payload_off":"false","payload_on":"true","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_switch_trigger_zigbee2mqtt","value_template":"{% if value_json.trigger %} true {% else %} false {% endif %}"}'
Debug Received MQTT message on 'homeassistant/sensor/0xa4c138f12c3108ac/action/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac action","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
Debug Received MQTT message on 'homeassistant/binary_sensor/0xa4c138f12c3108ac/garage_door_contact/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac garage door contact","payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_garage_door_contact_zigbee2mqtt","value_template":"{{ value_json.garage_door_contact }}"}'
Debug Received MQTT message on 'homeassistant/sensor/0xa4c138f12c3108ac/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c138f12c3108ac"],"manufacturer":"Tuya","model":"Garage door opener (GDC311ZBQ1)","name":"0xa4c138f12c3108ac"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0xa4c138f12c3108ac","name":"0xa4c138f12c3108ac linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0xa4c138f12c3108ac","unique_id":"0xa4c138f12c3108ac_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
Info Successfully configured '0xa4c138f12c3108ac'
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'readResponse', cluster 'genBasic', data '{"stackVersion":0}' from endpoint 1 with groupID 0
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'readResponse', cluster 'genBasic', data '{"dateCode":""}' from endpoint 1 with groupID 0
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
Info Successfully interviewed '0xa4c138f12c3108ac', device has successfully been paired
Info Device '0xa4c138f12c3108ac' is supported, identified as: Tuya Garage door opener (GDC311ZBQ1)
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Garage door opener","exposes":[{"access":3,"description":"Trigger the door movement","name":"trigger","property":"trigger","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Triggered action (e.g. a button click)","name":"action","property":"action","type":"enum"},{"access":1,"name":"garage_door_contact","property":"garage_door_contact","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"GDC311ZBQ1","options":[],"supports_ota":false,"vendor":"Tuya"},"friendly_name":"0xa4c138f12c3108ac","ieee_address":"0xa4c138f12c3108ac","status":"successful","supported":true},"type":"device_interview"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Garage door opener","friendly_name":"0xa4c138f12c3108ac","model":"GDC311ZBQ1","supported":true,"vendor":"Tuya"},"type":"pairing"}'
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'read', cluster 'genTime', data '["localTime"]' from endpoint 1 with groupID 0
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'attributeReport', cluster 'genBasic', data '{"65506":54,"65508":0,"appVersion":70}' from endpoint 1 with groupID 0
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'attributeReport', cluster 'genBasic', data '{"65503":"\r!�)f\u000e!�)\u0012"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'lave_linge_buanderie', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":234}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_linge_buanderie', payload '{"current":0,"energy":0.58,"linkquality":144,"power":0,"power_outage_memory":"restore","state":"ON","voltage":234}'
Debug Received Zigbee message from 'lave_vaisselle_cuisine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":234}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_vaisselle_cuisine', payload '{"current":0,"energy":1.03,"linkquality":120,"power":0,"power_outage_memory":null,"state":"ON","voltage":234}'
Debug Received Zigbee message from 'lave_linge_buanderie', type 'attributeReport', cluster 'genBasic', data '{"65506":48,"65508":0,"appVersion":68}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'lave_linge_buanderie', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_linge_buanderie', payload '{"current":0,"energy":0.58,"linkquality":148,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Debug Received Zigbee message from 'lave_vaisselle_cuisine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_vaisselle_cuisine', payload '{"current":0,"energy":1.03,"linkquality":120,"power":0,"power_outage_memory":null,"state":"ON","voltage":235}'
Debug Received Zigbee message from 'lave_linge_buanderie', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":[0,58]}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_linge_buanderie', payload '{"current":0,"energy":0.58,"linkquality":144,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Debug Received Zigbee message from 'lave_vaisselle_cuisine', type 'attributeReport', cluster 'genBasic', data '{"65506":48,"65508":0,"appVersion":68}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'lave_vaisselle_cuisine', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":[0,103]}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_vaisselle_cuisine', payload '{"current":0,"energy":1.03,"linkquality":116,"power":0,"power_outage_memory":null,"state":"ON","voltage":235}'
Debug Received Zigbee message from 'lave_linge_buanderie', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_linge_buanderie', payload '{"current":0,"energy":0.58,"linkquality":148,"power":0,"power_outage_memory":"restore","state":"ON","voltage":235}'
Debug Received Zigbee message from 'lave_vaisselle_cuisine', type 'readResponse', cluster 'haElectricalMeasurement', data '{"activePower":0,"rmsCurrent":0,"rmsVoltage":235}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/lave_vaisselle_cuisine', payload '{"current":0,"energy":1.03,"linkquality":116,"power":0,"power_outage_memory":null,"state":"ON","voltage":235}'
Debug Received Zigbee message from '0xa4c138f12c3108ac', type 'attributeReport', cluster 'genBasic', data '{"65506":54,"65508":0,"appVersion":70}' from endpoint 1 with groupID 0
Désolé si j’ai du mal à comprendre, mais je débute dans tout ça et j’avoue que ça me perd un peu. Mais j’ai envie d’y arriver quand même.
Je précise que j’utilise l’intégration Zigbee2MQTT, il n’y a pas besoin d’utiliser la version Edge pour avoir plus de logs ?
Et sinon, voici ce que j’ai dans les détails de l’appareil côté Home Assistant :
Bonne nouvelle, en cliquant sur Trigger
la porte s’ouvre et se ferme ! Par contre l’état de la porte ne remonte pas via les 2 capteurs 
Savez-vous pourquoi ?
Edit : Quelques minutes plus tard, je suis retourné dans l’onglet Etat
du module sur Zigbee2MQTT et je retrouve seulement "linkquality": 212
. Bizarre que ça disparaisse …
Merci