HomeAssistant Add-Ons

From OISecWiki

Home Assistant Tools Repository

The Home Assistant Tools repository is a collection of custom tools and integrations designed to enhance the functionality of Home Assistant, an open-source home automation platform. Hosted on Gitea at https://gitea.oisec.net/cliff/homeassistant-tools, this repository provides utilities primarily focused on power monitoring and management for specific hardware devices. As of January 15, 2026, the repository contains a custom Home Assistant component for Cisco SB350 PoE switches and a Python script for Supermicro server power monitoring.[1]

Cisco SB350 PoE Custom Component

The custom_components/cisco_sb350_poe directory houses a Home Assistant integration for monitoring Power over Ethernet (PoE) on Cisco Small Business 350 Series switches.[2] This component allows users to poll power usage data and integrate it into Home Assistant for automation and monitoring purposes.

Installation and Usage Example

To install this custom component:

  1. Download the repository from Gitea.
  2. Copy the cisco_sb350_poe folder into your Home Assistant's custom_components directory.
  3. Restart Home Assistant.
  4. Add the integration via the Home Assistant UI under Integrations > Add Integration, searching for "Cisco SB350 PoE".

Example configuration in configuration.yaml (if manual setup is needed):

cisco_sb350_poe:
  host: '192.168.1.1'
  community: 'public'  # SNMP community string

Once set up, you can create automations, such as notifying if PoE power exceeds a threshold:

automation:

 - alias: High PoE Power Alert
   trigger:
     - platform: numeric_state
       entity_id: sensor.cisco_sb350_poe_power
       above: 100
   action:
     - service: notify.mobile_app
       data:
         message: "PoE power usage is high!"

This example assumes the sensor entity provides power in watts; adjust based on actual entity attributes.[3]

Supermicro Power Monitoring Script

The supermicro-power.py script is a standalone Python tool for querying power usage from Supermicro servers via their Baseboard Management Controller (BMC) using the Redfish API.[4] It publishes the data to an MQTT broker, making it suitable for integration with Home Assistant or other MQTT-enabled systems. The script can be downloaded directly from the repository.[5]

Script Functionality

The script performs the following:

  • Imports necessary libraries: requests, json, paho.mqtt.client, time.
  • Uses a credentials module (not included) for MQTT host and BMC credentials.
  • For each configured BMC:
 * Sends a GET request to the Redfish endpoint /redfish/v1/Chassis/1/Power.
 * Extracts total power consumption and per-PSU (Power Supply Unit) metrics.
 * Publishes values to MQTT topics like supermicro/<bmc>/power/total/watt and per-PSU topics.
  • Handles SSL verification (disabled) and basic authentication.

Usage Example

To use the script:

  1. Create a credentials.py file with:
mqtt_host = 'your.mqtt.broker.ip'
supermicro_bmc = {
    'bmc1.example.com': {'username': 'ADMIN', 'password': 'password'},
    # Add more BMCs as needed
}
  1. Run the script: python3 supermicro-power.py

In Home Assistant, subscribe to the MQTT topics using the MQTT integration to create sensors:[6]

mqtt:
  sensor:
    - name: "Supermicro Total Power"
      state_topic: "supermicro/bmc1.example.com/power/total/watt"
      unit_of_measurement: "W"

This allows for dashboard visualizations or automations based on power usage.

  1. homeassistant-tools on Gitea. Accessed 2026-01-15.
  2. Cisco Business 350 Series Managed Switches. Cisco. Accessed 2026-01-15.
  3. Automations in Home Assistant. Home Assistant. Accessed 2026-01-15.
  4. Redfish Standard. DMTF. Accessed 2026-01-15.
  5. supermicro-power.py on Gitea. Accessed 2026-01-15.
  6. MQTT Integration. Home Assistant. Accessed 2026-01-15.