Skip to main content

A library to interface with ZyTemp devices

Project description

pyzytemp

ZyTemp devices are simple serial communication devices that can measure basic properties about the world around them. This library provides a method for interfacing with these devices and retrieving measurements from them.

Devices powered by ZyTemp include:

Different devices have different capabilities, but in theory ZyTemp devices can report:

  • Temperature
  • CO2 concentration
  • Relative humidity

Installation

pip install pyzytemp

Examples

Streaming value from a device:

import pyzytemp
device = pyzytemp.find()[0]
for measurement, value in device.stream():
    if measurement == pyzytemp.Measurement.CO2:
        print(f"Current CO2 level: {value:.0f} PPM")

Polling for recent values from a device:

import time
import pyzytemp
device = pyzytemp.find()[0]
for _ in range(32):
    time.sleep(1)
    temp = device.get_last_temperature_c()
    if temp is not None:
        print(f"Last recorded temperature: {temp:.2f}C")

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

pyzytemp-0.0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

pyzytemp-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file pyzytemp-0.0.1.tar.gz.

File metadata

  • Download URL: pyzytemp-0.0.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyzytemp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9b70813bb99fd7c75fe3d2c0a653d9cafa4894810aaa8b3250bd4d085d0a65d1
MD5 c0ee3aade7ab3b5e95bc99701744f710
BLAKE2b-256 718745c338004aa9d23ad0280a1c8171e1c34be2e635a754807ede5ac4dd6a86

See more details on using hashes here.

File details

Details for the file pyzytemp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyzytemp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyzytemp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8db05e196d067da72cd1686cd16eeceaeeefb1028cb1140f5e46773585177649
MD5 ff5bf0feb12cc0e37ebea447e6d9ae63
BLAKE2b-256 a39bae08f780972b412a9a74799c0a73c70398c19c67d70451772fbe4b0d6b0a

See more details on using hashes here.

Supported by

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