File python-pycayennelpp.spec of Package python-pycayennelpp
#
# spec file for package python-pycayennelpp
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-pycayennelpp
Version: 2.4.0
Release: 0
Summary: Encoder and Decoder for CayenneLLP
License: MIT
URL: http://github.com/smlng/pycayennelpp
Source: https://files.pythonhosted.org/packages/source/p/pycayennelpp/pycayennelpp-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildArch: noarch
%python_subpackages
%description
A Cayenne Low Power Payload (CayenneLPP) decoder and encoder written in Python.
PyCayenneLPP offers a concise interface with proper encoding and decoding
functionality for the CayenneLPP format, supporting many sensor types.
The project aims for overall high code quality and good test coverage.
See also [myDevicesIoT/CayenneLPP](https://github.com/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.
## Supported Data Types
The following table lists the currently supported data types with the LPP code
(which equals IPSO code - 3200), data size in bytes, dimensions, signedness,
and data resolution.
| Type Name | LPP | Size | Dim | Signed | Resolution |
|----------------|-----|------|-----|--------|------------|
| Digital Input | 0 | 1 | 1 | False | 1 |
| Digital Output | 1 | 1 | 1 | False | 1 |
| Analog Input | 2 | 2 | 1 | True | 0.01 |
| Analog Output | 3 | 2 | 1 | True | 0.01 |
| Generic Sensor | 100 | 4 | 1 | False | 1 |
| Illuminance | 101 | 2 | 1 | False | 1 Lux |
| Presence | 102 | 1 | 1 | False | 1 |
| Temperature | 103 | 2 | 1 | True | 0.1°C |
| Humidity | 104 | 1 | 1 | False | 0.5 % |
| Accelerometer | 113 | 6 | 3 | True | 0.001 G |
| Barometer | 115 | 2 | 1 | False | 0.1 hPa |
| Voltage | 116 | 2 | 1 | False | 0.01 V |
| Current | 117 | 2 | 1 | False | 0.001 A |
| Frequency | 118 | 4 | 1 | False | 1 Hz |
| Percentage | 120 | 1 | 1 | False | 1 % |
| Altitude | 121 | 2 | 1 | True | 1 m |
| Load | 122 | 3 | 1 | True | 0.001 kg |
| Concentration | 125 | 2 | 1 | False | 1 |
| Power | 128 | 2 | 1 | False | 1 |
| Distance | 130 | 4 | 1 | False | 0.001 km |
| Energy | 131 | 4 | 1 | False | 0.001 kJ |
| Direction | 132 | 2 | 1 | False | 1 ° |
| Time | 133 | 4 | 1 | False | 1 s |
| Gyrometer | 134 | 6 | 3 | True | 0.01 °/s |
| Colour | 135 | 3 | 3 | False | 1 RGB |
| Location | 136 | 9 | 3 | True | 0.00001 lat|
| | | | | | 0.00001 lon|
| | | | | | 0.01 alt |
| Switch | 142 | 1 | 1 | False | 1 on/off |
%prep
%autosetup -p1 -n pycayennelpp-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%{python_sitelib}/cayennelpp
%{python_sitelib}/pycayennelpp-%{version}.dist-info
%changelog