Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.88k stars 1.66k forks source link

[New device support]: Konke Q01D Switch 1 gang #19285

Closed sj8023ld closed 11 months ago

sj8023ld commented 11 months ago

Link

https://www.ikonke.com/parameter/lp_q01w/

Database entry

{"id":3,"type":"Router","ieeeAddr":"0x9035eafffee4f0af","nwkAddr":17861,"manufId":4712,"manufName":"Konke","powerSource":"Mains (single phase)","modelId":"3AFE292000068621","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":259,"inClusterList":[0,3,4,5,6,769,2821,64704],"outClusterList":[25,64704],"clusters":{"genBasic":{"attributes":{"powerSource":1,"zclVersion":3,"appVersion":41,"stackVersion":1,"hwVersion":32,"dateCode":"20210929"}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b0022ab785a","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":41,"stackVersion":1,"hwVersion":32,"dateCode":"20210929","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-1274965091},"lastSeen":1697197363499,"defaultSendRequestWhen":"immediate"}

Comments

I add this device to my z2m,already test

External converter

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 definition = {
    zigbeeModel: ['3AFE292000068621'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'KK-LP-Q01D', // Vendor model number, look on the device for a model number
    vendor: 'KONKE', // Vendor of the device (only used for documentation and startup logging)
    description: 'KONKE SWITCH 1 GANG', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
        extend: extend.switch(),
        exposes: [e.switch().withEndpoint('l1')],
        endpoint: (device) => {
            return {l1: 1};
        },
        meta: {multiEndpoint: true},
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint1 = device.getEndpoint(1);
            await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
        },
            };
module.exports = definition;

Supported color modes

No response

Color temperature range

No response

Koenkk commented 11 months ago

Added, thanks!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)