Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janpieper/cayenne_lpp
Elixir library for Cayenne Low Power Payload (LPP) format
https://github.com/janpieper/cayenne_lpp
cayennelpp elixir lora lorawan lpwan mydevices rak7258 rak811 raspberrypi thethingsnetwork ttn
Last synced: 14 days ago
JSON representation
Elixir library for Cayenne Low Power Payload (LPP) format
- Host: GitHub
- URL: https://github.com/janpieper/cayenne_lpp
- Owner: janpieper
- License: mit
- Created: 2020-02-08T14:12:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T13:25:48.000Z (almost 4 years ago)
- Last Synced: 2024-12-17T03:12:19.756Z (19 days ago)
- Topics: cayennelpp, elixir, lora, lorawan, lpwan, mydevices, rak7258, rak811, raspberrypi, thethingsnetwork, ttn
- Language: Elixir
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cayenne_lpp ![Build Status](https://github.com/janpieper/cayenne_lpp/workflows/Elixir%20CI/badge.svg "Build Status")
Elixir library for Cayenne Low Power Payload (LPP) format
## Installation
The package can be installed by adding `cayenne_lpp` to your list of
dependencies in `mix.exs`:```elixir
defp deps do
[{:cayenne_lpp, "~> 0.1.0"}]
end
```## Usage
```elixir
alias Cayenne.LPP.Payload
alias Cayenne.LPP.Type.{Temperature, RelativeHumidity}payload =
Payload.new()
|> Payload.add(1, Temperature.new(28.3))
|> Payload.add(2, RelativeHumidity.new(40.5))# Payload as String: "0167011B02680195"
payload
|> Payload.to_string()
|> IO.inspect(label: "Payload as String")# Payload size (in bytes): 8
payload
|> Payload.size()
|> IO.inspect(label: "Payload size (in bytes)")
```## Inspiration
This library has been inspired by the following list of articles, videos and
libraries written in other programming languages:* **Articles**
* [OMA LightweightM2M (LwM2M) Object and Resource Registry](http://openmobilealliance.org/wp/OMNA/LwM2M/LwM2MRegistry.html)
* [Cayenne Low Power Payload](https://developers.mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload)
* [Cayenne LPP 2.0](https://community.mydevices.com/t/cayenne-lpp-2-0/7510/1)
* [Cayenne LPP @ loranow.com](https://loranow.com/cayennelpp/)
* [Getting Started with the Raspberry Pi LoRa Node pHAT](https://learn.pi-supply.com/make/getting-started-with-the-raspberry-pi-lora-node-phat/)
* **Libraries**
* https://github.com/myDevicesIoT/CayenneLPP (C++)
* https://github.com/TheThingsNetwork/arduino-device-lib (C)
* https://github.com/OlegZv/Python-CayenneLPP (Python)
* https://github.com/ctron/cayenne-lpp (Java)
* **Videos**
* [How to: Payload Functions](https://www.youtube.com/watch?v=nT2FnwCoP7w)
* [Eric Ptak - Payload formats for LPWAN Applications](https://www.youtube.com/watch?v=UL5IDpGCKkU)
* **Platforms**
* [Cayenne Cloud](https://developers.mydevices.com/) by [myDevices](https://mydevices.com/)
* [TheThingsNetwork](https://www.thethingsnetwork.org/)## Hardware
While developing this library, the following hardware has been used to test
the integration with [TheThingsNetwork](https://www.thethingsnetwork.org/) and
[Cayenne Cloud](https://developers.mydevices.com/):* [Raspberry Pi 3 Model B+](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/)
* [IoT LoRa Node pHAT for Raspberry Pi (Multi Frequence)](https://uk.pi-supply.com/products/iot-lora-node-phat-for-raspberry-pi)
* [RAK7258 Micro Gateway](https://store.rakwireless.com/products/rak7258-micro-gateway?variant=26678395568228)## TODOs
* [x] Publish to [hex.pm](https://hex.pm/)
* [x] Publish docs to [hexdocs.pm](https://hexdocs.pm/)
* [ ] Support decoding, not just encoding
* [ ] Add example using [circuits_uart](https://github.com/elixir-circuits/circuits_uart)## License
This software is licensed under [the MIT license](LICENSE.md)