Configuring the UPS software

The service upsservice-bhf is used to monitor and control a Beckhoff UPS of the CU81xx series, which is connected to the industrial PC via USB. The service ensures reliable energy management and an orderly shutdown of the system in the event of power failures and protects the battery status of the UPS through intelligent monitoring and control.

After starting, the service automatically recognizes a compatible UPS. The service is hot-pluggable: A compatible UPS can also be connected after the service has started. In the standard configuration, the device is shut down after 40 seconds in the event of a power failure; the UPS is then switched off after 3 minutes. The configuration is carried out via the file /etc/upsservice-bhf.conf

1. Use the following command to check whether the upsservice-bhf service has already been started:
sudo systemctl status upsservice-bhf
2. Connect a compatible Beckhoff UPS, for example CU8110-0120, CU8130-0120 or CU8130-0240 to the industrial PC. The service automatically recognizes the UPS, even if it is already running.
3. Open the file /etc/upsservice-bhf.conf and check the default values and change the values depending on the requirements:
sudo nano 
4. The output of the configuration file looks as follows by default:
## upsservice-bhf.conf ##
Manufacturer Beckhoff
Model Beckhoff_USB_UPS
Interface Beckhoff_USB_UPS
ShutdownOnBatteryEnable 1
ShutdownOnBatteryWait 40
TurnUpsOffEnable 1
TurnUpsOffWait 180
ReplaceNotifyEnable 0
ReplaceNotifyWait 60
5. Fix whether an automatic shutdown should take place:
Set ShutdownOnBatteryEnable to 1 (active) or 0 (inactive).
6. Set the delay until shutdown:
Set ShutdownOnBatteryWait to the desired number of seconds (e.g. 40).
7. Decide whether the UPS should be switched off after the system shutdown:
Set TurnUpsOffEnable to 1 (UPS is switched off) or 0 (UPS remains switched on).
8. Set the delay until the UPS is switched off:
Set TurnUpsOffWait to the desired number of seconds (e.g. 180).
Save the file. Once the system shutdown is complete, the UPS is switched off after the set delay.

Configure notifications for battery replacement

1. Open /etc/upsservice-bhf.conf with an editor.
sudo nano /etc/upsservice-bhf.conf
2. Activate or deactivate the notifications:
Set ReplaceNotifyEnable to 1 (active) or 0 (inactive).
3. Set the time period until the notification:
Set ReplaceNotifyWait to the desired number of months (e.g. 60).
Save the file. If this function is activated, the service displays battery change notifications on the terminals of all users currently logged in.