Compute
Hopit enables edge computing using Python to perform calculations on source signals. Additionally, new signals can be created through computation. One Python script can be executed for each route.
First, install your preferred Python version from the official Python website. Then, navigate to the Settings page and manually configure the Python DLL if it cannot be detected automatically.

Restarting Python​
After Python has loaded, switching the Router off and on reuses that Python runtime. To use a different Python DLL, save the setting and restart hopit Edge. If Python failed to load, correct the configuration and restart hopit Edge before trying again, even with the same DLL.
Routes with Compute enabled remain blocked while Python cannot be initialized; routes without Compute continue to run. The log explains when a restart is required.
Editing scripts​
Compute scripts follow the Routes editing and save controls. If a script cannot be saved, the page names it and keeps its changes for another save attempt.
Once the Python settings are configured, you can start writing a Python script for any route by opening the Python editor.

You can then edit the Python script as demonstrated in the comments of the example. Each script must define the function:
compute(signals, time: datetime, period: timedelta)
This function is triggered at each scrape interval. The arguments passed to it are:
signals: a dictionary containing the current signal values,time: the current timestamp,period: the time elapsed since the last function call.
You can access and modify individual signals using dictionary-style syntax: signals["<<SIGNAL_NAME>>"].
The initialization function setup() is called once before the first compute call and can be used to initialize the global state, load configurations, or prepare external resources.
Logging from the Python script to hopit's Log can be done using these functions for the respective log levels:
log.trace(message)log.debug(message)log.info(message)log.warning(message)log.error(message)log.critical(message)