Skip to content

Configuration

brandon-dacrib edited this page Jan 19, 2014 · 5 revisions

sample cloverleaf.conf

# your credentials so that the system can send e-mails as you 
from_email = [email protected]

#your google voice credentials to notify via sms 
google_voice_user = [email protected]
google_voice_pass = xxxxxxxxx 

#filler data for wife_mobile which is used as a variable to be passed in crons
#you can create whatever you like 
wife_mobile = 12345678910
self_mobile = 12345678911
child_mobile = 12345678912

#api key for weather module, get one here: http://www.wunderground.com/weather/api/
wunderground_api_key = xxxxxxxxxxxxxxxxx
wunderground_zip = 10044 #your zip code

#the ip, user and pass for your ISY, used for insteon and z-wave control https://www.universal-devices.com/residential/
isy_uri = 192.168.1.x
isy_user = admin
isy_pass = admin

# the ip/port to your limitlessled wifi bridge http://www.limitlessled.com/
limitlessled-rgb-wifi_bridge_ip = 192.168.1.x
limitlessled-rgb-wifi_bridge_port = 50000

adding a recurring task

cloverleaf uses the whenever gem to schedule recurring tasks via cron. https://github.com/javan/whenever Documentation is available there, but it is fairly simple. Here is a sample config/schedule.rb

# Use this file to easily define all of your cron jobs.
cwd = Dir.pwd
currenthour = Time.now.strftime("%-l%p")

every '00 08-22 * * 1-5' do
	command "#{cwd}/modules/get-current-hour.rb &> /dev/null"
end

every '00 10-22 * * 0,6' do
	command "#{cwd}/modules/get-current-hour.rb &> /dev/null"
end

every :weekday, :at => '7:30pm' do
	command "#{cwd}/modules/say.rb 'Gabriel get in the shower' "
end

Just modify that and run "whenever -w" to write your changes to cron. NOTE: This will overwrite the cron entries for that user.

Clone this wiki locally