Skip to content

Instantly share code, notes, and snippets.

@9zigen
Last active January 12, 2026 09:53
Show Gist options
  • Select an option

  • Save 9zigen/5feae48391a5bdb952acc22f4326fc1c to your computer and use it in GitHub Desktop.

Select an option

Save 9zigen/5feae48391a5bdb952acc22f4326fc1c to your computer and use it in GitHub Desktop.
alab-co2-sensor-v1.2
const {binary, temperature, humidity, co2, numeric} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['Alab-CO2-1.2'],
model: 'Alab-CO2',
vendor: 'Alab',
description: '[Zigbee CO2 Sensor](https://www.tindie.com/products/a_lab_technology/zigbee-co2-sensor-v2/)',
extend: [
temperature(),
humidity(),
co2(),
binary({
name: "calibration_nitrogen",
valueOn: ['Start', 1],
valueOff: ['Not started', 0],
cluster: "msCO2",
attribute: { ID: 0x1000, type: 0x10 },
description: 'Perform nitrogen calibration. The device must be in a pure nitrogen atmosphere.',
}),
binary({
name: "calibration_background",
valueOn: ['Start', 1],
valueOff: ['Not started', 0],
cluster: "msCO2",
attribute: { ID: 0x1001, type: 0x10 },
description: 'Perform background calibration. For best results, the device should be placed in fresh air for 3-5 minutes.',
}),
binary({
name: "abc",
valueOn: ['Active', 1],
valueOff: ['Disabled', 0],
cluster: "msCO2",
attribute: { ID: 0x1002, type: 0x10 },
description: 'Perform background calibration. For best results, the device should be placed in fresh air for 3-5 minutes.',
}),
numeric({
name: "abc_period",
valueMin: 0,
valueMax: 65535,
valueStep: 1,
cluster: "msCO2",
attribute: { ID: 0x1003, type: 0x21 },
description: 'Perform background calibration. For best results, the device should be placed in fresh air for 3-5 minutes.',
}),
numeric({
name: "altitude",
valueMin: 0,
valueMax: 3000,
valueStep: 1,
cluster: "msCO2",
attribute: { ID: 0x1009, type: 0x21 },
description: 'SCD4X height above sea level. Valid input values are between 0–3000m.',
}),
numeric({
name: "pressure",
valueMin: 70000,
valueMax: 120000,
valueStep: 1,
cluster: "msCO2",
attribute: { ID: 0x1010, type: 0x23 },
description: 'SCD4X sensor only! The default value is 101300 Pa. Valid input values are between 70000 – 120000 Pa. Overrides any pressure compensation based on a previously set sensor altitude.',
}),
binary({
name: "factory_reset",
valueOn: ['Start', 1],
valueOff: ['Not started', 0],
cluster: "msCO2",
attribute: { ID: 0x1011, type: 0x10 },
description: 'Reset SCD4X sensor!',
}),
],
meta: {},
};
module.exports = definition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment