A package to decode a data encoded in a CayenneLPP format.
Project description
# Python-CayenneLPP [![Build Status](https://travis-ci.org/OlegSomov/Python-CayenneLPP.svg?branch=master)](https://travis-ci.org/OlegSomov/Python-CayenneLPP) [![codecov](https://codecov.io/gh/OlegSomov/Python-CayenneLPP/branch/master/graph/badge.svg)](https://codecov.io/gh/OlegSomov/Python-CayenneLPP) [![PyPI](https://img.shields.io/pypi/v/Python-CayenneLPP)](https://pypi.org/project/Python-CayenneLPP/) [![PyPI](https://img.shields.io/pypi/pyversions/Python-CayenneLPP)](https://pypi.org/project/Python-CayenneLPP/) ## Introduction Open-source library for python to decode CayenneLPP format payload. The Cayenne Low Power Payload (LPP) provides a convenient and easy way to send data over LPWAN networks such as LoRaWAN. More details on CayenneLPP payload: https://github.com/myDevicesIoT/cayenne-docs
## Installation
To install the package use next pip command
pip install python-cayennelpp
## Usage To decode payload simply use method decode() from this package
`python >>>from python_cayennelpp.decoder import decode >>>print(decode('03670110056700FF')) [{'channel': 3, 'name': 'Temperature Sensor', 'value': 27.2}, {'channel': 5, 'name': 'Temperature Sensor', 'value': 25.5}] ` ## Additional info The package may raise following exceptions: - TypeError - if the provided data is not of the str type - ValueError - if the provided data length is not equal to the expected
> Note: if the package receives a wrong sensor type the intermediate result of the decoder will be returned, error printed to the stdout, but KeyError exception will not be raised
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
Built Distribution
Hashes for python_cayennelpp-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef8c5a12676d95e4191b2c691240b9e4992a9218d681027ad95ddf704ca62de |
|
MD5 | 7cd466a53fcbfc01726832083f19b6d3 |
|
BLAKE2b-256 | c8999ef0686e348cc734c0c9e76a2dab33d7b4ae299efd69be8b386b9827e0d8 |