A python client to fetch/receive and parse uplink messages from The Thinks Network
Project description
The Things Network_python_client
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
Built Distribution
File details
Details for the file ttn_client-1.2.1.tar.gz
.
File metadata
- Download URL: ttn_client-1.2.1.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bcff668343f26fa8290f1043f47bafa5aa37065ff6a5b9d504beddc994cb3f5 |
|
MD5 | 2b351c19a96e2160c7a8a218b17c8b62 |
|
BLAKE2b-256 | 9b17b5f9978175d7efe4085841126135a734d740db2f505b5b22c06a473c5348 |
File details
Details for the file ttn_client-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: ttn_client-1.2.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8249bd794744e14c27ddc9a9316c8c291c147ec38782fdb1aa7f3eff5429b16f |
|
MD5 | 546d98ab95efbda32d73252a095f30ae |
|
BLAKE2b-256 | d372c88fd136d021182a71d4dfd8b2f1a741a6e61d3940b79f4446d1af8771f0 |