Skip to main content

Configure shutdown via USB/Network

This method uses a USB or network connection so that IntrinsicOS can read the current state of the UPS and safely power down in the case of a power failure.

note

This feature is currently [EXPERIMENTAL] and is designed to work exclusively with single-node clusters (a single Industrial PC or IPC). When enabled, the monitoring will automatically and safely shut down the IPC when the UPS switches to battery power to prevent data loss or corruption during an outage.

Requirements

  • Compatible UPS with USB interface
  • Compatible UPS with network interface or additional network managment card
  • IPC BIOS configured to automatically power on upon power restoration as described here
  • IntrinsicOS configured to connect to a UPS and with proper shutdown delays
  • Intrinsic Inctl

Connection between UPS and IPC

If you choose to connect the UPS to the IPC via USB, use the USB cable provided by the UPS vendor to ensure compatibility and proper functionality.

For a networked setup, you need to ensure that the UPS as well as the IPC are in the same network/subnet, so the IPC can connect to the UPS.

Configure a UPS

To configure the UPS within IntrinsicOS you need to use the inctl cluster ups subcommand.

First, ensure no other UPS was configured on the system before. You can use the inctl cluster ups show command to check.

inctl cluster ups show --enable-experimental --org "<org@project>" --cluster "<node_id>"

If no UPS was configured you will see following output: No UPS configured.

Otherwise the command will provide a similiar output to this one:

driver     port
snmp-ups 192.168.2.22

Configure a UPS with USB connection

To configure a UPS connected via USB, use the inctl cluster ups enable subcommand.

    inctl cluster ups enable --enable-experimental --org "<org@project>" --cluster "<node_id>" --driver usbhid-ups

The command configures IntrinsicOS to read the UPS and battery state from the USB-connected UPS.

To verify that the configuration was applied successfully run again the inctl cluster ups show command, which should provide following output:

driver       port
usbhid-ups auto

Configure a UPS with network connection

note

This feature is currently [EXPERIMENTAL] and only supports SNMPv1 connections by default, please ensure your UPS is configured to allow SNMPv1 connections.

Similar to how to configure a UPS connected via USB you can also configure a networked UPS. To do so, run the cluster ups enable command with the --driver snmp-ups flag and --port <IP of the UPS> flag. In our example the UPS can be reached via the IP address 192.168.2.22.

inctl cluster ups enable --enable-experimental --org "<org@project>" --cluster "<node_id>" --driver snmp-ups --port 192.168.2.22

To verify that the configuration was applied successfully run again the inctl cluster ups show command, which should provide following output:

driver     port
snmp-ups 192.168.2.22

Shutdown sequence

The timing is critical to ensure the OS shuts down before the battery dies.

  1. UPS Power Loss: Utility power fails, and the UPS switches to battery.
  2. IntrinsicOS reads the UPS state: IntrinsicOS reads the UPS state and battery level from the UPS either via USB or SNMP depending on how you configured it.
  3. IPC graceful shutdown: When the UPS reports the "low battery" state, the IPC will trigger its shutdown. Before it finally powers-down it will send also a shutdown command to the UPS.
  4. UPS shutdown: After the IPC has finally shutdown, the UPS shuts down either the IPC or itself (depending on config). Combined with suitable BIOS config, this means that when the UPS restores power to the IPC, the IPC will turn on again.
note

Depending on the model of the UPS, there is the possibility of a race condition when power is restored while the IPC is shutting itself down. If the UPS fails to cycle the input power to the IPC in this case, the IPC will not restart. Make sure that you either document how to manually restart the IPC, or ensure that your UPS is properly configured to always cycle power to the IPC. This configuration depends on the specific model of the UPS.

Verification and testing

  1. Unplug the UPS from the power.
  2. Check if the IPC has properly shut down, you can verify it if no activity leds are flashing.
  3. Verify that the UPS also removed power from the outlet of the IPC or itself shutdown
  4. Apply power to the UPS
  5. Verify that the IPC started as planned and you can start you solution again