Created
March 13, 2024 19:15
-
-
Save simlun/a50cbf26900192a7a8737958503cb13d to your computer and use it in GitHub Desktop.
EGLO Connect.Z Motion sensor - ZigBee2MQTT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 utils = require('zigbee-herdsman-converters/lib/utils'); | |
const e = exposes.presets; | |
const ea = exposes.access; | |
const fzLocal = { | |
occupancy: { | |
cluster: 'genOnOff', | |
type: ['commandOn', 'commandOff'], | |
convert: (model, msg, publish, options, meta) => { | |
const payload = {occupancy: msg.type === 'commandOn'}; | |
return payload; | |
}, | |
}, | |
ignored1: { | |
cluster: 'genLevelCtrl', | |
type: ['commandMoveToLevel'], | |
convert: (model, msg, publish, options, meta) => { | |
return null; | |
}, | |
}, | |
ignored2: { | |
cluster: 'lightingColorCtrl', | |
type: ['commandMoveToColorTemp'], | |
convert: (model, msg, publish, options, meta) => { | |
return null; | |
}, | |
}, | |
}; | |
const definition = { | |
fingerprint: [{modelID: 'EPIR_Zm', manufacturerName: 'AwoX'}], | |
zigbeeModel: ['EPIR_Zm'], // The model ID from: Device with modelID 'lumi.sens' is not supported. | |
model: '99106', // Vendor model number, look on the device for a model number | |
vendor: 'AwoX', // Vendor of the device (only used for documentation and startup logging) | |
whiteLabel: [{vendor: 'EGLO', model: '99106'}], | |
description: 'EGLO Connect.Z Motion sensor', // Description of the device, copy from vendor site. (only used for documentation and startup logging) | |
fromZigbee: [fzLocal.occupancy, fzLocal.ignored1, fzLocal.ignored2], | |
toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches). | |
exposes: [e.battery(), e.occupancy()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend | |
}; | |
module.exports = definition; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment