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.2.3.tar.gz (14.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.2.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ttn_client-1.2.3.tar.gz
  • Upload date:
  • Size: 14.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.2.3.tar.gz
Algorithm Hash digest
SHA256 2a38624f50cf7376037d8ed5a8189c6ebcff45f3e45aeddc94afe1f749894e42
MD5 49245ea0d7f71d16db5813eaa705a0bf
BLAKE2b-256 9d227033a1cee3d5eaf6279f4c9bfe3dd783ec2a4f152c178ca4019bd83ff632

See more details on using hashes here.

Provenance

The following attestation bundles were made for ttn_client-1.2.3.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.2.3-py3-none-any.whl.

File metadata

  • Download URL: ttn_client-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 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.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c4a482dc8bcda4f4da8f59acb5d927ef082fc4e135e285c5492b284d9fc8589a
MD5 2026d5f93471d9de5b28160ca87fa6d1
BLAKE2b-256 561bb7c86014b02e4b693b3c2fb3112a0ded1ec65c95c82a27bcd47276fc690b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ttn_client-1.2.3-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