Skip to content
This repository has been archived by the owner on Nov 3, 2019. It is now read-only.

Cayenne Low Power Payload (LPP) for python or micropython

License

Notifications You must be signed in to change notification settings

helder-moreira/cayennelpp-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cayenne LPP

This module provides a Cayenne Low Power Payload (LPP) encoder for python/micropython. More info about Cayenne LPP at Cayenne Docs.

Supported Data Types

Currently supported data types are the same as the ones supported by the official Cayenne LPP C/C++ implementation:

  • Digital Input
  • Digital Output
  • Analog Input
  • Analog Output
  • Illuminance Sensor
  • Presence Sensor
  • Temperature Sensor
  • Humidity Sensor
  • Accelerometer
  • Barometer
  • Gyrometer
  • GPS Location

Usage

The syntax also conforms with the official Cayenne LPP C/C++ implementation as described in Cayenne Docs.

Example

from cayennelpp import CayenneLPP

c = CayenneLPP()
c.addTemperature(1, 23.5) # Add temperature read to channel 1 
c.addTemperature(2, 22.7) # Add another temperature read to channel 2
c.addRelativeHumidity(3, 88.5) # Add relative humidity read to channel 3
data = c.getBuffer() # Get bytes

License

MIT

About

Cayenne Low Power Payload (LPP) for python or micropython

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages