Eaton ePDU - eSWA03
PDU installation and control in home assistant

I picked up an old PDU with a server rack. A PDU is simply bunch of power outlets which can be monitored and controlled remotely. It's mounted in the rack vertically up the side. This one has 24 outlets.
Investigation
This was a previously used PDU. As this device was assigned a static IP I needed to find it out using the LCD and directly connect to it with my PC. I couldn't connect over the network due to ip device range issued with my network. I connected the cable directly to my PC and setup my eth to match it's network config.
Once I accessed the web interface I would reset the network management device to defaults and change to dynamic IP (which I assigned from my Unifi Device). The default user/pass worked (admin/admin).
Firmware update?
Second part of the fun is finding out that this device needs to be set into a "Firmware mode" where the web interface dies. You then can connect to it using FTP and upload the new firmware files. Since my firmware version was quite old there was no option to upload the firmware through the browser.
You can enable the "firmware mode" from the web interface or by using a telnet connection and selecting it in the menu. You can then FTP directly to the device and upload files with either FTP from command prompt or using an ftp client.


If all works... after you've uploaded the new firmware it will automatically install and restart.
This did not work for me and it kept failing at a certain point which made me think there was memory issues. I could not find a workaround so were stuck here. Everything else seems to work so I'll come back to this later if I really need... probably not though.
Home Assistant Integration
I found a project on github which can connect to the device using SNMP: https://github.com/jaroschek/home-assistant-eaton-epdu
It was quite simple and didnt have functionality to turn on/off the plugs.
With testing in ha config i have managed to create a template for controlling this but it has issues and causes the integration to fail intermittently. I am working on modifying the code to make this automatic but it's not the highest pritority.

Code time
Because Eaton use a different snmp command for on and off we needed to split this into 2 switches and control them with a template switch. See my code below for home assistant. This is just testing phase and hopefully I can make this automated.
switch:
- platform: snmp
name: Custom ePDU Outlet A2 Power On
host: 192.168.1.15
community: private
version: "1"
baseoid: 1.3.6.1.4.1.534.6.6.7.6.6.1.2.0.2
command_oid: 1.3.6.1.4.1.534.6.6.7.6.6.1.4.0.2
payload_on: 1 #turns power on
payload_off: 0 #does nothing
vartype: Integer
- platform: snmp
name: Custom ePDU Outlet A2 Power Off
host: 192.168.1.15
community: private
version: "1"
baseoid: 1.3.6.1.4.1.534.6.6.7.6.6.1.2.0.2
command_oid: 1.3.6.1.4.1.534.6.6.7.6.6.1.3.0.2
payload_on: 1 #turns power off
payload_off: 0 #does nothing
vartype: Integer
- platform: template
switches:
custom_epdu_outlet_a2:
friendly_name: Custom ePDU Outlet A2
unique_id: 4a3e9d9c-73f9-4db5-89b5-aaaaaaaaaA02
value_template: "{{ is_state('switch.custom_epdu_outlet_a2_power_on', 'on') }}"
turn_on:
service: switch.turn_on
target:
entity_id: switch.custom_epdu_outlet_a2_power_on
turn_off:
service: switch.turn_off
target:
entity_id: switch.custom_epdu_outlet_a2_power_off
icon_template: >-
{% if is_state('switch.custom_epdu_outlet_a2_power_on', 'on') %}
mdi:power-plug
{% else %}
mdi:power-plug-off
{% endif %}