This project is a Go application that integrates with Home Assistant to synchronize media volume and control media playback through keyboard shortcuts. The Project is Mac only!
- Synchronize media volume with Home Assistant
- Control media playback (Play, Pause, Next, Previous, Mute) using keyboard shortcuts
- Interactive CLI menu for starting the program and updating configuration
-
Clone the repository:
git clone https://github.com/yourusername/volume-sync-homeassistant.git cd volume-sync-homeassistant
-
Install dependencies:
This project uses the
github.com/manifoldco/promptui
library for the CLI menu. You can install it using:go get github.com/manifoldco/promptui
-
Build the application:
go build
- Download the latest release:
-
Run the application:
Navigate to the directory where you downloaded the go-executable and run:
sudo ./HA_VolumeSync
When you run the application for the first time, it will prompt you to enter the necessary configuration details: Base URL, Auth Token, and Entity ID. This configuration will be saved to config.json
.
You can also update the configuration through the interactive CLI menu.
-
Run the application:
./volume-sync-homeassistant
-
Navigate the CLI menu:
- Start Program: Starts the volume synchronization and media control functionalities.
- Update Configuration: Allows you to update the Base URL, Auth Token, or Entity ID.
- Exit: Exits the application.
The following keyboard shortcuts are supported for media control:
- Media Mute: Mute or unmute
- Media Volume Down/Up: Decrease or increase volume
The Following Keyboard shortcuts will be supported for media control:
- Media Previous: Go to the previous track
- Media Play/Pause: Toggle play/pause
- Media Next: Go to the next track
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Commit your changes (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Create a new Pull Request
Please make sure your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.