User Tools

Site Tools


IPSPi1Hb: Raspberry Pi Internet Power Switch

An Internet Power Switch (IPS) has been built for Mt Pleasant. Its main purpose is to provide remote and local control of power to a small cluster in the computer room. This can be operated from the front panel of the device or remotely via a terminal window. There are also several Remote Switches which plug into a wall socket and allow remote control of a single device via WiFi. Software on the IPS allows for control of these devices.

Hardware consists of a Raspberry Pi PC inside the IPS, connected to two relay boards for managing power switching and a custom-made circuit board primarily for managing input from front-panel buttons and displaying switch status on the panel.

Software running on the Raspberry Pi consists of four programs:

  1. A front-end program,, runs from a terminal window. Multiple instances can be run at once. It provides a user interface for monitoring and control of the rack-mounted IPS and all available Remote Switches.
  2. Behind this is which runs a MQTT server and manages input from buttons on the front panel of the IPS. The MQTT server accepts requests from and from the Remote Switches. The Remote Switches are designed to have their WiFi switched off for most of the time to keep radio interference to a minimum, but report in once per minute (or at another configurable interval). manages requests to switch this device and sends any update commands to the Remote Switch whenever it checks in on the network.
  3. Interacts with the hardware in the rack-mounted IPS. It takes commands via MQTT from and actually switches the corresponding relay. It also controls the LEDs that indicate status of the switches. The circuit board also has three temperature and humidity sensors attached and this software logs their values every minute to a SQL database.
  4. provides temperature and humidity data to MONICA on request

The Remote Switches have Arduino-compatible ESP8266 NodeMCU microcontrollers to manage a single relay switch. Each microcontroller runs software to manage the relay, WiFi connection, MQTT communication, a local button and some LEDs. When powered on it will connect to the local WiFi network if configured or start up as an access point if not, allowing a local connection for initial configuration (which is saved to non-volatile memory for next time). The software is in the Arduino directory, called RelayControl.ino.


Mount the SD card.

Enable ssh: touch /Volumes/boot/ssh

IP address: hostname: ipspihb

interface eth0 static ip_address= # /26 = netmask of static routers= static domain_name_servers=

/home/www/auscope/opswiki/data/pages/operations/rpiips.txt · Last modified: 2019/04/16 22:44 by Jim Lovell