The configuration file is essential for the proper functioning of the controller, as it includes important settings related to its communication interfaces, such as MQTT, Telegram, and NATS. Specifically, the configuration file must include four required entries, which need to be configured for each controller. These entries are:
plcnext
mqtt
telegram
nats
Below, we will provide detailed information on each entry, including the required parameters and any optional ones. The configuration file can be found in the /etc folder of the ppl-base repository and is listed as config.json.
This is the IP address of the controller. It should always be configured to the controller’s current IP address, as it is used to create sockets.Example:192.168.1.10
Though these parameters are not required for the controller to operate, it is good practice to include them in the configuration file to avoid losing track of login credentials.
This is the IP address of the broker. The broker is hosted on the Power Platform controller itself, so this should always be the controller’s IP address.Example:192.168.1.10
Telegram is preconfigured in the config file to enable notifications and alerts. These include livebit messages every 24 hours and alerts for critical device failures in the system. If the customer does not wish to receive updates via Telegram, they simply need to remove this entry from the config file.
A token consisting of letters and numbers, required for authorizing the bot and sending requests to the Bot API. The Bot API is already added to the Telegram channel.Example:123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ
The required parameters are used to set up a local NATS server on the controller. This NATS server is used to integrate with custom applications developed by the customer.
The required parameters are used to set up a local NATS server on the controller. This NATS server is used to integrate with custom applications developed by the customer.
The optional parameters are used for setting up a NATS connection to the cloud, which hosts a database for storing data. By providing these parameters, the controller can periodically push data to the cloud.
The optional parameters are used for setting up a NATS connection to the cloud, which hosts a database for storing data. By providing these parameters, the controller can periodically push data to the cloud.