Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: README.md
- Loading branch information
Showing
9 changed files
with
315 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ gem 'json' | |
gem 'rexml/document' | ||
gem 'time' | ||
gem 'date' | ||
gem 'google_drive' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
#!/usr/bin/ruby | ||
require 'lightwaverf' | ||
obj = LightWaveRF.new | ||
case ARGV[0] | ||
when 'help' | ||
puts LightWaveRF.new.help | ||
puts obj.help | ||
when 'initlink' | ||
puts obj.firmware ARGV[1] | ||
when 'firmware' | ||
puts obj.firmware ARGV[1] | ||
when 'timezone' | ||
puts LightWaveRF.new.timezone ARGV[1] | ||
puts obj.timezone ARGV[1] | ||
when 'configure' | ||
puts LightWaveRF.new.configure | ||
puts obj.configure ARGV[1] | ||
when 'sequence' | ||
puts LightWaveRF.new.sequence ARGV[1], ARGV[2] | ||
puts obj.sequence ARGV[1], ARGV[2] | ||
when 'mood' | ||
puts LightWaveRF.new.mood ARGV[1], ARGV[2], ARGV[3] | ||
puts obj.mood ARGV[1], ARGV[2], ARGV[3] | ||
when 'learnmood' | ||
puts LightWaveRF.new.learnmood ARGV[1], ARGV[2], ARGV[3] | ||
puts obj.learnmood ARGV[1], ARGV[2], ARGV[3] | ||
when 'energy' | ||
puts LightWaveRF.new.energy ARGV[1], ARGV[2], ARGV[3] | ||
puts obj.energy ARGV[1], ARGV[2], ARGV[3] | ||
when 'update_timers' | ||
puts LightWaveRF.new.update_timers ARGV[1], ARGV[2], ARGV[3] | ||
puts obj.update_timers ARGV[1], ARGV[2], ARGV[3] | ||
when 'timer' | ||
puts LightWaveRF.new.run_timers ARGV[1], ARGV[2] | ||
puts obj.run_timers ARGV[1], ARGV[2] | ||
when 'run_timers' | ||
puts LightWaveRF.new.run_timers ARGV[1], ARGV[2] | ||
puts obj.run_timers ARGV[1], ARGV[2] | ||
when 'update' | ||
puts LightWaveRF.new.update_config ARGV[1], ARGV[2] | ||
puts obj.update_config ARGV[1], ARGV[2] | ||
when 'web' | ||
puts LightWaveRF.new.build_web_page ARGV[1] | ||
puts obj.build_web_page ARGV[1] | ||
when 'summarise' | ||
puts LightWaveRF.new.summarise ARGV[1], ARGV[2] | ||
puts obj.summarise ARGV[1], ARGV[2] | ||
else | ||
LightWaveRF.new.send ARGV[0], ARGV[1], ARGV[2], ARGV[3] | ||
obj.send ARGV[0], ARGV[1], ARGV[2], ARGV[3] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/usr/bin/ruby | ||
require 'lightwaverf' | ||
config = LightWaveRF.new.get_config | ||
config['spreadsheet']['password'] = nil | ||
puts JSON.generate config | ||
require 'json' | ||
puts JSON.generate LightWaveRF.new.get_config |
Oops, something went wrong.