Getting Started With Lua Telemetry Scripts

      Comments Off on Getting Started With Lua Telemetry Scripts

OpenTX Lua Telemetry Scripts


What Is A Telemetry script

  1. Access telemetry data
  2. Displays customized telemetry screens
  3. Process telemetry data (telemetry calculations)
  4. Up to 3 active scripts per model
  5. Selected from the telemetry screen settings
  6. Can be used by different models (with caution)
  7. Can be used to display non-telemetry data such a the Tx timer
  8. Telemetry scripts are also know as LCD and background scripts because they are placed in the TELEMETRY folder and may or may not
    • Use telemetry information
    • Display on the LCD screen
    • Run in the background

OpenTX Firmware

  • All versions of the OpenTX firmware that run on FrSKY transmitters have telemetry scripts enabled
  • The Lua build option is not required

Telemetry Script File Location

  1. Transmitter
    SD Card copy on your computer > /SCRIPTS/TELEMETRY/<name>.lua
  2. <name> 6 or less characters plus .lua

Telemetry Available

  1. Companion > Open a model that has Telemetry from the receiver
  2. Select the Telemetry tab
  3. Take note of the sensor names
  4. For this example we will use RxBt

Sample Script Setup

  1. Download these files
  2. Place the .otx file anywhere on your computer
  3. Place the .lua in SD Card copy on your computer > /SCRIPTS/TELEMETRY/
    and on the transmitter SD Card > /SCRIPTS/TELEMETRY/
  4. Open the file in a text editor to review the default settings and edit it as required. In this example we will check that the script is using “RxBt”.

Add A Lua Script To Telemetry Screen

  1. Companion > Open a model that has Telemetry
  2. Select the “Telemetry” tab
  3. Scroll to the bottom and select a “Telemetry screen”
  4. “Custom Screen Type” select “Script” and then “RxBt”
  5. If “RxBt” is not present close model editing window and open it up again.

Running & Testing A Lua Script In Companion

  1. Companion > Select a model that has telemetry
  2. Right Click > Select “Simulate”
  3. Select “Taranis Simulator” (or your Tx equivalent)Simulator
  4. Long press PAGE
  5. If you don’t see the screen with the new script output press PAGE briefly, repeat till you do.
  6. Select “P4 – Telemetry Simulator”
  7. Locate “RxBt” and then the box near it that has the value being displayed on the telemetry screen. Change the value and watch the screen change.

Running The Script On The Tx

  1. Write models and settings to the transmitter
  2. Start up the Tx and aircraft like you usually would
  3. Long press PAGE
  4. If you don’t see the screen with the new script output press PAGE briefly, repeat till you do.