Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.directenergypartners.com/llms.txt

Use this file to discover all available pages before exploring further.

The custom application can be run on various platforms, including your local machine (laptop or desktop), external devices such as a Raspberry Pi, or a virtual machine. It can also be executed directly on the PPL controller. This guide provides instructions on running the application on your local machine.
It is recommended to run your custom application on a local machine first. This approach allows you to test and troubleshoot the newly developed application. Once testing is complete, the application can then be transferred to the Power Platform controller for execution.
Follow the steps below to run the custom application on your local machine. The instructions assume that a code editor is open and the dep-ppl-app repository is loaded.
1

Write Your Application

Open the app/main.py file in the repository and implement your custom application logic. This is the main entry point for your application. See the Main Script section for more details on how to structure your code.
2

Update the .env File

Open the .env file in the root of the repository and update the following values:
  • IP_ADDRESS — the IP address of the controller.
  • NATS_USERNAME — the username for the NATS client connection.
  • NATS_PASSWORD — the password for the NATS client connection.
The username and password for the NATS connection should match the credentials specified in the config.json file on the controller under the nats local section.
3

Install Dependencies

Make sure all required Python dependencies are installed. Open a terminal in the repository folder and run:
pip install -r requirements.txt
4

Run the Application

Open a terminal in the repository folder and run the application with:
python -m app
This will start the main Python application defined in the app folder.