<commit_before># homebridge-aircontrol-mini

A [HomeBridge Plugin](https://github.com/nfarina) making the TFA-Dostmann AirControl Mini CO2 measurment USB device availible in HomeKit.

## Installation


```
sudo apt-get install build-essential libudev-dev
sudo npm install -g homebridge-aircontrol-mini
```

## Sample Config (Excerpt)

Configured as part of your homebridge configuration.

The only config parameter needed is `name`. In addition to this you need to connect the device to your machine running homebridge. Because USB access (using libusb) is required superuser access might be required.


```
{
  "bridge": {
    …
  },
  …
  "accessories": [
    {
      "accessory": "aircontrol-mini",
      "name": "Living Room CO2"
    }
  ],
	…
}

```<commit_msg>add udev rule to readme<commit_after># homebridge-aircontrol-mini

A [HomeBridge Plugin](https://github.com/nfarina) making the TFA-Dostmann AirControl Mini CO2 measurment USB device availible in HomeKit.

## Installation

For use on an Ubuntu/Debian style Linux: 

```
sudo apt-get install build-essential libudev-dev
sudo npm install -g --unsafe-perm homebridge-aircontrol-mini
```

To allow homebridge to run without beeing root or using sudo a udev Rule needs to be added. 

Create `/etc/udev/rules.d/23-homebridge.rules` and put in the following line, where you replace `homebridge` with the group of the user running homebridge on your system (e.g. `pi` on a raspian):

```
SUBSYSTEM=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="a052", GROUP="homebridge", MODE="0664"
```


## Sample Config (Excerpt)

Configured as part of your homebridge configuration.

The only config parameter needed is `name`. In addition to this you need to connect the device to your machine running homebridge. Because USB access (using libusb) is required superuser access might be required.


```
{
  "bridge": {
    …
  },
  …
  "accessories": [
    {
      "accessory": "aircontrol-mini",
      "name": "Living Room CO2"
    }
  ],
	…
}

```
{'fraction_non_alphanumeric': 0.1086086086086086, 'fraction_numerical': 0.008008008008008008, 'mean_word_length': 3.9236453201970445, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4241917', 'n_tokens_mistral': 666, 'n_tokens_neox': 613, 'n_words': 229}