Skip to content

Extensions system

Feelfree (Filip) edited this page Sep 30, 2021 · 12 revisions

With 1.0.0 release, octo4a added support for additional "Extensions" - extra scripts running in the Linux environment, that add additional functionalities to octo4a.

Implementing an extension

Each extension resides in extensions folder inside the octo4a installation (Android/data/com.octo4a) and contains the following:

  • manifest.json - a json file containing the "description" and "title" field.
  • start.sh - a bash script that starts a given extension and blocks thread until finished.
  • kill.sh - a bash script that stops execution of process ran with start.sh.

Each of the properly defined extensions will be displayed in the "Extensions" tab of octo4a. After manually enabling an extension, the app will start them along with OctoPrint run.

For ease of extension installation, a simple one-run installation script can be made. Take a look at the Klipper installation script as an example.

extension tab

Built-in extensions

Web terminal (ttyd)

Octo4a is bundled with a web terminal extension utilizing ttyd, which allows for easy access to the underlying shell without a separate ssh client. By default, it runs on port 5002, with user "root" and SSH credentials (Fallbacks to "octoprint" when not defined)

Supported extensions

Klipper

Klipper support comes as an experimental extension for octo4a. To install it, please run:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-klipper.sh)"

From SSH or the "Web terminal". This will guide you through Klipper installation. After a successful install, and restarting of the app, the Klipper extension should show up in octo4a.

Please note that Klipper ran in octo4a does not support flashing the board's microcontroller. Please handle the actual flashing of Klipper software through a different machine / computer. After the Klipper software is initially flashed on a target board, it will work fine with the app.