Skip to content

Instantly share code, notes, and snippets.

@simlun
Created March 13, 2024 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simlun/a50cbf26900192a7a8737958503cb13d to your computer and use it in GitHub Desktop.
Save simlun/a50cbf26900192a7a8737958503cb13d to your computer and use it in GitHub Desktop.
EGLO Connect.Z Motion sensor - ZigBee2MQTT
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