Skip to main content

Package for creating and decoding URLs that contain temperature and humidity samples.

Project description

cuplcodec

cuplcodec encodes environmental sensor data into a URL. Each sample includes two 12-bit readings (temperature and humidity). These are converted to base64 and written into a circular buffer. A HMAC is written after the most recent sample in the buffer. The URL can be rendered as a QR code or stored on an NFC tag. If a tag with a URL is tapped by a mobile phone, it opens automatically in a web browser. This allows the user to view sensor data without installing an app on their phones. A web application comprising cuplfrontend and cuplbackend runs the decoder in cuplcodec, unwraps the circular buffer and displays a list of samples in the browser.

Tests

GitHub Workflow Status

The codec is tested with pytest. The encoder written in C can be tested with the decoder written in Python using CFFI.

Documentation

Documentation Status

Hosted on ReadTheDocs. This includes information on how to run the encoder on an MSP430.

PyPI Package

PyPI pyversions

Hosted on PyPI. Install the package with:

pip install cuplcodec

Licence

cuplcodec

License: GPL v3

Documentation

License: CC BY-SA 4.0

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

cuplcodec-2.1.0.tar.gz (19.7 kB view hashes)

Uploaded Source

Built Distributions

cuplcodec-2.1.0-cp38-cp38-manylinux2010_x86_64.whl (236.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

cuplcodec-2.1.0-cp38-cp38-manylinux1_x86_64.whl (236.5 kB view hashes)

Uploaded CPython 3.8

cuplcodec-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl (233.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

cuplcodec-2.1.0-cp37-cp37m-manylinux1_x86_64.whl (233.9 kB view hashes)

Uploaded CPython 3.7m

cuplcodec-2.1.0-cp36-cp36m-manylinux2010_x86_64.whl (233.8 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

cuplcodec-2.1.0-cp36-cp36m-manylinux1_x86_64.whl (233.8 kB view hashes)

Uploaded CPython 3.6m

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