-
-
Save 9zigen/34a27dd18dc4d4cd09c7b1a3efda8df4 to your computer and use it in GitHub Desktop.
| const {binary, temperature, humidity, numeric} = require('zigbee-herdsman-converters/lib/modernExtend'); | |
| const definition = { | |
| zigbeeModel: ['Alab-CO2-1.0', 'Alab-CO2-1.1'], | |
| model: 'Alab-CO2-1.1', | |
| vendor: 'Alab', | |
| description: '[Zigbee CO2 Sensor](https://www.tindie.com/products/a_lab_technology/zigbee-co2-sensor-v2/)', | |
| extend: [ | |
| temperature(), | |
| humidity(), | |
| numeric({ | |
| name: 'co2', | |
| valueMin: 0, | |
| valueMax: 65535, | |
| valueStep: 1, | |
| cluster: 'msCO2', | |
| label: 'CO2', | |
| attribute: 'measuredValue', | |
| reporting: { min: '10_SECONDS', max: '1_HOUR', change: 50 }, | |
| description: 'Measured value', | |
| unit: 'ppm', | |
| scale: 1, | |
| access: 'STATE_GET', | |
| }), | |
| binary({ | |
| name: "calibration_nitrogen", | |
| valueOn: ['Start', 1], | |
| valueOff: ['Not started', 0], | |
| cluster: "msCO2", | |
| attribute: { ID: 0x1000, type: 0x21 }, | |
| 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: 0x21 }, | |
| 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: 0x21 }, | |
| 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; |
I've found that revision 1 seems to be the code I need... Is that right? Also, how to trigger the background calibraiton?
I've found that revision 1 seems to be the code I need... Is that right? Also, how to trigger the background calibraiton?
Hi, you right
use: https://gist.github.com/9zigen/5219085e6d06eb53bfffc3cd064e5308
Background calibration is relevant for the CO2 sensor only.
Please write your comments in the gist at the link. Thanks!
When using ZHA on HomeAssistant readout shows 435,000,000 ppm at normal CO2 levels. Highest recorded was 65,000,000,000 ppm. No way to modify or change in HA integration.
Hi,
What version of home assistant? The sensor provide data in the form of a ppm. that is, if the carbon dioxide content in the air is 600 ppm, then the same data is sent to the coordinator or other device with direct binding.
I have submitted a request at the ZHA quirk repository zigpy/zha-device-handlers#2889 @9zigen
Hey,
i just got my co2 sensor and i cant get it to work.
I am using Homeassistant with Zigbee2MQTT Version 2.6.1-1
I Implemented the external converter into the Folder and the Device is marked as supportet.
Unfortunately the CO2 measurement allways shows "NULL" (zero in german) and Z2MQTT tells me the error:
"Exception while calling from Zigbee converter: Value is not a number, got number (NAN)"
It seems to me that there is a problem with the converter but i can't solve it by myself. So i kindly ask for our support
Hello,
Is it possible to disable the led?
What is the unit of the Abc period (in zigbee2mqtt)?
Thanks.
Hello, Is it possible to disable the led? What is the unit of the Abc period (in zigbee2mqtt)? Thanks.
Hi,
The blue LED flashes only until it is connected to the network.
The first CO2 sensor data will be available after a minute of operation is approximate.
ABS is an automatic recalibration of the sensor based on the minimum sensor value during the period, by default the sensor uses a period of 7 days.
I recommend leaving it as is and not turning off this function.
I recommend turning off ABS if the sensor is used in a greenhouse where an elevated CO2 content is always maintained.
Please try leaving the sensor running for 15 minutes in a well-ventilated room, then turn on Calibration Backgroud in Z2M. if the CO2 readings remain stable for a couple more minutes, the sensor will calibrate to a CO2 value of about 400 ppm
Hello,
I meant the yellow led. It blink once every 2 to 15 seconds.
Thanks.
Hello, I meant the yellow led. It blink once every 2 to 15 seconds. Thanks.
this is a part of the sensor- IR source.
https://senseair.com/product/s8/
Hello,
i think my sensor is broken, because it still provides no measurement.
(See my comment above)
How can i get a replacement or refund?
Hello,
i think my sensor is broken, because it still provides no measurement. (See my comment above) How can i get a replacement or refund?
if you bought it on tindie just write to me via the request form with the order number. I will send a replacement.

I just received a Zigbee CO2 Sensor and followed the link to this gist. It seems to be a converter for Alab-PhSensor-1.0 not the CO2 one.