Skip to main content

Python library for interfacing with a Senseair S8 CO2 sensor.

Project description

Senseair S8 for Python

Python module for reading CO2 concentration from a Senseair S8 sensor connected to a Raspberry Pi

Connecting the Senseair S8 to your Raspberry Pi

Hook up the Senseair S8 to your Raspberry Pi using the following schematic:

Connection schematic

Image source: http://co2meters.com/Documentation/AppNotes/AN168-S8-raspberry-pi-uart.pdf

Module installation

pip install senseair-s8

Usage

As a module:

from senseair_s8 import SenseairS8

senseair_s8 = SenseairS8()
print(senseair_s8.co2())

From the command line:

python -m senseair_s8

Troubleshooting

  • This module expects the sensor to be connected to port /dev/ttyS0. It was only tested using that port, but you can override this settings when initialising the sensor:
sensair_s8 = SenseairS8(port='/dev/ttyS0')
  • Out of the box, /dev/ttyS0 is disabled on a Raspberry Pi, resulting in a permission denied-error. You can enable it by:
    1. Run sudo raspi-config
    2. Select Interfacting options
    3. Select P6 Serial
    4. Select No for login console
    5. Select Yes for serial port hardware
    6. OK, Finish, Reboot - Yes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

senseair_s8-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

senseair_s8-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file senseair_s8-0.1.0.tar.gz.

File metadata

  • Download URL: senseair_s8-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for senseair_s8-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a019c04d64e82f71c39bc24ba57e3cda5fb5d80613ab10fc071e58931123300c
MD5 9c9d2c3ea6b075e11ca0ec6e19f8d9c0
BLAKE2b-256 87295de194596b40ee9b64eb3040ca22a789a8068e1d0248a5467dee0a3a7a95

See more details on using hashes here.

Provenance

The following attestation bundles were made for senseair_s8-0.1.0.tar.gz:

Publisher: publish.yml on ndoornekamp/senseair_s8

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file senseair_s8-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: senseair_s8-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for senseair_s8-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cb28ef77eefaffa47b233c6656749b8f1e19bb8fb1593162221bf9817334495
MD5 1aff9d0a15a16e3341d7067bad9bbe98
BLAKE2b-256 771c1f9f56f44a4c557f49708ed21093638a5d306c38dc2e986a00624e625312

See more details on using hashes here.

Provenance

The following attestation bundles were made for senseair_s8-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ndoornekamp/senseair_s8

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page