esphome / esphome/issues

CCS811 Set baseline in configuration is not used during measurement

Open
#4,170 4 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
No language data
Stars
313
Forks
40
PR merge metrics
No merged PRs in 30d

Description

### The problem

Configured baseline as mentioned in the [docs](https://esphome.io/components/sensor/ccs811.html) is not used or looks like it is not used in the deployed operation.

The start log gives the output where the baseline is correctly given. But at a measurement, another value for baseline is given in the log output. After 'startup' of the sensor/esp there is also some time of no measurement, because of the self calibration/initialisation which will be avoided if there is a set baseline (like which is mentioned in the documentation).

### Which version of ESPHome has the issue?

2023.2.0

### What type of installation are you using?

Home Assistant Add-on

### Which version of Home Assistant has the issue?

2023.01.1

### What platform are you using?

ESP32

### Board

featheresp32

### Component causing the issue

CCS811

### Example YAML snippet

```yaml
esp32:
board: featheresp32
framework:
type: arduino
version: recommended

sensor:
- platform: ccs811
id: CCSSensor
baseline: 0x56C2
eco2:
name: "$node_name eCO2 Value"
id: eco2
tvoc:
name: "$node_name Total Volatile Organic Compound"
id: tvoc
address: 0x5A
temperature: Temperature
humidity: humi
update_interval: never

- platform: tmp117
name: $node_name Temperature
update_interval: 60s
address: 0x48
id: Temperature

- platform: dht
pin: 15
model: dht11
humidity:
name: "$node_name Humidity"
internal: False
id: humi
update_interval: 60s
```

### Anything in the logs that might be useful for us?

```txt
[15:26:15][C][ccs811:152]: CCS811
[15:26:15][C][ccs811:153]: Address: 0x5A
[15:26:15][C][ccs811:154]: Update Interval: never
[15:26:15][C][ccs811:155]: CO2 Sensor 'esp32-02 eCO2 Value'
[15:26:15][C][ccs811:155]: Device Class: 'carbon_dioxide'
[15:26:15][C][ccs811:155]: State Class: 'measurement'
[15:26:15][C][ccs811:155]: Unit of Measurement: 'ppm'
[15:26:15][C][ccs811:155]: Accuracy Decimals: 0
[15:26:15][C][ccs811:155]: Icon: 'mdi:molecule-co2'
[15:26:15][C][ccs811:156]: TVOC Sensor 'esp32-02 Total Volatile Organic Compound'
[15:26:15][C][ccs811:156]: Device Class: 'volatile_organic_compounds'
[15:26:15][C][ccs811:156]: State Class: 'measurement'
[15:26:15][C][ccs811:156]: Unit of Measurement: 'ppb'
[15:26:15][C][ccs811:156]: Accuracy Decimals: 0
[15:26:15][C][ccs811:156]: Icon: 'mdi:radiator'
[15:26:15][C][ccs811:159]: Baseline: 56C2

[15:29:10][D][ccs811:114]: Got co2=1521 ppm, tvoc=186 ppb, baseline=0x81BB
[15:29:10][D][sensor:127]: 'esp32-02 eCO2 Value': Sending state 1521.00000 ppm with 0 decimals of accuracy
[15:29:10][D][sensor:127]: 'esp32-02 Total Volatile Organic Compound': Sending state 186.00000 ppb with 0 decimals of accuracy

after restart:

[15:39:42][D][ccs811:114]: Got co2=400 ppm, tvoc=0 ppb, baseline=0x6ABB
[15:39:42][D][sensor:127]: 'esp32-02 eCO2 Value': Sending state 400.00000 ppm with 0 decimals of accuracy
[15:39:42][D][sensor:127]: 'esp32-02 Total Volatile Organic Compound': Sending state 0.00000 ppb with 0 decimals of accuracy
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.