# @townsen/homebridge-am2320

> AM2320 temperature/humiditysensor bridge for Homebridge: https://github.com/nfarina/homebridge"

Latest version **0.7.4** (published 2025-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @townsen/homebridge-am2320
pnpm add @townsen/homebridge-am2320
yarn add @townsen/homebridge-am2320
bun add @townsen/homebridge-am2320
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.4 |
| Published | 2025-11-03 |
| First published | 2021-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.17.0 |
| Dependencies | 3 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | townsen |
| Maintainers | townsen |
| Keywords | homebridge-plugin, aosong, am2320, temperature, humidity, sensor |

## Links

- npm: https://www.npmjs.com/package/@townsen/homebridge-am2320
- Repository: https://gitlab.com/townsen/homebridge-am2320
- Homepage: https://gitlab.com/townsen/homebridge-am2320#readme
- Issues: https://gitlab.com/townsen/homebridge-am2320/issues
- npm.io page: https://npm.io/package/@townsen/homebridge-am2320

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) >=4.1.1
- [moment](https://npm.io/package/moment.md) >=2.24.0
- [fakegato-history](https://npm.io/package/fakegato-history.md) >=0.5.6

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.7.4 (latest) — 2025-11-03
- 0.7.3 — 2025-11-03
- 0.7.2 — 2025-11-03
- 0.7.1 — 2025-11-03
- 0.7.0 — 2024-05-02
- 0.6.5 — 2022-03-10
- 0.6.4 — 2022-02-01
- 0.6.3 — 2022-02-01
- 0.6.1 — 2022-02-01
- 0.6.0 — 2022-01-23
- 0.5.0 — 2021-12-18
- 0.4.0 — 2021-12-18
- 0.3.2 — 2021-12-18
- 0.3.1 — 2021-12-18
- 0.3.0 — 2021-12-18

## README

# homebridge-am2320

[AM2320](http://www.aosong.com/en/products-41.html)
temperature/humidity sensor service plugin for [Homebridge](https://github.com/nfarina/homebridge).


* Display of temperature, humidity from a AM2320 connected to a RaspberryPI.
* Support the graphing feature of the Eve app for trends

## Installation
1.	Install Homebridge using `npm install -g homebridge`
2.	Install this plugin `npm install -g @townsen/homebridge-am2320`
3.	Update your configuration file - see below for an example

## Configuration
* `accessory`: "AM2320"
* `loglevel`: 0 = none, 1 = each reading, errors are always logged
* `name`: descriptive name
* `name_temperature` (optional): descriptive name for the temperature sensor
* `name_humidity` (optional): descriptive name for the humidity sensor
* `refresh`: Optional, time interval for refreshing data in seconds, defaults to 30 seconds.
* `recordpath`: Optional, used by the fakegato history code to create an on-disk record of
  the observations. This preserves the history in case of a restart, and can be used to
  extract the observations manually.  The `name` and the `device_id` are used to name the sensor device,
  which is then used as the filename.

Note that the names given must be unique if there is more than one device of this type in
the configuration.

If you get an I/O error, make sure the I2C address is correct (usually 0x5c).

Simple Configuration

```json
{
  "bridge": {
    "name": "AM2320Example",
    "username": "CB:22:33:E2:CE:31",
    "port": 51826,
    "pin": "033-44-254"
  },
  "accessories": [
    {
      "accessory": "AM2320",
      "name": "Sensor",
      "name_temperature": "Temperature",
      "name_humidity": "Humidity",
      "options": {
        "i2cBusNo": 1,
        "i2cAddress": "0x5c"
      }
    }
  ],
  "platforms": []
}
```

This plugin creates two services: TemperatureSensor and HumiditySensor.

## Credits

This was adapted from the two projects below:
* homebridge-bme280
* homebridge-am2320

## License

MIT

---
_Source: https://npm.io/package/@townsen/homebridge-am2320 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
