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

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.1.0.tar.gz (13.8 kB view hashes)

Uploaded Source

Built Distribution

ttn_client-1.1.0-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

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