brewer 0.0.83 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -1
- data/README.md +59 -6
- data/Rakefile +11 -3
- data/bin/brewer +5 -7
- data/bin/brewer-server +61 -0
- data/lib/brewer.rb +1 -11
- data/lib/brewer/adaptibrew.rb +34 -35
- data/lib/brewer/brewer.rb +125 -106
- data/lib/brewer/communicator.rb +52 -50
- data/lib/brewer/helpers.rb +18 -1
- data/lib/brewer/procedures.rb +183 -167
- data/lib/brewer/recipe.rb +40 -39
- data/lib/brewer/settings.rb +107 -105
- data/lib/gems.rb +11 -0
- data/spec/brewer_spec.rb +3 -3
- data/spec/hardware_spec.rb +17 -13
- data/spec/helpers_spec.rb +0 -0
- data/spec/settings_spec.rb +1 -13
- data/spec/spec_helper.rb +2 -0
- data/views/index.erb +216 -0
- data/views/not_found.erb +24 -0
- metadata +45 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8bb3d0d515993f778a4aeac172e3eafef9402c8
|
4
|
+
data.tar.gz: 0e7c1aa4c511b6a441c575afaed60e43fb594dbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ca12ae113bcf9d5eb5b16e07c4af5a18f147fb8ac3b11fb4e6923c7f578bafd4416b4d592ad2b85162f07c696635da0d9a7f19072b3d9b609c13e0e93b0fcc9
|
7
|
+
data.tar.gz: 40658e53decd3f843ee1eb33c7b7d3cfa87fb848686a8b870219745d0c504881a81b95f1b3a945d931dd692d2fc1f1f9a9ecf5be670a479dcc57e63c43e22dea
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
brewer (0.0.
|
4
|
+
brewer (0.0.88)
|
5
5
|
git (~> 1.3, >= 1.3.0)
|
6
6
|
net-ping (~> 1.7)
|
7
|
+
rack-flash3
|
7
8
|
rainbow
|
8
9
|
require_all
|
9
10
|
ripl (~> 0.7.0)
|
11
|
+
sinatra
|
10
12
|
slack-notifier
|
11
13
|
terminal-table
|
12
14
|
wannabe_bool
|
@@ -25,6 +27,11 @@ GEM
|
|
25
27
|
addressable (~> 2.3)
|
26
28
|
net-ping (1.7.8)
|
27
29
|
public_suffix (2.0.5)
|
30
|
+
rack (1.6.5)
|
31
|
+
rack-flash3 (1.0.5)
|
32
|
+
rack
|
33
|
+
rack-protection (1.5.3)
|
34
|
+
rack
|
28
35
|
rainbow (2.2.1)
|
29
36
|
rake (12.0.0)
|
30
37
|
rdoc (5.1.0)
|
@@ -49,9 +56,14 @@ GEM
|
|
49
56
|
json (>= 1.8, < 3)
|
50
57
|
simplecov-html (~> 0.10.0)
|
51
58
|
simplecov-html (0.10.0)
|
59
|
+
sinatra (1.4.8)
|
60
|
+
rack (~> 1.5)
|
61
|
+
rack-protection (~> 1.4)
|
62
|
+
tilt (>= 1.3, < 3)
|
52
63
|
slack-notifier (2.1.0)
|
53
64
|
terminal-table (1.7.3)
|
54
65
|
unicode-display_width (~> 1.1.1)
|
66
|
+
tilt (2.0.7)
|
55
67
|
unicode-display_width (1.1.3)
|
56
68
|
wannabe_bool (0.6.0)
|
57
69
|
|
data/README.md
CHANGED
@@ -2,31 +2,84 @@
|
|
2
2
|
### A Ruby gem for [adaptiman/adaptibrew](http://github.com/adaptiman/adaptibrew)
|
3
3
|
|
4
4
|
# Disclaimer
|
5
|
-
This is
|
5
|
+
This is a gem that will provide a command line interface for [adaptiman/adaptibrew](http://github.com/adaptiman/adaptibrew). It will provide pre-made procedures (see Brewer::Procedures) and an easy interface to control a brewing rig.
|
6
6
|
|
7
7
|
This will require an actual brew rig and all the equipment listed in [adaptiman/adaptibrew](https://github.com/adaptiman/adaptibrew)'s readme. If you are looking to build an automated brew rig, **this is not the place to start**. Head over to [adaptiman/adaptibrew](https://github.com/adaptiman/adaptibrew), or hit up [adaptiman](https://github.com/adaptiman).
|
8
8
|
|
9
|
+
# Quick Start
|
10
|
+
|
11
|
+
You should have ruby installed. Install this gem with:
|
12
|
+
|
13
|
+
```shell
|
14
|
+
gem install brewer
|
15
|
+
```
|
16
|
+
|
17
|
+
Start the brewer shell with
|
18
|
+
|
19
|
+
```shell
|
20
|
+
brewer
|
21
|
+
```
|
22
|
+
|
23
|
+
|
24
|
+
You can now run the master procedure (the entire standard brewing process) with:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
>> procedures.master
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
You will be prompted to enter a slack `webhook_url`, which you can get from the `incoming-webhooks` integration on your slack channel.
|
32
|
+
|
33
|
+
|
34
|
+
The shell will ask you for recipe variables in the beginning, and will warn you when you need to intervene.
|
35
|
+
|
36
|
+
# Web Interface (in development)
|
37
|
+
Run the `brewer-server` binary the same way you would run the `brewer` binary. This will start a `sinatra` server on your pi's ip address. The default port is `8080`, but you can specify a custom port with:
|
38
|
+
|
39
|
+
```shell
|
40
|
+
sudo brewer-server -p YOUR_PORT
|
41
|
+
```
|
42
|
+
|
43
|
+
Keep in mind that any port below 1024 will need root access. I like to specify port `80` (http default) so that I can leave the port off and it will default to 80.
|
44
|
+
|
45
|
+
You can add a line to `/etc/hosts` on your workstation and redirect a url to your pi's ip. For instance, the relevant line in my `/etc/hosts` looks like this:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
192.168.0.224 navasota.brew
|
49
|
+
```
|
50
|
+
|
51
|
+
so I can visit `navasota.brew` and see the brewing homepage when `brewer-server` is running.
|
52
|
+
|
53
|
+
# Starting the server on system startup
|
54
|
+
|
55
|
+
You may want to start the `brewer-server` an system boot so that a workstation is not required to connect (ssh) to your pi.
|
56
|
+
|
57
|
+
[See here for a StackOverflow solution](https://raspberrypi.stackexchange.com/a/8735) or read on below.
|
58
|
+
|
9
59
|
# Installation
|
10
60
|
This is a gem, published on [rubygems.org](http://rubygems.org). Install it the recommended way with:
|
11
61
|
```shell
|
12
62
|
gem install brewer
|
13
63
|
```
|
14
64
|
This will be the latest stable release.
|
15
|
-
**Or** you can put the following line in a `Gemfile
|
65
|
+
**Or** you can put the following line in a `Gemfile`:
|
16
66
|
```ruby
|
17
67
|
gem 'brewer'
|
18
68
|
```
|
19
|
-
|
69
|
+
or `.gemspec` file:
|
70
|
+
```ruby
|
71
|
+
s.add_runtime_dependency 'brewer'
|
72
|
+
```
|
20
73
|
|
21
|
-
You may also download a .gem file from the releases section and install it that way, or further still build a new .gem file from the `brewer.gemspec` if you want the latest possible release.
|
74
|
+
You may also download a .gem file from the [releases section on github](https://github.com/llamicron/brewer/releases) and install it that way, or further still build a new .gem file from the `brewer.gemspec` if you want the latest possible release. This is not recommended, as I do not regularly make releases on Github, just rubygems
|
22
75
|
|
23
76
|
After installation, run
|
24
77
|
```shell
|
25
78
|
brewer
|
26
79
|
```
|
27
|
-
to open an interactive shell to control your brew rig in realtime.Just like any other gem, you can `require 'brewer'` from another ruby project.
|
80
|
+
to open an interactive shell to control your brew rig in realtime. Just like any other gem, you can `require 'brewer'` from another ruby project.
|
28
81
|
|
29
|
-
#
|
82
|
+
# Note
|
30
83
|
**Warning: RDoc may have a seizure when encountering Gemfiles, Rakefiles, etc. Basically files that don't end in `.rb` but have ruby syntax. Docs will be a bit weird on those files. I suggest just reading the comments in source.**
|
31
84
|
Documentation is in `doc/` or on rubygems.org
|
32
85
|
|
data/Rakefile
CHANGED
@@ -8,8 +8,14 @@ task default: %w[spec]
|
|
8
8
|
# Unit testing
|
9
9
|
# You can specify a specific test case to use
|
10
10
|
# rake spec SPEC=spec/adaptibrew_spec.rb SPEC_OPTS="-e \"#new\""
|
11
|
-
|
12
|
-
|
11
|
+
#
|
12
|
+
# task :spec, [:tc] do |t, tc|
|
13
|
+
# RSpec::Core::RakeTask.new(:spec)
|
14
|
+
# end
|
15
|
+
|
16
|
+
RSpec::Core::RakeTask.new do |t|
|
17
|
+
t.pattern = "spec/*_spec.rb"
|
18
|
+
t.verbose = false
|
13
19
|
end
|
14
20
|
|
15
21
|
# Opens code coverage in your browser
|
@@ -23,8 +29,10 @@ end
|
|
23
29
|
# Generate or update documentation
|
24
30
|
# Generates in `doc/`
|
25
31
|
RDoc::Task.new do |rdoc|
|
32
|
+
rm_rf "doc/"
|
26
33
|
rdoc.rdoc_dir = 'doc/'
|
27
|
-
rdoc.
|
34
|
+
rdoc.main = "README.md"
|
35
|
+
# rdoc.rdoc_files.include("**/*.rb")
|
28
36
|
end
|
29
37
|
|
30
38
|
# Opens documentation.
|
data/bin/brewer
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require_relative "../lib/brewer"
|
3
3
|
|
4
|
-
adaptibrew
|
5
|
-
com
|
6
|
-
brewer
|
7
|
-
|
8
|
-
procedures = Procedures.new
|
9
|
-
|
4
|
+
adaptibrew = Brewer::Adaptibrew.new
|
5
|
+
com = Brewer::Communicator.new
|
6
|
+
brewer = Brewer::Brewer.new
|
7
|
+
procedures = Brewer::Procedures.new
|
10
8
|
puts "🍺 have fun 🍺"
|
11
|
-
|
9
|
+
binding.pry
|
12
10
|
# 🍺🍺🍺
|
data/bin/brewer-server
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'sinatra/base'
|
3
|
+
require "rainbow"
|
4
|
+
require 'rack-flash'
|
5
|
+
|
6
|
+
require_relative "../lib/gems"
|
7
|
+
require_relative "../lib/brewer"
|
8
|
+
|
9
|
+
include Brewer
|
10
|
+
|
11
|
+
module Brewer
|
12
|
+
class Server < Sinatra::Base
|
13
|
+
|
14
|
+
configure do
|
15
|
+
|
16
|
+
use Rack::Flash
|
17
|
+
|
18
|
+
if ARGV.include? "-p"
|
19
|
+
port = ARGV[ARGV.index("-p") + 1].to_i
|
20
|
+
if port < 1024
|
21
|
+
print Rainbow("Warning: ").yellow
|
22
|
+
puts "The port you selected is less than 1024. This will require sudo."
|
23
|
+
puts "Either use sudo or choose a different port. Sinatra default is 4567."
|
24
|
+
puts ""
|
25
|
+
end
|
26
|
+
else
|
27
|
+
port = 4567
|
28
|
+
end
|
29
|
+
|
30
|
+
# Configuration
|
31
|
+
set :bind, '0.0.0.0'
|
32
|
+
set :port, port
|
33
|
+
set :views, Proc.new { File.join(File.expand_path("..", __dir__), "views") }
|
34
|
+
enable :run
|
35
|
+
enable :sessions
|
36
|
+
|
37
|
+
$brewer = Brewer.new
|
38
|
+
end
|
39
|
+
|
40
|
+
# Routes
|
41
|
+
not_found do
|
42
|
+
erb :not_found
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
get '/' do
|
47
|
+
@relays_status = $brewer.relays_status
|
48
|
+
@pid_status = $brewer.pid
|
49
|
+
|
50
|
+
erb :index
|
51
|
+
end
|
52
|
+
|
53
|
+
post '/apply-relay-config' do
|
54
|
+
$brewer.relay_config(params)
|
55
|
+
flash[:config_done] = "Relay Configuration Applied"
|
56
|
+
redirect '/'
|
57
|
+
end
|
58
|
+
|
59
|
+
run!
|
60
|
+
end
|
61
|
+
end
|
data/lib/brewer.rb
CHANGED
@@ -1,14 +1,4 @@
|
|
1
|
-
|
2
|
-
require 'git'
|
3
|
-
require 'fileutils'
|
4
|
-
require 'slack-notifier'
|
5
|
-
require 'yaml'
|
6
|
-
require 'yaml/store'
|
7
|
-
require 'net/ping'
|
8
|
-
require 'ripl'
|
9
|
-
require 'wannabe_bool'
|
10
|
-
require 'terminal-table'
|
11
|
-
require "rainbow"
|
1
|
+
require_relative "gems"
|
12
2
|
|
13
3
|
require_rel 'brewer/'
|
14
4
|
|
data/lib/brewer/adaptibrew.rb
CHANGED
@@ -1,45 +1,44 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "helpers.rb"
|
2
2
|
|
3
|
-
|
4
|
-
class Adaptibrew
|
3
|
+
include Helpers
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
end
|
5
|
+
module Brewer
|
6
|
+
class Adaptibrew
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
# This will clone adaptibrew into ~/.brewer/adaptibrew/
|
9
|
+
def clone
|
10
|
+
raise "🛑 Cannot clone, no network connection" unless network?
|
11
|
+
if !Dir.exists?(adaptibrew_dir)
|
12
|
+
Git.clone('https://github.com/llamicron/adaptibrew.git', 'adaptibrew', :path => brewer_dir)
|
13
|
+
end
|
14
|
+
self
|
15
15
|
end
|
16
|
-
self
|
17
|
-
end
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
# Danger zone...
|
18
|
+
def clear
|
19
|
+
# :nocov: since this requires network to be off
|
20
|
+
if !network?
|
21
|
+
print "Warning: you have no network connection. If you clear, you will not be able to clone again, and you'll be stuck without the adaptibrew source. Are you sure? "
|
22
|
+
confirm ? nil : abort
|
23
|
+
end
|
24
|
+
# :nocov:
|
25
|
+
FileUtils.rm_rf(adaptibrew_dir)
|
26
|
+
self
|
25
27
|
end
|
26
|
-
# :nocov:
|
27
|
-
FileUtils.rm_rf(adaptibrew_dir)
|
28
|
-
self
|
29
|
-
end
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
29
|
+
# This is a good catch-all method
|
30
|
+
# If it's not there, it will clone.
|
31
|
+
# If it is, it will delete and re-clone
|
32
|
+
def refresh
|
33
|
+
raise "🛑 Cannot refresh, no network connection" unless network?
|
34
|
+
clear
|
35
|
+
clone
|
36
|
+
self
|
37
|
+
end
|
40
38
|
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
def present?
|
40
|
+
return Dir.exists?(adaptibrew_dir) ? true : false
|
41
|
+
end
|
44
42
|
|
43
|
+
end
|
45
44
|
end
|
data/lib/brewer/brewer.rb
CHANGED
@@ -1,141 +1,160 @@
|
|
1
1
|
require_relative "../brewer"
|
2
2
|
|
3
|
-
|
3
|
+
module Brewer
|
4
|
+
class Brewer
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
attr_reader :base_path
|
7
|
+
attr_accessor :temps, :relays
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def initialize
|
10
|
+
@base_path = Dir.home + '/.brewer'
|
11
|
+
Settings.new
|
12
|
+
@temps = {}
|
13
|
+
end
|
13
14
|
|
14
|
-
|
15
|
+
public
|
15
16
|
|
16
|
-
|
17
|
-
|
17
|
+
# Brewer methods ------------------------------------------------------
|
18
|
+
# general utilities for the brewer class
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
def wait(time=30)
|
21
|
+
sleep(time.to_f)
|
22
|
+
true
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
# Runs an adaptibrew script
|
26
|
+
# Output will be stored in @out
|
27
|
+
# you may see `echo` quite a bit. This will almost always be directly after calling a script
|
28
|
+
# It will be set to the output of the last script. I can't just return the output because i need to return self
|
29
|
+
def script(script, params=nil)
|
30
|
+
`python #{@base_path}/adaptibrew/#{script}.py #{params}`.chomp
|
31
|
+
end
|
31
32
|
|
32
|
-
# Adaptibrew methods ----------------------------------------------
|
33
|
-
# for working with the rig
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
# Adaptibrew methods ----------------------------------------------
|
35
|
+
# for working with the rig
|
36
|
+
|
37
|
+
def pump(state="status")
|
38
|
+
if state == "status"
|
39
|
+
return relay_status($settings['pumpRelay'])
|
40
|
+
end
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
if state == 1
|
43
|
+
return script("set_pump_on")
|
44
|
+
else
|
45
|
+
if pid['pid_running'].to_b
|
46
|
+
pid(0)
|
47
|
+
end
|
48
|
+
return script("set_pump_off")
|
45
49
|
end
|
46
|
-
return script("set_pump_off")
|
47
50
|
end
|
48
|
-
end
|
49
51
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
# Turns PID on or off, or gets state if no arg is provided
|
53
|
+
def pid(state="status")
|
54
|
+
if state == "status"
|
55
|
+
return {
|
56
|
+
'pid_running' => script("is_pid_running"),
|
57
|
+
'sv_temp' => sv,
|
58
|
+
'pv_temp' => pv
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
if state == 1
|
63
|
+
script('set_pid_on')
|
64
|
+
pump(1)
|
65
|
+
return "Pump and PID are now on"
|
66
|
+
else
|
67
|
+
return script("set_pid_off")
|
68
|
+
end
|
58
69
|
end
|
59
70
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
return script("set_pid_off")
|
71
|
+
def sv(temp=nil)
|
72
|
+
if temp
|
73
|
+
return script('set_sv', temp).to_f
|
74
|
+
end
|
75
|
+
script('get_sv').to_f
|
66
76
|
end
|
67
|
-
end
|
68
77
|
|
69
|
-
|
70
|
-
|
71
|
-
return script('set_sv', temp).to_f
|
78
|
+
def pv
|
79
|
+
script('get_pv').to_f
|
72
80
|
end
|
73
|
-
script('get_sv').to_f
|
74
|
-
end
|
75
81
|
|
76
|
-
|
77
|
-
|
78
|
-
|
82
|
+
def relay(relay, state)
|
83
|
+
# If you try to turn the relay to a state that it is already in, this skips the wait
|
84
|
+
if relay_status(relay).to_b == state.to_b
|
85
|
+
return true
|
86
|
+
end
|
87
|
+
script("set_relay", "#{relay} #{state}")
|
88
|
+
true
|
89
|
+
end
|
79
90
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
return
|
91
|
+
def all_relays_status
|
92
|
+
output = script("get_relay_status_test").split("\n")
|
93
|
+
output.shift(3)
|
94
|
+
return output
|
84
95
|
end
|
85
|
-
script("set_relay", "#{relay} #{state}")
|
86
|
-
wait(10)
|
87
|
-
true
|
88
|
-
end
|
89
96
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
97
|
+
def relays_status
|
98
|
+
statuses = {}
|
99
|
+
all_relays_status.shift(4).each do |status|
|
100
|
+
relay_num, status = status.match(/relay [0-9+]([0-9]+): (on|off)/).captures
|
101
|
+
relay_names = $settings.select { |key, value| key.to_s.match(/Relay/) }
|
102
|
+
statuses[relay_names.key(relay_num.to_i)] = status
|
103
|
+
end
|
104
|
+
return statuses
|
105
|
+
end
|
95
106
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
107
|
+
def relay_config(params)
|
108
|
+
raise "Params must be a hash" unless params.is_a? Hash
|
109
|
+
params.each do |method, setting|
|
110
|
+
if method == "pump"
|
111
|
+
setting = setting.to_i
|
112
|
+
end
|
113
|
+
send(method, setting)
|
114
|
+
end
|
101
115
|
end
|
102
|
-
end
|
103
116
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
117
|
+
def relay_status(relay)
|
118
|
+
if script("get_relay_status", "#{relay}").include? "on"
|
119
|
+
return "on"
|
120
|
+
else
|
121
|
+
return "off"
|
122
|
+
end
|
108
123
|
end
|
109
|
-
self
|
110
|
-
end
|
111
|
-
# :nocov:
|
112
124
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
125
|
+
# :nocov:
|
126
|
+
def watch
|
127
|
+
until pv >= sv do
|
128
|
+
wait(2)
|
129
|
+
end
|
130
|
+
Communicator.new.ping("Temperature is now at #{pv.to_f} F")
|
131
|
+
self
|
132
|
+
end
|
133
|
+
# :nocov:
|
134
|
+
|
135
|
+
def rims_to(location)
|
136
|
+
if location == "mash"
|
137
|
+
# we ended up swapping this relay, so the name is backwards
|
138
|
+
relay($settings['rimsToMashRelay'], 0)
|
139
|
+
elsif location == "boil"
|
140
|
+
relay($settings['rimsToMashRelay'], 1)
|
141
|
+
end
|
142
|
+
self
|
119
143
|
end
|
120
|
-
self
|
121
|
-
end
|
122
144
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
145
|
+
def hlt_to(location)
|
146
|
+
if location == "mash"
|
147
|
+
relay($settings['spargeToMashRelay'], 0)
|
148
|
+
elsif location == "boil"
|
149
|
+
relay($settings['spargeToMashRelay'], 1)
|
150
|
+
end
|
151
|
+
self
|
128
152
|
end
|
129
|
-
self
|
130
|
-
end
|
131
153
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
elsif !state.to_b
|
136
|
-
relay($settings['spargeRelay'], 0)
|
154
|
+
def hlt(state)
|
155
|
+
relay($settings['spargeRelay'], state)
|
156
|
+
self
|
137
157
|
end
|
138
|
-
self
|
139
|
-
end
|
140
158
|
|
159
|
+
end
|
141
160
|
end
|