Metadata-Version: 2.4
Name: tg-lrx2-utils
Version: 1.0.0
Summary: Utilities for TG-LR82, TG-LR92
Author-email: MikroTik <janissk@mikrotik.com>
License: MIT
Project-URL: Usermanual, https://help.mikrotik.com/docs/spaces/UM/pages/181338171/TG-LR
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: msgpack>=1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: paho-mqtt>=2.0

# TG-LRX2 Utilities

Utilities to generate and publish command and configuration messages for TG-LR82, TG-LR92 LoRaWAN devices.

## Example

Command source file:
```
# lora-script.txt
frame set-cfg 1,601,0,0,current-state,activity
frame set-cfg 1,43200,1,0,mag-switch
```

Generate downlink messages (lora-pub.yml) to schedule on LoRaWAN network server:
```
tg-lrx2-encode --script ./lora-script.txt --dev-desc ./tg-lrx2-2.0-desc.yml --max-len=50 --out ./lora-pub.yml
```

Optionally publish to TTN network server from CLI:
```
tg-lrx2-pub --host ./ttn-app.yml --dl-msg ./lora-pub.yml device-id
```

Example credential file:
```
# ttn-app.yml
app-id: "ttn-tag-demo@ttn"
host: "eu1.cloud.thethings.industries"
port: 1883
user: "ttn-tag-demo@ttn"
password: "NNSXS.5G..."
```

See https://help.mikrotik.com/docs/spaces/UM/pages/181338171/TG-LR for more details.

