@lomray/homebridge-co2-level

This plugin show a CO2 air quality accessory that you can switch to the "detected" state when the level reaches a threshold.

Usage no npm install needed!

<script type="module">
  import lomrayHomebridgeCo2Level from 'https://cdn.skypack.dev/@lomray/homebridge-co2-level';
</script>

README

homebridge-co2-level

npm npm

Description

This plugin shows a CO2 air quality accessory that you can switch to the "detected" state when the level reaches a threshold.

Example config:

{
    axiosConfig: {
        url:     'http://example.loc', // get CO2 data
        method:  'GET',
        timeout: 3000, // request timeout
    },
    loginUrl:    'http://example.loc/?login=1', // not required. If need login before request CO2 value
    valuePath:   'data.ADC.value', // Path to obtain value from response
    calculate:   'ppm', // ppm,percent,none

    interval:  20, // refresh interval in seconds
    threshold: 1000, // set alarm detect in ppm or % (depends on `calculate`)
}