Skip to content

HomeGenie, the programmable automation intelligence

License

genielabs/HomeGenie

HomeGenie Logo

HomeGenie

The Programmable Automation Intelligence
www.homegenie.it

Build Status Latest Release License

HomeGenie is a versatile, open-source home automation platform written in .NET. Designed for tinkerers, developers, and DIY enthusiasts, it provides a powerful, server-centric solution that runs on a wide range of hardware, from a Raspberry Pi to a dedicated home server.

With its robust scripting engine and extensive hardware support, HomeGenie offers the freedom to create complex automation scenarios and integrate a vast array of devices, all while ensuring your data and logic remain securely within your own network.

HomeGenie Dashboard

✨ Key Features

  • Wide Protocol Support: Integrated drivers for X10, Z-Wave, ZigBee, GPIO, SPI, I2C, and more.
  • 100% Offline & Private: Works completely offline without relying on any external cloud service. Your data, your rules, your home.
  • Powerful Scripting Engine: Automate anything with a fluent API programmable in C#, JavaScript, and Python.
  • Advanced Scheduler: Supports extended cron expressions with variables, conditions, and logical operators for time-based automations.
  • Customizable Dashboard & Widgets: A modern, responsive UI with a powerful built-in editor to create and customize your own widgets using HTML, JavaScript, and CSS.
  • Visual Programming: Create complex scenarios in an intuitive way with the Visual Programming workspace—no coding skills required.
  • Voice Control: Integrated support for voice and text-message-based commands.
  • Extensible: Features groups, configuration backup, a package repository, and much more.

Documentation

For detailed guides, API references, and tutorials, visit the official documentation website:
https://genielabs.github.io/HomeGenie

Ask DeepWiki

💾 Installation

You can find the latest release assets on the GitHub Releases page.

Download the .zip archive corresponding to your operating system and architecture:

Platform Archive Name
Windows (x64) homegenie_*_win-x64.zip
macOS (x64) homegenie_*_osx-x64.zip
Linux (x64) homegenie_*_linux-x64.zip
Raspberry Pi (32-bit) homegenie_*_linux-arm.zip
Raspberry Pi (64-bit) homegenie_*_linux-arm64.zip
.NET Framework 4.7.2 homegenie_*_net472.zip

After downloading, unzip the archive. A new homegenie folder will be created.

Running from a Terminal

Navigate to the homegenie directory and execute the HomeGenie command:

cd homegenie
./HomeGenie

To stop the application, press CTRL + C.

Running as a System Service

HomeGenie can be run directly from a terminal for easy setup and testing, or installed as a system service for continuous, unattended operation.

Linux (systemd)

  1. (Recommended) Create a dedicated user for the service and move the application files:

    # Create a new system user named 'homegenie' with its home directory
    sudo useradd -r -m -s /bin/false homegenie
    
    # Copy the application files into the new home directory
    # Assumes you are in the directory where you extracted the zip
    sudo cp -ar ./homegenie/* /home/homegenie/
    
    # Ensure the ownership of all files is correct
    sudo chown -R homegenie:homegenie /home/homegenie
  2. Create a service definition file at /etc/systemd/system/homegenie.service:

    [Unit]
    Description=HomeGenie Automation Server
    After=network.target
    
    [Service]
    Type=notify
    User=homegenie
    Group=homegenie
    WorkingDirectory=/home/homegenie/
    ExecStart=/home/homegenie/HomeGenie
    Restart=on-failure
    RestartSec=15s
    
    [Install]
    WantedBy=multi-user.target
  3. Reload the systemd daemon, then start and enable the service:

    sudo systemctl daemon-reload
    sudo systemctl start homegenie.service
    sudo systemctl enable homegenie.service

    You can check the service status with sudo systemctl status homegenie.service.

Windows

HomeGenie can be installed as a Windows Service using the built-in commands. Open a Command Prompt as an Administrator, navigate to the homegenie directory, and run:

HomeGenie.exe --service install
HomeGenie.exe --service start

For more options, see the official .NET documentation.

Accessing the UI

Once running, the HomeGenie user interface can be accessed from any web browser at: http://<server_ip>:<port>/

  • <server_ip> is the IP address of the machine running HomeGenie.
  • The default <port> is 80, or the first available port starting from 8080.

You can find the exact address and port used by checking the serviceaddress.txt file in the homegenie application folder.

🛠️ Post-Installation (Linux)

To grant HomeGenie access to hardware like serial ports, USB devices, and GPIO, you may need to run additional commands.

Audio & Voice Synthesis

# For audio playback
sudo apt install alsa-utils lame
# For embedded text-to-speech
sudo apt install libttspico-utils

Serial Port & GPIO Access

Add the homegenie user to the dialout and gpio groups:

sudo usermod -a -G dialout homegenie
sudo usermod -a -G gpio homegenie

X10 (CM15/CM19) USB Controller

  1. Install the required library:
    sudo apt install libusb-1.0-0
  2. Create a udev rule to grant access. Create the file /etc/udev/rules.d/98-homegenie.rules with the following content:
    # CM15 and CM19 X10 USB controllers
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bc7", ATTRS{idProduct}=="0001", MODE="0660", GROUP="dialout"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bc7", ATTRS{idProduct}=="0002", MODE="0660", GROUP="dialout"
    
  3. Reload the udev rules and reconnect the device:
    sudo udevadm control --reload-rules && sudo udevadm trigger

💻 Development

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md file for guidelines.

Repository Structure

The main solution file is HomeGenie.sln located in the repository root.

  • src/HomeGenie: The main application project, multi-targeted for .NET Framework 4.7.2 and modern .NET (6.0+).
  • src/HomeGenie.Tests: Unit and integration tests.
  • src/SupportLibraries: Utility libraries used by HomeGenie.
  • assets/: Contains build assets, UI source code, and deployment scripts.

Related Projects


Disclaimer

This software is provided "as is", without warranty of any kind. See the LICENSE file for more details.