API Documentation
SEN66
Sen66Device
The class Sen66DeviceBase implements the low level interface of the sensor. The class Sen66Device extends the Sen66DeviceBase. It provides additional functions to ease the use of the sensor.
- class sensirion_i2c_sen66.device.Sen66DeviceBase(channel)[source]
Low level API implementation of SEN66
- property channel
- start_continuous_measurement()[source]
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command “Get Data Ready” to check when the results are ready to read. This command is only available in idle mode. If the device is already in any measure mode, this command has no effect.
- stop_measurement()[source]
Stops the measurement and returns to idle mode. After sending this command, wait at least 1000 ms before starting a new measurement. If the device is already in idle mode, this command has no effect.
- get_data_ready()[source]
This command can be used to check if new measurement results are ready to read. The data ready flag is automatically reset after reading the measurement values.
- Return padding:
Padding byte, always 0x00.
- Return data_ready:
True (0x01) if data is ready, False (0x00) if not. When no measurement is running, False will be returned.
- read_measured_values_as_integers()[source]
Returns the measured values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16, 0x7FFF for int16).
- Return mass_concentration_pm1p0:
Value is scaled with factor 10: PM1.0 [µg/m³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return mass_concentration_pm2p5:
Value is scaled with factor 10: PM2.5 [µg/m³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return mass_concentration_pm4p0:
Value is scaled with factor 10: PM4.0 [µg/m³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return mass_concentration_pm10p0:
Value is scaled with factor 10: PM10.0 [µg/m³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return ambient_humidity:
Value is scaled with factor 100: RH [%] = value / 100 Note: If this value is unknown, 0x7FFF is returned.
- Return ambient_temperature:
Value is scaled with factor 200: T [°C] = value / 200 Note: If this value is unknown, 0x7FFF is returned.
- Return voc_index:
Value is scaled with factor 10: VOC Index = value / 10 Note: If this value is unknown, 0x7FFF is returned.
- Return nox_index:
Value is scaled with factor 10: NOx Index = value / 10 Note: If this value is unknown, 0x7FFF is returned. During the first 10..11 seconds after power-on or device reset, this value will be 0x7FFF as well.
- Return co2:
CO₂ concentration [ppm] Note: If this value is unknown, 0xFFFF is returned. During the first 5..6 seconds after power-on or device reset, this value will be 0xFFFF as well.
- read_number_concentration_values_as_integers()[source]
Returns the measured number concentration values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16).
- Return number_concentration_pm0p5:
Value is scaled with factor 10: PM0.5 [particles/cm³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return number_concentration_pm1p0:
Value is scaled with factor 10: PM1.0 [particles/cm³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return number_concentration_pm2p5:
Value is scaled with factor 10: PM2.5 [particles/cm³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return number_concentration_pm4p0:
Value is scaled with factor 10: PM4.0 [particles/cm³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- Return number_concentration_pm10p0:
Value is scaled with factor 10: PM10.0 [particles/cm³] = value / 10 Note: If this value is unknown, 0xFFFF is returned.
- read_measured_raw_values()[source]
Returns the measured raw values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16, 0x7FFF for int16).
- Return raw_humidity:
Value is scaled with factor 100: RH [%] = value / 100 Note: If this value is unknown, 0x7FFF is returned.
- Return raw_temperature:
Value is scaled with factor 200: T [°C] = value / 200 Note: If this value is unknown, 0x7FFF is returned.
- Return raw_voc:
Raw measured VOC ticks without scale factor. Note: If this value is unknown, 0xFFFF is returned.
- Return raw_nox:
Raw measured NOx ticks without scale factor. Note: If this value is unknown, 0xFFFF is returned. During the first 10..11 seconds after power-on or device reset, this value will be 0xFFFF as well.
- Return raw_co2:
Not interpolated CO₂ concentration [ppm] updated every five seconds. Note: If this value is unknown, 0xFFFF is returned. During the first 5..6 seconds after power-on or device reset, this value will be 0xFFFF as well.
- start_fan_cleaning()[source]
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Note
This command is only available in idle mode.
- set_temperature_offset_parameters(offset, slope, time_constant, slot)[source]
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature. The compensated ambient temperature is calculated as follows: T_Ambient_Compensated = T_Ambient + (slope * T_Ambient) + offset Where slope and offset are the values set with this command, smoothed with the specified time constant. All temperatures (T_Ambient_Compensated, T_Ambient and offset) are represented in °C. There are 5 temperature offset slots available that all contribute additively to T_Ambient_Compensated. The default values for the temperature offset parameters are all zero, meaning that T_Ambient_Compensated is equal to T_Ambient by default. The parameters can be changed in any state of the device, i.e. both in idle mode and in measure mode.
- Parameters:
offset – Constant temperature offset scaled with factor 200 (T [°C] = value / 200).
slope – Normalized temperature offset slope scaled with factor 10000 (applied factor = value / 10000).
time_constant – The time constant determines how fast the new slope and offset will be applied. After the specified value in seconds, 63% of the new slope and offset are applied. A time constant of zero means the new values will be applied immediately (within the next measure interval of 1 second).
slot – The temperature offset slot to be modified. Valid values are 0 .. 4. If the value is outside this range, the parameters will not be applied.
Note
This configuration is volatile, i.e. the parameters will be reverted to their default value of zero after a device reset.
- Example:
sensor.set_temperature_offset_parameters(1, 10, 1, 0)
- set_voc_algorithm_tuning_parameters(index_offset, learning_time_offset_hours, learning_time_gain_hours, gating_max_duration_minutes, std_initial, gain_factor)[source]
Sets the parameters to customize the VOC algorithm. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- Parameters:
index_offset – VOC index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 100.
learning_time_offset_hours – Time constant to estimate the VOC algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
learning_time_gain_hours – Time constant to estimate the VOC algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
gating_max_duration_minutes – Maximum duration of gating in minutes (freeze of estimator during high VOC index signal). Set to zero to disable the gating. Allowed values are in range 0..3000. The default value is 180 minutes
std_initial – Initial estimate for standard deviation. Lower value boosts events during initial learning period, but may result in larger device-to-device variations. Allowed values are in range 10..5000. The default value is 50.
gain_factor – Gain factor to amplify or to attenuate the VOC index output. Allowed values are in range 1..1000. The default value is 230.
Note
This command is available only in idle mode. In measure mode, this command has no effect. In addition, it has no effect if at least one parameter is outside the specified range.
- Example:
sensor.set_voc_algorithm_tuning_parameters(100, 12, 12, 180, 50, 230)
- get_voc_algorithm_tuning_parameters()[source]
Gets the parameters to customize the VOC algorithm.
- Return index_offset:
VOC index representing typical (average) conditions.
- Return learning_time_offset_hours:
Time constant to estimate the VOC algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time.
- Return learning_time_gain_hours:
Time constant to estimate the VOC algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time.
- Return gating_max_duration_minutes:
Maximum duration of gating in minutes (freeze of estimator during high VOC index signal). Zero disables the gating.
- Return std_initial:
Initial estimate for standard deviation. Lower value boosts events during initial learning period, but may result in larger device-to-device variations.
- Return gain_factor:
Gain factor to amplify or to attenuate the VOC index output.
Note
This command is only available in idle mode.
- set_nox_algorithm_tuning_parameters(index_offset, learning_time_offset_hours, learning_time_gain_hours, gating_max_duration_minutes, std_initial, gain_factor)[source]
Sets the parameters to customize the NOx algorithm. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- Parameters:
index_offset – NOx index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 1.
learning_time_offset_hours – Time constant to estimate the NOx algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
learning_time_gain_hours – The time constant to estimate the NOx algorithm gain from the history has no impact for NOx. This parameter is still in place for consistency reasons with the VOC tuning parameters command. This parameter must always be set to 12 hours.
gating_max_duration_minutes – Maximum duration of gating in minutes (freeze of estimator during high NOx index signal). Set to zero to disable the gating. Allowed values are in range 0..3000. The default value is 720 minutes.
std_initial – The initial estimate for standard deviation parameter has no impact for NOx. This parameter is still in place for consistency reasons with the VOC tuning parameters command. This parameter must always be set to 50.
gain_factor – Gain factor to amplify or to attenuate the NOx index output. Allowed values are in range 1..1000. The default value is 230.
Note
This command is available only in idle mode. In measure mode, this command has no effect. In addition, it has no effect if at least one parameter is outside the specified range.
- Example:
sensor.set_nox_algorithm_tuning_parameters(1, 12, 12, 720, 50, 230)
- get_nox_algorithm_tuning_parameters()[source]
Gets the parameters to customize the NOx algorithm.
- Return index_offset:
NOx index representing typical (average) conditions.
- Return learning_time_offset_hours:
Time constant to estimate the NOx algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time.
- Return learning_time_gain_hours:
The time constant to estimate the NOx algorithm gain from the history has no impact for NOx. This parameter is still in place for consistency reasons with the VOC tuning parameters command.
- Return gating_max_duration_minutes:
Maximum duration of gating in minutes (freeze of estimator during high NOx index signal). Zero disables the gating.
- Return std_initial:
The initial estimate for standard deviation has no impact for NOx. This parameter is still in place for consistency reasons with the VOC tuning parameters command.
- Return gain_factor:
Gain factor to amplify or to attenuate the NOx index output.
Note
This command is available only in idle mode.
- set_temperature_acceleration_parameters(k, p, t1, t2)[source]
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- Parameters:
k – Filter constant K scaled with factor 10 (K = value / 10).
p – Filter constant P scaled with factor 10 (P = value / 10).
t1 – Time constant T1 scaled with factor 10 (T1 [s] = value / 10).
t2 – Time constant T2 scaled with factor 10 (T2 [s] = value / 10).
Note
The command is only available in idle mode.
- Example:
sensor.set_temperature_acceleration_parameters(1, 1, 1, 1)
- set_voc_algorithm_state(state)[source]
Sets the VOC algorithm state previously received with “Get VOC Algorithm State” command. Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
- Parameters:
state – VOC algorithm state to restore.
Note
This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measure mode, this command has no effect.
- get_voc_algorithm_state()[source]
Gets the current VOC algorithm state. Allows to backup and restore the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset or a power cycle can be executed.
- Return state:
Current VOC algorithm state.
Note
This command can be used either in measure mode or in idle mode (which will then return the state at the time when the measurement was stopped). In measure mode, the state can be read each measure interval to always have the latest state available, even in case of a sudden power loss.
- perform_forced_co2_recalibration(target_co2_concentration)[source]
Execute the forced recalibration (FRC) of the CO₂. See the datasheet of the SCD4x sensor for details how the forced recalibration shall be used.
- Parameters:
target_co2_concentration – Target CO₂ concentration [ppm] of the test setup.
- Return correction:
Correction value as received from the SCD [ppm CO₂]. FRC correction [ppm CO₂] is calculated as follows: FRC = return_value - 0x8000 If the recalibration has failed this returned value is 0xFFFF.
Note
After power-on wait at least 1000 ms and after stopping a measurement 600 ms before sending this command. This command is not available in measure mode. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed.
- set_co2_sensor_automatic_self_calibration(status)[source]
Sets the status of the CO₂ sensor automatic self-calibration (ASC). The CO₂ sensor supports automatic self calibration (ASC) for long-term stability of the CO₂ output. This feature can be enabled or disabled. By default it is enabled. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- Parameters:
status – Set to true (0x0001) to enable or false (0x0000) to disable the automatic CO₂ measurement self calibration feature. High byte of uint16 is padding and always 0x00.
Note
This command is only available in idle mode.
- Example:
sensor.set_co2_sensor_automatic_self_calibration(0)
- get_co2_sensor_automatic_self_calibration()[source]
The CO₂ sensor supports automatic self calibration (ASC) for long-term stability of the CO₂ output. This feature can be enabled or disabled. By default it is enabled. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- Return padding:
Padding byte, always 0x00.
- Return status:
Is set true (0x01) if the automatic self calibration is enabled or false (0x00) if the automatic self calibration is disabled.
Note
This command is only available in idle mode.
- set_ambient_pressure(ambient_pressure)[source]
The ambient pressure can be used for pressure compensation in the CO₂ sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO₂ sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- Parameters:
ambient_pressure – Ambient pressure [hPa] to be used for pressure compensation.
Note
This command can be used in any state of the device, i.e. both in idle mode and in measure mode.
- Example:
sensor.set_ambient_pressure(1013)
- get_ambient_pressure()[source]
Gets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO₂ sensor.
- Return ambient_pressure:
Currently used ambient pressure [hPa] for pressure compensation.
Note
This command can be used in any state of the device, i.e. both in idle mode and in measure mode.
- set_sensor_altitude(altitude)[source]
The sensor altitude can be used for pressure compensation in the CO₂ sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device reset.
- Parameters:
altitude – Sensor altitude [m], valid input between 0 and 3000m.
- Example:
sensor.set_sensor_altitude(0)
- get_sensor_altitude()[source]
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO₂ sensor.
- Return altitude:
Current sensor altitude [m].
Note
This command is only available in idle mode.
- activate_sht_heater()[source]
This command allows to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Note
This command is only available in idle mode.
- get_product_name()[source]
Gets the product name from the device.
- Return product_name:
Null-terminated ASCII string containing the product name. Up to 32 characters can be read from the device.
- get_serial_number()[source]
Gets the serial number from the device.
- Return serial_number:
Null-terminated ASCII string containing the serial number. Up to 32 characters can be read from the device.
- read_device_status()[source]
Reads the current device status. Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the device status flags documentation in the data sheet.
- Return device_status:
Device status (32 flags as an integer value). For details, please refer to the device status flags documentation in the datasheet.
Note
The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So they can only be cleared manually with the command “Read And Clear Device Status” or with a device reset. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears.
- read_and_clear_device_status()[source]
Reads the current device status (like command 0xD206 “Read Device Status”) and afterwards clears all flags.
- Return device_status:
Device status (32 flags as an integer value) before clearing it. For details, please refer to the device status flags documentation.
- class sensirion_i2c_sen66.device.Sen66Device(channel)[source]
Driver class implementation of SEN66
- sen66
Access to base class
- read_measured_values()[source]
Read measured values and apply scaling as defined in datasheet.
- Return mass_concentration_pm1p0:
Mass concentration in μg/m³ for particles smaller than 1.0 μm.
- Return mass_concentration_pm2p5:
Mass concentration in μg/m³ for particles smaller than 2.5 μm.
- Return mass_concentration_pm4p0:
Mass concentration in μg/m³ for particles smaller than 4.0 μm.
- Return mass_concentration_pm10p0:
Mass concentration in μg/m³ for particles smaller than 10.0 μm.
- Return humidity:
Measured humidity in %RH.
- Return temperature:
Measured temperature in degrees celsius.
- Return voc_index:
Measured VOC Index between 0 and 500.
- Return nox_index:
Measured NOx Index between 0 and 500.
- Return co2:
Measured CO2 concentration in ppm.
- read_number_concentration_values()[source]
Read measured number concentration values and apply scaling as defined in datasheet.
- Return number_concentration_pm0p5:
Number concentration in particles/cm³ for particles smaller than 0.5 μm.
- Return number_concentration_pm1p0:
Number concentration in particles/cm³ for particles smaller than 1.0 μm.
- Return number_concentration_pm2p5:
Number concentration in particles/cm³ for particles smaller than 2.5 μm.
- Return number_concentration_pm4p0:
Number concentration in particles/cm³ for particles smaller than 4.0 μm.
- Return number_concentration_pm10p0:
Number concentration in particles/cm³ for particles smaller than 10.0 μm.
Commands
The transfer classes specify the data that is transferred between host and sensor. The generated transfer classes are used by the driver class and not intended for direct use.
- class sensirion_i2c_sen66.commands.DeviceStatus(int_value: int = 0)[source]
- reserved1 = BitField(offset=0, width=4)
- fan_error = BitField(offset=4, width=1)
- reserved2 = BitField(offset=5, width=1)
- rht_error = BitField(offset=6, width=1)
- gas_error = BitField(offset=7, width=1)
- reserved3 = BitField(offset=8, width=1)
- co2_2_error = BitField(offset=9, width=1)
- reserved4 = BitField(offset=10, width=1)
- pm_error = BitField(offset=11, width=1)
- reserved5 = BitField(offset=12, width=1)
- reserved6 = BitField(offset=13, width=8)
- fan_speed_warning = BitField(offset=21, width=1)
- class sensirion_i2c_sen66.commands.StartContinuousMeasurement[source]
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command “Get Data Ready” to check when the results are ready to read. This command is only available in idle mode. If the device is already in any measure mode, this command has no effect.
- CMD_ID = 33
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.StopMeasurement[source]
Stops the measurement and returns to idle mode. After sending this command, wait at least 1000 ms before starting a new measurement. If the device is already in idle mode, this command has no effect.
- CMD_ID = 260
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetDataReady[source]
This command can be used to check if new measurement results are ready to read. The data ready flag is automatically reset after reading the measurement values.
- CMD_ID = 514
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ReadMeasuredValuesAsIntegers[source]
Returns the measured values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16, 0x7FFF for int16).
- CMD_ID = 768
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ReadNumberConcentrationValuesAsIntegers[source]
Returns the measured number concentration values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16).
- CMD_ID = 790
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ReadMeasuredRawValues[source]
Returns the measured raw values. The command “Get Data Ready” can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned again. If no data is available at all (e.g. measurement not running for at least one second), all values will be at their upper limit (0xFFFF for uint16, 0x7FFF for int16).
- CMD_ID = 1029
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.StartFanCleaning[source]
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
- CMD_ID = 22023
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.SetTemperatureOffsetParameters(offset, slope, time_constant, slot)[source]
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature. The compensated ambient temperature is calculated as follows: T_Ambient_Compensated = T_Ambient + (slope * T_Ambient) + offset Where slope and offset are the values set with this command, smoothed with the specified time constant. All temperatures (T_Ambient_Compensated, T_Ambient and offset) are represented in °C. There are 5 temperature offset slots available that all contribute additively to T_Ambient_Compensated. The default values for the temperature offset parameters are all zero, meaning that T_Ambient_Compensated is equal to T_Ambient by default. The parameters can be changed in any state of the device, i.e. both in idle mode and in measure mode.
- CMD_ID = 24754
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.SetVocAlgorithmTuningParameters(index_offset, learning_time_offset_hours, learning_time_gain_hours, gating_max_duration_minutes, std_initial, gain_factor)[source]
Sets the parameters to customize the VOC algorithm. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- CMD_ID = 24784
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetVocAlgorithmTuningParameters[source]
Gets the parameters to customize the VOC algorithm.
- CMD_ID = 24784
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.SetNoxAlgorithmTuningParameters(index_offset, learning_time_offset_hours, learning_time_gain_hours, gating_max_duration_minutes, std_initial, gain_factor)[source]
Sets the parameters to customize the NOx algorithm. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- CMD_ID = 24801
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetNoxAlgorithmTuningParameters[source]
Gets the parameters to customize the NOx algorithm.
- CMD_ID = 24801
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.SetTemperatureAccelerationParameters(k, p, t1, t2)[source]
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values. This configuration is volatile, i.e. the parameters will be reverted to their default values after a device reset.
- CMD_ID = 24832
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.SetVocAlgorithmState(state)[source]
Sets the VOC algorithm state previously received with “Get VOC Algorithm State” command. Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
- CMD_ID = 24961
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetVocAlgorithmState[source]
Gets the current VOC algorithm state. Allows to backup and restore the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset or a power cycle can be executed.
- CMD_ID = 24961
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.PerformForcedCo2Recalibration(target_co2_concentration)[source]
Execute the forced recalibration (FRC) of the CO₂. See the datasheet of the SCD4x sensor for details how the forced recalibration shall be used.
- CMD_ID = 26375
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.SetCo2SensorAutomaticSelfCalibration(status)[source]
Sets the status of the CO₂ sensor automatic self-calibration (ASC). The CO₂ sensor supports automatic self calibration (ASC) for long-term stability of the CO₂ output. This feature can be enabled or disabled. By default it is enabled. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- CMD_ID = 26385
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetCo2SensorAutomaticSelfCalibration[source]
The CO₂ sensor supports automatic self calibration (ASC) for long-term stability of the CO₂ output. This feature can be enabled or disabled. By default it is enabled. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- CMD_ID = 26385
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.SetAmbientPressure(ambient_pressure)[source]
The ambient pressure can be used for pressure compensation in the CO₂ sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO₂ sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device restart.
- CMD_ID = 26400
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetAmbientPressure[source]
Gets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO₂ sensor.
- CMD_ID = 26400
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.SetSensorAltitude(altitude)[source]
The sensor altitude can be used for pressure compensation in the CO₂ sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m. This configuration is volatile, i.e. the parameter will be reverted to its default value after a device reset.
- CMD_ID = 26422
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetSensorAltitude[source]
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO₂ sensor.
- CMD_ID = 26422
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ActivateShtHeater[source]
This command allows to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
- CMD_ID = 26469
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sen66.commands.GetProductName[source]
Gets the product name from the device.
- CMD_ID = 53268
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.GetSerialNumber[source]
Gets the serial number from the device.
- CMD_ID = 53299
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ReadDeviceStatus[source]
Reads the current device status. Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the device status flags documentation in the data sheet.
- CMD_ID = 53766
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sen66.commands.ReadAndClearDeviceStatus[source]
Reads the current device status (like command 0xD206 “Read Device Status”) and afterwards clears all flags.
- CMD_ID = 53776
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
Result Types
The signal classes specify transformations of the raw sensor signals into a meaningful units. The generated signal types are used by the driver class and not intended for direct use.
- class sensirion_i2c_sen66.result_types.SignalMassConcentrationPm1p0(mass_concentration_pm1p0_raw)[source]
Mass concentration in μg/m³ for particles smaller than 1.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalMassConcentrationPm2p5(mass_concentration_pm2p5_raw)[source]
Mass concentration in μg/m³ for particles smaller than 2.5 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalMassConcentrationPm4p0(mass_concentration_pm4p0_raw)[source]
Mass concentration in μg/m³ for particles smaller than 4.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalMassConcentrationPm10p0(mass_concentration_pm10p0_raw)[source]
Mass concentration in μg/m³ for particles smaller than 10.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalNumberConcentrationPm0p5(number_concentration_pm0p5_raw)[source]
Number concentration in particles/cm³ for particles smaller than 0.5 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalNumberConcentrationPm1p0(number_concentration_pm1p0_raw)[source]
Number concentration in particles/cm³ for particles smaller than 1.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalNumberConcentrationPm2p5(number_concentration_pm2p5_raw)[source]
Number concentration in particles/cm³ for particles smaller than 2.5 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalNumberConcentrationPm4p0(number_concentration_pm4p0_raw)[source]
Number concentration in particles/cm³ for particles smaller than 4.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalNumberConcentrationPm10p0(number_concentration_pm10p0_raw)[source]
Number concentration in particles/cm³ for particles smaller than 10.0 μm
- property value
- class sensirion_i2c_sen66.result_types.SignalTemperature(temperature_raw)[source]
Measured temperature in degrees celsius. The raw value is scaled appropriately.
- property value
- class sensirion_i2c_sen66.result_types.SignalHumidity(humidity_raw)[source]
Measured humidity in %RH. The raw value is scaled appropriately.
- property value
- class sensirion_i2c_sen66.result_types.SignalVocIndex(voc_index_raw)[source]
Measured VOC Index ticks.
- property value