Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taskbulb

A small Rust application for controlling a smart light through a Home Assistant instance from a Windows taskbar notification-area (system tray) icon

Taskbulb is designed to control a room's light without popups or web technologies, keeping the experience unintrusive

A screenshot: image

Requirements

  • A running Home Assistant instance with a light entity
  • The Rust toolchain, including Cargo
  • Windows for the full feature set, including the taskbar controls and global mouse-wheel shortcuts. (basic toggling is the only fully cross platform feature)

Building

  1. Clone the repository:

    git clone https://github.com/BenMcAvoy/Taskbulb.git
    cd Taskbulb
    
  2. Build the release executable:

    cargo build --release -j 4
    

    The executable will be created at ./target/release/taskbulb.exe on Windows. The file extension is platform-dependent

Configuration

  1. Copy .env.example to .env

  2. Fill in the following values:

    Variable Description
    HA_BASE_URL The base URL of your Home Assistant instance, without a trailing slash (for example, http://homeassistant.local:8123)
    HA_TOKEN A long-lived access token created from your Home Assistant user profile's Security tab in the website
    HA_ENTITY_ID The light's entity ID, e.g. light.bedroom, from Home Assistant's entities list on the website
  3. Run the executable:

    .\target\release\taskbulb.exe
    

Usage

Shortcut Action
Scroll Adjust value
Shift+Scroll Adjust brightness on all DDC/CI monitors
Ctrl+Scroll Adjust hue (0-255)
Alt+Scroll Adjust saturation
Middle-click Reset hue and saturation to 0

Windows startup

To start Taskbulb automatically when the current Windows user signs in:

  1. Create an install directory, for example %LOCALAPPDATA%\Taskbulb.
  2. Copy target\release\taskbulb.exe and .env into that directory. The .env file must be beside the executable.
  3. Open the per-user Startup folder by pressing Win+R, entering shell:startup, and pressing Enter.
  4. Create a shortcut named Taskbulb in that folder. Set its target to the installed taskbulb.exe and its Start in / working directory to the install directory.

Only the shortcut should be placed in the Startup folder; keep the executable and .env together in the install directory.

About

Home assistant light bulb control from the taskbar via an icon

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages