I have wanted a PDU with per-port metering for a long time but have never found anything for a price I'd be willing to pay (< $250). I recently came across a category of WiFi based home automation devices that are supported by an open source firmware that I decided to kludge together into a DYI PDU.
The device I selected is a generic Chinese XS-SSA05 which can be had for around $12 each. I managed to find 8 for $5 each so there may be deals to be had. The device provides the switching of one outlet, power monitoring for the outlet, a bi-color LED (blue & red), and a button.
With a little work, these can be loaded with the open-source firmware Tasmota. The firmware allows the device to be operated locally, without any external services. I wasn't at all interested in these connecting back to the PRC mothership so I didn't even bother powering them up before loading the Tasmota firmware.
The Tasmota firmware offers up a web management interface and acts as an MQTT client. So, to create my DYI per-port metered PDU, I loaded up my 8 XS-SSA05s with a customized Tasmota firmware, pointed them at my MQTT broker, and threw together a simple web UI.
The firmware lights the blue LED when the relay is on, as indicated by the blue boxes above. I am coloring the power (Watts) indicator with green when power is above 10W, yellow between 1-10W, and no color if below 1W. The host "Foo" above is not running but the BMC is drawing a small amount of power. So, it's colored yellow to indicate that there is load present but it's a small load.
With a glance it is easy to tell which ports have power applied, which have loads attached and the power consumed by those loads.
Another handy capability is turning on/off the red LED to identify ports. The red and blue LEDs share a diffuser so there are effectively four states: off, red, blue, purple. So, tap the blue box to make the LED go purple then hunt for the port with the purple LED instead of tracing power cables from end to end.
Caveats... there's always something...
Overall, I'm happy with how this turned out. I'd still prefer to have a proper zero-U PDU with per-port metering but this'll do.
The device I selected is a generic Chinese XS-SSA05 which can be had for around $12 each. I managed to find 8 for $5 each so there may be deals to be had. The device provides the switching of one outlet, power monitoring for the outlet, a bi-color LED (blue & red), and a button.
With a little work, these can be loaded with the open-source firmware Tasmota. The firmware allows the device to be operated locally, without any external services. I wasn't at all interested in these connecting back to the PRC mothership so I didn't even bother powering them up before loading the Tasmota firmware.
The Tasmota firmware offers up a web management interface and acts as an MQTT client. So, to create my DYI per-port metered PDU, I loaded up my 8 XS-SSA05s with a customized Tasmota firmware, pointed them at my MQTT broker, and threw together a simple web UI.
The firmware lights the blue LED when the relay is on, as indicated by the blue boxes above. I am coloring the power (Watts) indicator with green when power is above 10W, yellow between 1-10W, and no color if below 1W. The host "Foo" above is not running but the BMC is drawing a small amount of power. So, it's colored yellow to indicate that there is load present but it's a small load.
With a glance it is easy to tell which ports have power applied, which have loads attached and the power consumed by those loads.
Another handy capability is turning on/off the red LED to identify ports. The red and blue LEDs share a diffuser so there are effectively four states: off, red, blue, purple. So, tap the blue box to make the LED go purple then hunt for the port with the purple LED instead of tracing power cables from end to end.
Caveats... there's always something...
- The XS-SSA05s were either ultrasonically welded or glued together. It took some force to pop the shell apart and there was some damage, but nothing a little epoxy couldn't fix.
- The PCB had to be desoldered from the power pins in order to be freed from the shell.
- The PCB had only pads for vcc, tx, tx, gnd, and gpio0 so I had to solder wires to the boards in order to program the firmware.
- The MCU (ESP8266) puts the GPIO pin used to control the relay in high-impedance mode during reset. This causes a split second of power loss for the load. Unfortunately, the Tasmota firmware will reset when certain configuration options are changed. You are motivated to "set it and forget it™."
- The calibration of the power metering is insufficient. The response is not linear but the Tasmota firmware assumes that it is. I calibrated using a 100W incandescent light bulb and a Kill-a-Watt and found that power readings were about 5% high at 30W and about 10% low at 1400W. Power levels below 10W are probably not very accurate.
- Communication is over WiFi. I put mine on an SSID on a VLAN so I could isolate them. It works better than I thought but I still don't like the idea of dozens of WiFi devices like this buzzing around.
- The OOTB Tasmota firmware does not use TLS when connecting to the MQTT broker. The firmware is very easy to mod (there are great instructions) and loading a custom firmware isn't a big deal but still, not an OOTB experience.
Overall, I'm happy with how this turned out. I'd still prefer to have a proper zero-U PDU with per-port metering but this'll do.