Skip to content

Latest commit

 

History

History
112 lines (89 loc) · 4.8 KB

README.md

File metadata and controls

112 lines (89 loc) · 4.8 KB

Genius SW-HF5.1 3000 - Remote Control

SwartNinja logo

GitHub code size in bytes Coveralls github branch Travis (.org) branch

genius-swhf51-3000 is a NodeJS app that creates a web interface & RESTful API for the LIRC project. It uses lirc_node to handle communication between LIRC and NodeJS.

This project is very much a simplified version of lirc_web.

This project allows you to control the Genius SW-HF5.1 3000 speaker system from any web browser. The RESTful API allows you to integrate the remote control functionality into home automation hubs like Home Assistant.

Table of Contents

Background

I installed an old Genius SW-HF5.1 3000 speaker system in my "Man Cave". Thought it would be nice to have a bit better sound when playing Xbox or watching a movie. It ended up never being used because I lost the remote (yes I'm lazy, lol). I had a Raspberry Pi laying around so I decided to install Volumio and turn my old Genius SW-HF5.1 3000 into a "Smart" speaker, allowing integration into Home Assistant and a stand-alone remote control UI for guests.

Screenshots

Installation

Clone the application and install dependancies.

$ git clone git@github.com:DickSwart/genius-swhf51-3000.git
$ cd genius-swhf51-3000
$ npm install

Usage

# Run application production
$ npm start

# Run application development
$ npm run start-dev

Viewing

Accessing the remote web-ui, open a browser and navigate to http://SERVER:8080/, to access the Swagger (api documentation) navigate to http://SERVER:8080/api/docs.

Home Assistant

Home Assistant Buttons

Add a rest command to the configuration.yaml and then in lovelace use "Button Card" for the buttons.

Full examples can be found in the extras folder of this repo.

# file: /extras/hass/rest_command.yaml
rest_command:
  genius_swhf51_3000_command:
    url: http://xxx.xxx.xxx.xxx:8080/api/v1/remote/{{command}}
    method: POST
# file: /extras/hass/ui-lovelace.yaml
type: "custom:button-card"
name: "Power"
icon: mdi:power
show_icon: true
show_name: false
tap_action:
  action: call-service
  service: rest_command.genius_swhf51_3000_command
  service_data:
    command: POWER

Credits

License

MIT License

Copyright (c) 2019 Dick Swart dick@swart.ninja

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.