Please note this repository has moved to imdea-control-python.
- The problem is Mechanize gem, because only works on Ruby 2.0.0. So, we decided to create another script in python.
A script to control the room blinds, temperature, lights and door at the IMDEA Software Institute.
You do not worry about this, only run 'install.sh' script.
- Ruby 2.0.0 ONLY.
- Gems:
- An account and office at the IMDEA Software Institute.
- Clone the project.
$ git clone https://github.com/svg153/imdea-controls
- Change to the folder.
$ cd imdea-controls
- Give execute permission to
install.sh
.
$ chmod +x install.sh
- Run install script. This will create an alias in
~/.aliases
to run the script in any location, so there are two install ways. ONLY RUN ONE OF THEM:
- 1º way - Normal: The blinds.rb alias will be "blinds".
$ ./install.sh
- 2º way - Custom: Give the alias by argument.
$ ./install.sh -a'aliasForTheScriptBlinds'
- Create the configuration file,
.blinds.yml
from template.
$ cp .blinds.yml.template .blinds.yml
- Edit the
.blinds.yml
with your IMDEA Software information.
username: USERNAME
password: PASSWORD
room_no: ROOM
- By default,
install.sh
saw you the help. But to see the help, type this.
$ ./blinds.rb -h
$ ./blinds.rb -h
Usage: blinds.rb [options]
-u, --username USERNAME Your USERNAME
-p, --password PASSWORD Your PASSWORD
-r, --room ROOM Set the ROOM number
-b, --blinds NUM Set the blinds to NUM
-c, --climate-control [CONTROL] Set the climate control to [:ON, :OFF]
-m, --climate-mode [MODE] Set the climate mode to [:HEAT, :COOL, :FAN_ONLY]
-f, --fan-speed SPEED Set the fan speed to [25, 50, 75, 100]
-t, --temp TEMP Set the TEMPerature
-o, --open Open the door
-w, --window LIGHT Set the window LIGHT
-d, --door LIGHT Set the door LIGHT
-l, --lights LIGHT Set all the LIGHTS
-s, --state [OBJ] See the actual OBJect control state
-v, --verbose
-a, --authors Show the authors list
-h, --help See this message
blinds.rb
looks for .blinds.yml
in your home directory ~
and your current directory .
. If .blinds.yml
exists, blinds.rb
will read your USERNAME
, PASSWORD
, and ROOM
. .blinds.yml
has the following format:
username: USERNAME
password: PASSWORD
room_no: ROOM