Skip to content

Luxxy-GF/discord-ilo4-bot

Repository files navigation

Discord ilo - A Discord bot for ILO

This bot is designed to help you manage your ILO server.

How it works

The bot uses the ILO API to communicate with the server. It sends a request to the ILO server every 5 seconds to get the power status, temperature, fan speed, and power usage. The bot also stores the power usage in a MySQL database to create a power usage chart.

Issues and feature requests

If you have any issues or feature requests, please create an issue on the issues page

Photos

image

Features

  • Power on
  • Power off
  • Power reset
  • Power status
  • Get the temperature
  • Get the fan speed
  • Get the power usage
  • Get the server health

Requirements

  • Node.js (v16.6.0 or higher)
  • MySql Server (For the power charts)

Installation

  1. Clone the repository
  2. Install the requirements
  3. Create a .env file with the following content:
DISCORD_TOKEN=your_discord_token
ILO_HOST=your_ilo_host
ILO_USER=your_ilo_user
ILO_PASSWORD=your_ilo_password
DB_HOST=your_db_host
DB_USER=your_db_user
DB_PASS=your_db_password
DB_NAME=your_db_name
  1. Run the bot
node index.js

Docker Installation

docker run -d --name discord-ilo \
    -e DISCORD_TOKEN=your_discord_token \
    -e ILO_HOST=your_ilo_host \
    -e ILO_USER=your_ilo_user \
    -e ILO_PASSWORD=your_ilo_password \
    -e DB_HOST=your_db_host \
    -e DB_USER=your_db_user \
    -e DB_PASS=your_db_password \
    -e DB_NAME=your_db_name \
    --restart unless-stopped \
    ghcr.io/luxxy-gf/discord-ilo-bot:latest

or use the docker-compose file

version: '3.7'
services:
  discord-ilo:
    image: ghcr.io/luxxy-gf/discord-ilo-bot:latest
    container_name: discord-ilo
    environment:
      - DISCORD_TOKEN=your_discord_token
      - ILO_HOST=your_ilo_host
      - ILO_USER=your_ilo_user
      - ILO_PASSWORD=your_ilo_password
      - DB_HOST=your_db_host
      - DB_USER=your_db_user
      - DB_PASS=your_db_password
      - DB_NAME=your_db_name
    restart: unless-stopped

Usage

  • !status - Get the power status of the server
  • !start - Power on the server
  • !stop - Power off the server

License

This project is licensed under the MIT License - see the LICENSE file for details

Bugs

  • Fix the bug where the bot crashes when the ILO server is not reachable
  • Maybe the bot adding to much data to the database as it queries the ILO server every 5 seconds

About

Discord ilo4 bot for hp ilo power actions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published