How to use the zigbee-herdsman.Zcl function in zigbee-herdsman

To help you get started, we’ve selected a few zigbee-herdsman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Koenkk / zigbee2mqtt / lib / extension / deviceReport.js View on Github external
{type: 'commandHueNotification', data: {button: 2}},
                {type: 'commandHueNotification', data: {button: 3}},
            ],
            genLevelCtrl: [
                {type: 'commandStep', data: {}},
                {type: 'commandStepWithOnOff', data: {}},
                {type: 'commandStop', data: {}},
                {type: 'commandMoveWithOnOff', data: {}},
                {type: 'commandStopWithOnOff', data: {}},
                {type: 'commandMove', data: {}},
            ],
        },
        // Read the following attributes
        read: {cluster: 'genLevelCtrl', attributes: ['currentLevel']},
        // When the bound devices/members of group have the following manufacturerID
        manufacturerID: ZigbeeHerdsman.Zcl.ManufacturerCode.Philips,
    },
];

class DeviceReport extends BaseExtension {
    constructor(zigbee, mqtt, state, publishEntityState) {
        super(zigbee, mqtt, state, publishEntityState);
        this.configuring = new Set();
        this.failed = new Set();
        this.pollDebouncers = {};
    }

    async setupReporting(device) {
        if (this.configuring.has(device.ieeeAddr) || this.failed.has(device.ieeeAddr)) return;
        this.configuring.add(device.ieeeAddr);

        try {

zigbee-herdsman

An open source ZigBee gateway solution with node.js.

MIT
Latest version published 3 days ago

Package Health Score

81 / 100
Full package analysis