PVTX

To add a new container or app to a Pantavisor-enabled system, you can use the pvr CLI in conjunction with the Pantavisor UI (pvtx). This guide demonstrates how to download a Docker container from Docker Hub, prepare it for a Pantavisor device, and then upload it using the local network.

1. Prerequisites

You’ll need a few things set up on your development machine before you get started:

  • Pantavisor pvr CLI: This command-line tool is essential for managing Pantavisor-enabled devices and their applications. You can download and install it from the official Pantavisor documentation.
  • Docker: You’ll also need Docker installed and running on your development machine to pull and manage container images.

2. Creating a New Pantavisor App

Here’s how to create the app package for Home Assistant using the pvr CLI:

  1. Create a working directory for your new app and navigate into it:

    mkdir device-apps
    cd device-apps
  2. Initialize a new Pantavisor project in this directory:

    pvr init
  3. Add Home Assistant from Docker Hub:

    pvr app add homeassistant --from homeassistant/home-assistant:stable --platform linux/arm64

    This command pulls the image from Docker Hub and prepares the necessary files for Pantavisor.

  4. Add the new files to your project’s revision history:

    pvr add .
  5. Commit the changes with a descriptive message:

    pvr commit -m "added homeassistant app"
  6. Export the app as a .tar.gz file:

    pvr export homeassistant.tar.gz

    This command creates a compressed archive named homeassistant.tar.gz.

3. Uploading the App to the Device

Now that you have your app package, you can upload it to your Pantavisor-enabled device using the local network and the pvtx UI.

  1. Access the Pantavisor UI. Open a web browser and navigate to http://<DEVICE_IP>:12368/app.

  2. Begin a transition. On the web page, click on “begin transition”.

  3. Upload the .tar.gz file. Simply drag and drop the homeassistant.tar.gz file you created earlier.

transction transction

  1. Commit the transaction. Follow the on-screen prompts to commit the changes.

  2. Verify the update. You can check the running apps using the serial console with lxc-ls or access Home Assistant at http://<DEVICE_IP>:8123.


Next Steps

Now that your application is running, you can: