CLI tool to control your IoT gadgets.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
E. Almqvist 74a7ffc582
Bug fix
4 years ago
modules Fixed indentation 4 years ago
.gitignore Added environments and added more byte-compiled files to .gitignore 4 years ago
CONTRIBUTING.md Update CONTRIBUTING.md 4 years ago
LICENSE Added license 4 years ago
README.md Merge branch 'master' of github.com:E-Almqvist/roomcomputer 4 years ago
default-config.json Updated the default config 4 years ago
default-presets.json Bug fix 4 years ago
hue_cmd.py Finished speech daemon 4 years ago
install.sh Install script fix 4 years ago
requirements.txt Added PyAudio to requirements 4 years ago
setup.sh Error message 4 years ago
speech_daemon.py Added error/what handeling 4 years ago

README.md

Room-Computer

Room-Computer is a simple room controller and is basically a controller for your gadgets. This is a work-in-progress so keep in mind that more features will be added in the future. Check the feature list to view all of the current supported things and stuff.

Installation

git clone https://github.com/E-Almqvist/roomcomputer.git
pip install -r requirements.txt

Then run the installation script ./install.sh. This script will make a symlink to /opt/roomcomputer and link hue_cmd.py to /usr/bin/hue.

Getting started

BEFORE YOU DO ANYTHING!: Register a new application and user for your HUE bridge. Follow this guide to get started.

Run the setup.sh script (if you did not run the install script) in order to copy the necessary files to ~/.config/roomcomputer/. If you are planning to create a service for the speech_daemon.py with systemd; then you can specify its configuration file as the first argument: speech_daemon.py /path/to/config/config.json.



Usage

HUE Light presets

You can create presets in the ~/.config/roomcomputer/presets.json file. Follow this syntax (and JSON syntax of course):

{
	"mypreset": {
		"color": [178, 199, 255],
		"brightness": 100
	},
}

The color is in RGB format (8bit) and brightness is also 0-255 (8bit).

HUE Remote

--Help page--
'hue' : Display this help page
'hue light (index)' ... : Specify light target, from 1-3
'hue lights' ... : Specify all lights

--Commands--
'on'/'off' : Turn light(s) on/off
'switch' : Switch the light(s) power
'set ...'
	'preset (preset ID)' : Set the preset (from presets.py)
	'color (red) (green) (blue)' : Set the color, from 0-255
	'brightness (brightness)' : Set the brightness, from 0-255

Examples:
'hue light 2 on' : Turn on light 2
'hue lights set color 255 255 255' : Set all lights colors to white

For convenience, you can create an alias for the script file. Append this to your shells rc file: alias hue="/path/to/the/cloned/repo/hue_cmd.py"

Features

  • HUE Light Controller (command-line) hue_cmd.py
  • HUE Light Controller (voice daemon) speech_daemon.py

And more to come!