Skip to main content

Encoder and Decoder for CayenneLLP

Project description


Travis-CI Codacy Badge Codacy Badge PyPi GitHub

A Cayenne Low Power Payload (CayenneLPP) decoder and encoder written in Python. See also myDevicesIoT/CayenneLPP for more information on the format and a reference implementation in C++.

The project is under active development. Releases will be published on the fly as soon as a certain number of new features and fixes have been made.

Getting Started

PyCayenneLPP does not have any external dependencies, but only uses builtin functions and types of Python 3. At least Python in version 3.4 is required.

Python 3 Prerequisites

The PyCayenneLPP package is available via PyPi using pip. To install it run:

pip3 install pycayennelpp

MicroPython Prerequisites

MicroPython does not include the libraries base64 and logging per default. While the latter rather optional for embedded devices, the former is essential. It can be installed from the micropython-lib project via tools like ampy.

git clone
cd micropython-lib/
pip install ampy
ampy -p /dev/ttyACM0 put base64/ # port may be different

Usage Examples

The following show how to utilise PyCayenneLPP in your own application to encode and decode data into and from CayenneLPP.


from cayennelpp import LppFrame

# create empty frame
frame = LppFrame()
# add some sensor data
frame.add_temperature(0, -1.2)
frame.add_humidity(6, 34.5)
# get byte buffer in CayenneLPP format
buffer = frame.bytes()


from cayennelpp import LppFrame

# byte buffer in CayenneLPP format with 1 data item
# i.e. on channel 1, with a temperature of 25.5C
buffer = bytearray([0x01, 0x67, 0x00, 0xff])
# create frame from bytes
frame = LppFrame().from_bytes(buffer)
# print the frame and its data


Contributing to a free open source software project can take place in many different ways. Feel free to open issues and create pull requests to help improving this project. Each pull request has to pass some automatic tests and checks run by Travis-CI before being merged into the master branch.

Please take note of the contributing guidelines and the Code of Conduct.


This is a free open source software project published under the MIT License.

Project details

Download files

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

Files for pycayennelpp, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size pycayennelpp-1.2.0-py3-none-any.whl (8.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycayennelpp-1.2.0.tar.gz (8.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page