8000 GitHub - janpieper/cayenne_lpp: Elixir library for Cayenne Low Power Payload (LPP) format
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

janpieper/cayenne_lpp

Repository files navigation

cayenne_lpp 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:

defp deps do
  [{:cayenne_lpp, "~> 0.1.0"}]
end

Usage

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:

Hardware

While developing this library, the following hardware has been used to test the integration with TheThingsNetwork and Cayenne Cloud:

TODOs

License

This software is licensed under the MIT license

About

Elixir library for Cayenne Low Power Payload (LPP) format

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0