Skip to main content
# AOSONG Sensors

Python package that provides support for AOSONG Sensor.

This package and it's modules have been organized to support additional AOSONG
sensors. It currently only supports the [AM2315 Temperature and Humidity
Sensor](https://www.adafruit.com/datasheets/AM2315.pdf). Additional sensors are
encouraged and welcomed. Please submit a Pull Request.

The original author of this library was
[Sopwith](http://sopwith.ismellsmoke.net). This repository was originally forked
from the code provided by the author on [their
blog](http://sopwith.ismellsmoke.net/?p=104). The purpose of the repository is
to provide a pythonic library that can be installed with `pip` and `setuptools`.

## Requirements

* Python 3
* [Quick2wire Python API](https://github.com/quick2wire/quick2wire-python-api)

## Installation

### Recommended
```shell
pip install --process-dependency-links aosong
```

### Manual
`python setup.py install`

## Usage

```python
>>> from aosong import am2315
>>> sensor = am2315.Sensor()
>>> sensor.temperature()
19.1
>>> sensor.celsius()
19.1
>>> sensor.fahrenheit()
66.3
>>> sensor.temperature(True)
66.3
>>> sensor.humidity()
70.1
>>> sensor.data()
(70.0, 19.1, 66.3)
>>>

```

### Sensor.data()
Sensor.data() returns a tuple containing three values.

`(41.8, 23.5, 74.3)`

The first value is the current relative humidity
The second value is the current temperature in Celsius.
The third value is the current temperature in Fahrenheit.

### Sensor.temperature()

Sensor.temperature() returns the current temperature in Celsius.

If you want the current temperature returned in Fahrenheit pass True as a parameter.

`sensor.temperature(True)`

## Test script:

am2315.py is a unittest script you should run to ensure your sensor
is wired correctly. If it is, you should see the below test results.

`python setup.py test`

## Support and Contribution

Pull requests and Issues are welcome!

Otherwise, please feel free to report bugs, comments, enhancement requests to:
[sopwith@ismellsmoke.net](mailto:sopwith@ismellsmoke.net)
[http://sopwith.ismellsmoke.net](http://sopwith.ismellsmoke.net)

Metadata

Release files for aosong 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for aosong 0.0.2
File Size Uploaded
aosong-0.0.2.tar.gz 4.7 kB Details
aosong-0.0.2.macosx-10.9-x86_64.tar.gz 7.4 kB Details

Release files / aosong-0.0.2.tar.gz

Download URL aosong-0.0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fb324d71b4709c1bb1ff4b5108062c38f2d82f7e812422341d6baa1e9a66392d
BLAKE2b-256 checksum
How to use checksums
9eb1dfeb8407b02de9fa16c7bdf1494217299e5b7f7613d3dd35a194c7162757
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aosong-0.0.2.macosx-10.9-x86_64.tar.gz

Download URL aosong-0.0.2.macosx-10.9-x86_64.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f8c05e2983d0d03b5aa778c4726879c1ddc5c8d33e085f9358d2a04aabf0d3a3
BLAKE2b-256 checksum
How to use checksums
36d24a5fe31a0f2c3dacd90c16e481ab223de0a0603b3e0939eee9156b37a588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page