Skip to main content

A python client to fetch/receive and parse uplink messages from The Thinks Network

Project description

The Things Network_python_client

codecov PyPI version

A python client to fetch/receive and parse uplink messages from The Things Network

It is used primarily for the home-assistant integration but it should also work independently - check the testcases.

Assumptions

For this library to work, the TheThingNetwork storage plugin is required. You might also check the home assistant prerequisites as they also apply when this library is used standalone.

A payload decoded needs to be present so that you have a decoded_payload in the uplink message. By default, this library expects the decoded_payload to have a key-value format such as:

"decoded_payload": {
          "accelerometer_77": {
            "x": 1,  # Sensor will be called accelerometer_77_x
            "y": 0.5,  # Sensor will be called accelerometer_77_y
            "z": 9.8   # Sensor will be called accelerometer_77_z
          },
          "voltage": 3.1,  # Sensor will be called voltage and be of type float
          "boolean_1": true,  # Binary Sensor will be called boolean_1
          "digital_in_1": 8,  # Sensor will be called voltage and be of type int
          "gps_34": {  # Device Tracker will be called gps_34
            "latitude": 48.76826575,
            "longitude": 9.1596689,
            "altitude": 310
          }
        }

If you have a device using a different format, please open an Issue and post a copy of full message for your device.

Supported devices

How to test

This library uses tox so just install it and run tox

Thanks

This package structure and pipeline is derived from the zwave-js-server-python package.

Project details


Download files

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

Source Distribution

ttn_client-1.3.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ttn_client-1.3.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file ttn_client-1.3.0.tar.gz.

File metadata

  • Download URL: ttn_client-1.3.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ttn_client-1.3.0.tar.gz
Algorithm Hash digest
SHA256 14c61bbc7c8f3f377b98aeabc84f73e568a1a5906e10c55ab3d13dbe76e7c80e
MD5 d6ddc8bc8a1e308dfd85952518c90cc9
BLAKE2b-256 2b8da8bc8709f1b4af0901c191f8d07849be6245b72c3a9971da3afe383c8dc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ttn_client-1.3.0.tar.gz:

Publisher: publish-to-pypi.yml on angelnu/thethingsnetwork_python_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ttn_client-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ttn_client-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ttn_client-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a612b331fb68eff11b2186f39bfd57e08ac95abd41a70e8fbb3ac8feec8e8bfd
MD5 c660c6622488aa5553c6742833b87ae3
BLAKE2b-256 cf8967a22a7a4d68c2a902701721c804eafca99129d54245690e077faa16e13e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ttn_client-1.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on angelnu/thethingsnetwork_python_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page