Dougs Doings2016-01-27T00:57:44+00:00http://dougedey.github.ioDoug Edeydoug.edey+pages@gmail.comTriggers & Profiles2015-05-11T00:00:00+00:00http://dougedey.github.io/2015/05/11/Mash_Profiles_And_Triggers
<h1 id="why-do-you-need-to-write-this">Why Do You Need To Write This?</h1>
<p>The trigger interface has evolved recently and I feel it’s needed (since I don’t get paid, I want to not answer questions).</p>
<h1 id="whats-changed">What’s Changed?</h1>
<p>Some minor tweaks have been made with regards to activating and deactivating the profile. But this will give you a quick walkthrough of how to set a trigger profile and how it works.</p>
<h1 id="settings-up-a-trigger-profile">Settings UP A Trigger Profile</h1>
<p>So, there’s two ways to set up a trigger profile. The first, is a manual process where you add new triggers, re-arrange, set them up, and make sure you’re happy. This gives you more flexibility, but it’s not the easiest way to do things.</p>
<p>That’s why I added Recipe Upload. When you upload a recipe, you’ll be able to view the Mash or Hop Additions profiles, then you can select which temperature probe, or PID to set up the Profile for. When you’ve selected the target sensor and the page is reloaded, you’ll be able to see the Trigger Profile is setup for that probe.</p>
<h1 id="ok-thats-easy-how-do-i-activate-it-how-do-i-deactivate-it-what-happens-dude-tell-me-i-need-to-knowoneoneeleven">OK, That’s Easy. How Do I Activate it? How Do I Deactivate It? WHAT HAPPENS DUDE?! TELL ME! I NEED TO KNOW!!!!!!ONEONEELEVEN!</h1>
<p>So, here’s a basic example with how the profiles work, using a real world example taken from a user on HBT</p>
<pre><code>Dough-in at 133F
wait for 15 minutes
raise to 152F
hold for 60 minutes
raise to 170F
</code></pre>
<p>You will get a Trigger profile of:</p>
<pre><code>Temperature Trigger: 133F
Wait Trigger: 15 mins
Temperature Trigger 152F
Wait Trigger: 60 mins
Temperature Trigger: 170F
</code></pre>
<p>When you press “Activate”</p>
<pre><code>The PID will set to 133F as the target temperature, and will be automatically set to "Auto"
When 133F (+-2F) is hit, the Wait Trigger will activate.
15 minutes later, the wait trigger will deactivate.
The next Temperature Trigger will activate, set the PID target temperature to 152F.
When 152F (+/-2F) is hit, the next wait trigger will activate.
60 minutes later, the wait trigger will deactivate.
The next Temperature Trigger will activate, set the PID target temperature to 170F.
</code></pre>
Triggers!2015-01-11T00:00:00+00:00http://dougedey.github.io/2015/01/11/Triggers
<h1 id="what-are-triggers">What are Triggers?</h1>
<p>Triggers are a very, very simplistic mechanism whereby you wait for a trigger to be hit, then move on to the next one.
This allows me to write triggers very quickly and easily, they just implement a basic interface, and are looked up at runtime. So other people can implement them too.</p>
<h1 id="what-happened-to-mash-profiles">What happened to mash profiles?</h1>
<p>Triggers replace the mash profile, this is because triggers are way more flexible.</p>
<h1 id="how-do-i-use-triggers">How do I use triggers?</h1>
<p>When you are in edit mode, the trigger table will be displayed, and you can add, re-order, and delete triggers.</p>
<p>Clicking the add button will pop up a small popover box with a drop down so you can select the trigger you’d like to add.</p>
<p><img src="http://i.imgur.com/A10FWc6.png" alt="Add New Trigger" /></p>
<p>The drop down will show you the available triggers, I’ll keep this page up to date with all the triggers that are available. Not all triggers will always be shown, some have requirements first.</p>
<h1 id="temperature-trigger">Temperature Trigger</h1>
<p>This trigger waits for a specific temperature to be hit by the temperature sensor before moving on to the next trigger. If the trigger is associated with a PID, the set point will be set to that value.</p>
<p>The temperature must go above the target termperature for this trigger to complete.</p>
<p><img src="http://i.imgur.com/Ril9VCf.png" alt="New Temperature Trigger" /></p>
<h1 id="wait-trigger">Wait Trigger</h1>
<p>This is a very basic “wait for X minutes and Y seconds” trigger.</p>
<p><img src="http://i.imgur.com/epHhSDu.png" alt="Add New Wait" /></p>
<h1 id="pump-trigger">Pump Trigger</h1>
<p>This trigger will only show when there is at least one pump set up in the system.</p>
<p>Select the pump to use, and whether to turn it off or on.</p>
<p>Note: This will be renamed soon to be more generic since the pump outputs are going to be renamed soon.</p>
<p><img src="http://i.imgur.com/foPRhGN.png" alt="Add New Pump" /></p>
<h1 id="profile-trigger">Profile Trigger</h1>
<p>This trigger allows you to activate or deactive the Trigger Profile on another (or this) probe.</p>
<h1 id="editting-triggers">Editting Triggers</h1>
<p>When you’re in edit mode, you can drag and drop to reorder triggers, drag them to the “Delete” button (the Add button changes to the delete button when you drag a row), and double click a trigger row to pop up a window to edit the trigger.</p>
<h1 id="coming-soon">Coming soon?</h1>
<p>Other triggers will be created when they are requested, or provided.</p>
pH Sensors In Elsinore2014-12-21T00:00:00+00:00http://dougedey.github.io/2014/12/21/pH_Sensors
<h1 id="ph-sensors-now-supported-by-elsinore">pH Sensors Now Supported By Elsinore!</h1>
<p>Thanks to cank on HBT who purchased me a <a href="http://dfrobot.com/wiki/index.php/PH_meter%28SKU:_SEN0161%29">DF Robots SEN0161</a> pH Sensor (because he purchased one too), I have added support for pH Sensors.</p>
<p>pH Sensors are easy for me to expand (I just need to write a single function for each one that’s available)</p>
<h1 id="a-note-on-ph-sensors-that-are-high-temperature">A Note On pH Sensors That Are High Temperature</h1>
<p>As stated below, don’t leave a pH Sensor in the mash or boil, these are referred to as “Dirty” solutions, pH sensors (generally) <a href="http://www.explainthatstuff.com/how-ph-meters-work.html">work</a> by losing ions from their probes. If you leave a sensor in the mash for 60+ minutes, and in the boil for 60+ minutes, you’re degrading the sensor a lot faster than if you were to take specific measurements at a specific points.</p>
<h1 id="hardware">Hardware</h1>
<p>I have the dF Robots SEN0161 as a reference pH Sensor. You shouldn’t leave a pH probe in a dirty solution (i.e. the mash or the boil or anything) since it degrades the sensor. When you want to take a reading, ensure the sample is in the safe range of your pH Probe in terms in temperature.</p>
<p>I strongly recommend using a <a href="http://pcsensor.com/index.php?_a=product&product_id=43">DS2450 expansion board</a> to provide four analog inputs. I replaced the jack on the end with an XLR jack since all my temperature probes use XLR jacks. You’ll need to validate which wire is the 5V, GND, and Data since I’m not 100% certain on the wiring colors being consistent.</p>
<p>And that’s it… rather simple. Though I would recommend picking up some reference solutions to allow you to calibrate the sensor every now and again.</p>
<h1 id="setup">Setup</h1>
<p>In Edit mode, you will see a pH Sensor section appear. Clicking the <code>Add pH Sensor</code> button will show a popover that lets you add a pH sensor.</p>
<p><img src="http://i.imgur.com/8JaeFou.png" alt="New pH Sensor" /></p>
<p>You can set the name, the analog pin, choose the DS2450 address and set the offset. You can also use this to calibrate. For example, if you’ve got the probe in a known 7.0 pH solution, you can enter 7.0 in the box and an offset will be applied. For the SEN0161, the tolerance is 0.3 so unless the reading is over 0.3 out, no offset will be set.</p>
<p><img src="http://i.imgur.com/i2T5DsB.png" alt="pH Sensor Setup" /></p>
<p>Pressing the <code>Update</code> button will save the pH Sensor.</p>
<h1 id="usage">Usage</h1>
<p>The pH sensor you’ve created will have a <code>Update Value</code> button</p>
<p><img src="http://i.imgur.com/BMKbHju.png" alt="Update Value" /></p>
<p>When pressed the pH value will be read and the pH value will be displayed in the button. You can press it again to update.</p>
<p><img src="http://i.imgur.com/1hClXkm.png" alt="Updated Value" /></p>
<p>This is my reading of a 4.0pH Solution</p>
Volume Measurement Setup2014-12-20T00:00:00+00:00http://dougedey.github.io/2014/12/20/Volume_Setup
<h1 id="volume-measurement-setup-guide">Volume Measurement Setup Guide</h1>
<p>This guide is based off the BrewTroller setup, all of the code was engineered by myself, I just used the research that was done in the forums and their documentation which now appears to be fully defunct. There’s a <a href="https://web.archive.org/web/20140815170908/https://www.oscsys.com/projects/brewtroller/system-design/volume-measurement">Wayback snapshot</a> but I’ll duplicate the information here. And update all BrewTroller References to Elsinore.</p>
<h1 id="overview">Overview</h1>
<p>Elsinore can use any 0-5V DC analog device to represent the current volume of a vessel. A set of calibrations for the vessel must be recorded to map specific signal values to known volumes. There are at least three calibrations that must be created per vessel to enable Volume measurement, but you can add as many as you want. Elsinore will use the map to plot values between calibration points.</p>
<p>The most common method used for measuring volume with Elsinor is using pressure sensors. As the height of the liquid increases in a vessel the pressure increases in a corresponding way. Measurement for initial filling can be quite accurate but as temperature decreases volumes will drift as a result of a small vacuum created by the air in the pick up tube connected to the pressure sensor. BrewTroller users cleverly discovered that using a small air pump and feeding a constant stream of air into the pick up tube would eliminate this vacuum and result in accurate volume readings across temperature changes.</p>
<h1 id="bubbler-theory">Bubbler Theory</h1>
<p>A small air pump is used to force air (at a very low flow rate) into the pressure sensing tube. This forces air to bubble steadily out the end of the pickup tube. The pump runs at all times during use. By ensuring that the tubing is always completely full of air, the pressure reading is always consistent - most importantly, it does not vary with temperature, which is a non-trivial issue in a sealed-tube arrangement.</p>
<p>By its very nature, this arrangement is also immune to minor air leaks, and can recover from a temporary disconnection of the air line tubing (accidental or otherwise) during use, either of which are catastrophic in a sealed-tube setup.</p>
<p>There is also no significant risk of moisture/steam reaching the pressure sensor itself, due to the constant stream of air purging the tube.</p>
<p>One caveat of this setup is that the continuous formation and release of bubbles at the end of the pickup tube does introduce a steady ripple in the pressure sensor reading. Appropriate averaging in Elsinore, and/or hardware filtering, can reduce this significantly.</p>
<h1 id="hardware">Hardware</h1>
<p>If you have a pressure sensor/analog input device that is 1.7v output max, you can get away with using the onboard BeagleBone Black inputs. However, the MPX5010DP is 5v output and will break the analog pins.</p>
<p>For this reason, I strongly recommend using a <a href="http://pcsensor.com/index.php?_a=product&product_id=43">DS2450 expansion board</a> to provide four analog inputs. I replaced the jack on the end with an XLR jack since all my temperature probes use XLR jacks. You’ll need to validate which wire is the 5V, GND, and Data since I’m not 100% certain on the wiring colors being consistent.</p>
<p>Note: An Elsinore User will be selling expansion boards for Elsinore in early 2015.</p>
<p>In addition to the pressure sensors, air line, and dip tube needed for the standard sealed-tube arrangement, this method requires the addition of tee fittings, air flow valves, and a pump.</p>
<p><img src="http://i.imgur.com/mZHaw5o.gif" alt="Layout" /></p>
<p>All of these additional parts are available in the aquarium sections of typical pet shops - it should cost less than $15 for parts sufficient for 1-4 sensors.
A “gang valve” allows one pump to supply many sensors, with an air adjustment valve for each. Even the smallest aquarium air pump should suffice for this application.</p>
<h1 id="setup">Setup</h1>
<p>As with any pressure sensor arrangement, the dip tube end should be placed as deep in the vessel as possible (to cover the widest range) and must be fixed in place, as any movement can throw off the reading.</p>
<p>Air flow should be adjusted to achieve a rate of about 2-3 bubbles per second. The rate of bubbles will vary with water depth, so during adjustment the vessel should ideally be at least half full.</p>
<p>Once you have the system ready to go, you will need to setup the volume measurement in the UI.</p>
<p>In Edit mode, click the <code>Edit Volume</code> button on the PID/Temperature probe you want to use. This will pop up a form to allow you to enter the sensor details.</p>
<p><img src="http://i.imgur.com/cG6UB8Z.png" alt="Volume Form" /></p>
<p>If you have a setup that uses a voltage divider to go below 1.7v MAX, you can use the BeagleBone Blacks Analog Input pins. Otherwise, you should use a 5V ADC, such as the DS2450.</p>
<p>The form will let you select from a drop down the DS2450 one wire addresses it finds, then you just need to put the offset (A, B, C, or D).</p>
<p>The <code>Add Volume</code> input is the amount of liquid in the vessel at this time. The first addition should be 0 (empty) but with the required pump running.</p>
<p>You can select the volume unit (Litres, US Gallons, UK Gallons) in the drop down at the bottom.</p>
<p>Whenever you want to add a new data point. Add water of a known amount (I use 1 US Gallon/3.8 Litre incremements), enter the amount into the volume edit form, then press update. Elsinore will take an average reading and record this to the configuration file.</p>
<p>You must do at least three volume measurements, ideally you should do: Empty, half full, and full as a minimum. This gives Elsinore a good range of data. If you use an uneven vessel (like a keg) then you should do as many as you can.</p>
<p>Now when you use the system the volume measurement will be shown for that device automatically.</p>
<h1 id="performance-enhancement">Performance Enhancement</h1>
<p>The ripple present in the pressure sensor reading due to the bubbles formed with this arrangement shows up as noise in the reading. This noise typically corresponds to a variation of less than a quart; however, the BrewTroller firmware includes averaging on the volume sensors to reduce or eliminate this noise. If necessary you can fine tune the averaging logic in the Config.h of the BrewTroller</p>
Why Can't I Use Elsinore Without OneWire Temperature Probes?2014-11-24T00:00:00+00:00http://dougedey.github.io/2014/11/24/Why_Cant_I_Use_Elsinore_Without_Temperature_Probes<p>If you’re reading this it’s probably because you got an error message from Elsinore on Startup.</p>
<h3 id="i-am-trying-to-start-elsinore-but-it-tells-me-i-dont-have-any-temperature-probes">I am trying to start Elsinore but it tells me I don’t have any temperature probes!</h3>
<p>Elsinore is a Temperature based PID controller, if you dont have a temperature probe, then you can’t use the core functionality of Elsinore, so it will exit.</p>
<h2 id="but-i-want-to-test-my-pumpsssrsgpiopuppy-dog">But I want to test my pumps/SSRs/GPIO/puppy dog!</h2>
<p>You should have a search for setting up and testing GPIO on Google, there are much better examples for testing your physical hardware. And you should test this stuff without Elsinore.</p>
<h2 id="puppy-dog">Puppy Dog?</h2>
<p>Don’t give hops to your puppy. If you do, see a vet now, seriously, GO SEE A VET.</p>
<p>STOP READING THIS AND SEE A VET IF YOUR PUPPY ATE HOPS!</p>
How to setup one wire for your system2014-11-12T00:00:00+00:00http://dougedey.github.io/2014/11/12/Setting_Up_One_Wire<p>This is a catch all page that you’ll probably be linked to from the startup process if Elsinore cannot find your One Wire temperature probes</p>
<h3 id="what-is-one-wire">What is One Wire?</h3>
<p>The One Wire protocol from Dallas, allows lots (up to 255 I think, but way more then Elsinore’ll need) of devices to be attached to one pin. The devices are 64 bit addressed, so pin order doesn’t matter.</p>
<p>Elsinore uses One Wire for temperature probes and volume reading.</p>
<p>There’s a difference in setting up One Wire for Linux Kernels below 3.8 (normally RaspberryPi) and 3.8+ (normally Beaglebone)</p>
<h3 id="linux-kernel-36-raspberrypi-provided-by-cank">Linux Kernel 3.6 (RaspberryPi) (provided by Cank)</h3>
<p><a href="https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/">Set up your DS18 probes</a></p>
<p>Then run this code in the LXTerminal to automatically load the One-Wire modules on start up</p>
<p>Open /etc/modules to edit</p>
<pre><code>sudo nano /etc/modules
</code></pre>
<p>Add these lines to the bottom of the file /etc/modules</p>
<pre><code>w1-gpio
w1-therm
</code></pre>
<p>Then reboot</p>
<pre><code>sudo reboot
</code></pre>
<h3 id="linux-kernel-38-beaglebone-black">Linux Kernel 3.8 (BeagleBone Black)</h3>
<p>Do not use a kernel above 3.8 at the moment, you may need to install the 3.8 kernel on a newer image: <code>sudo apt-get install linux-image-3.8.13-bone67</code></p>
<p>For beagleboard to get OneWire support, and GPIO control, you need to install a Device Tree Overlay file. I have added these under the support directory.</p>
<p>The dts file will show you the pin, but it’s <code>P8.11</code></p>
<p>To compile the overlay:</p>
<p><code>sudo dtc -O dtb -o /lib/firmware/w1-00A0.dtbo -b 0 -@ w1.dts</code></p>
<p>Or copy the w1-00A0.dtbo in the support directory to /lib/firmware (as root), the above command copies the file for you.</p>
<p>Login as root (such as “sudo su”) and run</p>
<p><code>echo w1 > /sys/devices/bone_capemgr.8/slots</code></p>
<p>Note: bone_capemgr.8 may be bone.capemgr.9 depending on your setup</p>
<p>I have provided a file which will install the One Wire (and jGPIO DTO files):</p>
<p><code>./extras/w1_setup.sh</code></p>
<h1 id="owfs">OWFS</h1>
<p><a href="http://www.owfs.org">OWFS</a> is used to only read analogue inputs (DS2450) for pH Sensors and Volume Reading.</p>
<p>The easiest way to set it up once it’s installed is to first stop the OWFS Server process, if you have it installed as a service you can use something like:</p>
<p><code>sudo service owserver stop</code> or <code>sudo /etc/init.d/owserver stop</code></p>
<p>Then, replace the <code>/etc/owfs.conf</code> file with a valid file, I have included mine below as an example.</p>
<p>This sets up the server on port 4304, the ftp server on 2120 and the HTTP server on 2121.</p>
<div class="highlight"><pre><code class="language-cfg" data-lang="cfg"><span class="c1"># Elsinore Basic configuration file for the OWFS suite for Debian GNU/Linux.</span>
<span class="c1">#</span>
<span class="c1">#</span>
<span class="c1"># This is the main OWFS configuration file. You should read the</span>
<span class="c1"># owfs.conf(5) manual page in order to understand the options listed</span>
<span class="c1"># here.</span>
<span class="c1">######################## SOURCES ########################</span>
<span class="c1">#</span>
<span class="c1"># With this setup, any client (but owserver) uses owserver on the</span>
<span class="c1"># local machine...</span>
<span class="na">! server: server</span> <span class="o">=</span> <span class="s">localhost:4304</span>
<span class="c1">#</span>
<span class="c1"># ...and owserver uses the real hardware, by default fake devices</span>
<span class="c1"># This part must be changed on real installation</span>
<span class="c1">#server: FAKE = DS18S20,DS2405</span>
<span class="c1">#</span>
<span class="c1"># USB device: DS9490</span>
<span class="na">server: w1</span> <span class="o">=</span> <span class="s">all</span>
<span class="c1">#</span>
<span class="c1"># Serial port: DS9097</span>
<span class="c1">#server: device = /dev/ttyS1</span>
<span class="c1">#</span>
<span class="c1"># owserver tcp address</span>
<span class="c1">#server: server = 192.168.10.1:3131</span>
<span class="c1">#</span>
<span class="c1"># random simulated device</span>
<span class="c1">#server: FAKE = DS18S20,DS2405</span>
<span class="c1">#</span>
<span class="c1">######################### OWFS ##########################</span>
<span class="c1">#</span>
<span class="na">mountpoint</span> <span class="o">=</span> <span class="s">/mnt/1wire</span>
<span class="err">allow_other</span>
<span class="c1">#</span>
<span class="c1">####################### OWHTTPD #########################</span>
<span class="na">http: port</span> <span class="o">=</span> <span class="s">2121</span>
<span class="c1">####################### OWFTPD ##########################</span>
<span class="na">ftp: port</span> <span class="o">=</span> <span class="s">2120</span>
<span class="c1">####################### OWSERVER ########################</span>
<span class="na">server: port</span> <span class="o">=</span> <span class="s">4304</span></code></pre></div>
StrangeBrew Elsinore Setup Videos2014-09-27T00:00:00+00:00http://dougedey.github.io/2014/09/27/Setup_Videos
<h1 id="elsinore-video-instructions">Elsinore Video Instructions</h1>
<p>I decided to create some videos that explain how to setup Elsinore.</p>
<p>The first one shows what software you need to install, and how to start Elsinore</p>
<iframe width="480" height="360" src="//www.youtube.com/embed/xWfFwci3Dgw" frameborder="0" allowfullscreen=""></iframe>
<p>The second shows how to setup the devices, temperature probes, pumps, timers, mash steps, etc… from the web interface</p>
<iframe width="560" height="315" src="//www.youtube.com/embed/g9F_RP89-7M" frameborder="0" allowfullscreen=""></iframe>
Web Based Mash Profiles2014-09-01T00:00:00+00:00http://dougedey.github.io/2014/09/01/Elsinore-Mash-Edits<p>So I have spent some time improving <strong>Mash Profiles</strong> in <a href="http://dougedey.github.io/SB_Elsinore_Server/">StrangeBrew Elsinore</a>, you can now do edits, re-orders, deletes, all from the Web interface. And since <a href="http://github.com/dougedey/StrangeBrewQT">StrangeBrew QT</a> is dead for me now (too much hassle to support multiple platforms), I’ve been integrating support with <a href="http://github.com/dougedey/StrangeBrew">StrangeBrew Java</a></p>
<h1 id="this-is-still-a-test-feature">This is STILL A TEST Feature</h1>
<p>If you see an issue, please raise a bug with as much information as possible. One line “This doesn’t work” won’t help me to fix it. Check the logs, this feature has lots of WARNING output (rather than info) until it’s been tested well enough to be part of the main branch.</p>
<h3 id="what-is-a-mash-profile">What is a Mash Profile?</h3>
<p>I know I’m probably not using the right phrase, but I figured it was catchy enough to refer to, and it gets the intent of the feature across.</p>
<p>A Mash Profile is a series of Mash Steps, many Mash Steps equal one Mash Profile.</p>
<p>In Elsinore, you can have a mash profile for each PID you have setup.</p>
<h3 id="ok-what-does-a-mash-profile-allow-me-to-do">OK, what does a Mash Profile allow me to do?</h3>
<p>The profile allows you to setup mash steps in advance, with target start temperatures, duration, and names, Elsinore then has a background thread for each Mash Profile that has been setup.</p>
<p>What Elsinore does is:</p>
<ol>
<li>Checks to see if there’s an active mash step, if there’s not it doesn’t do anything, simple</li>
<li>Sets the target PID Temperature to that of the mash profile</li>
<li>Checks to see if the current temperature on the profiles PID to see if it’s in range of the target profile (currently this is hard set to +/-2F, but this is next on my list to make flexible)</li>
<li>If it’s within the target range, it will then activate the mash step and set the start time, whilst at the same time setting the target end time</li>
<li>If the end time has been hit, or surpassed, the actual end time is recorded (up to 10s difference)</li>
<li>If there’s another mash step, this becomes the active step</li>
<li>Goto (1)</li>
</ol>
<h3 id="sweet-its-like-a-set-and-forget-thing">Sweet, it’s like a set and forget thing!</h3>
<p><strong>No</strong>, seriously it’s not, you need to monitor everything closesly, as I said at the beginning, I don’t use this feature (at the moment) so it’s difficult for me to detect any issues.</p>
<p>Also, whilst Elsinore does set the Target Temperature, it does NOT activate the element by itself. If a PID is already on manual, it will not move it to Auto, or Off. I don’t want to active an element when someone hasn’t put their water in, or something isn’t right!</p>
<p>I do not recommend leaving Elsinore to run by itself whilst you go out of the house, there’s lots of things that can go wrong. Propane leaks, SSRs shorting out, fires, bad bad bad things.</p>
<h3 id="ok-i-get-it-i-think-i-want-to-use-this">OK, I get it, I think I want to use this.</h3>
<p>You no longer need a desktop StrangeBrew application! It does help, you can use StrangeBrew Java, go to Options -> Preferences -> Brewer. And add the Elsinore location, make sure you include the port! For me it’s <code>http://brewery:8080</code> Then, go to the Mash Panel, setup your mash and click the “Send >” button to send it to Elsinore, as with StrangeBrew QT, you can select which PID you want to use.</p>
<p>You’ll get relevant messages for any issues that StrangeBrew finds when trying to update the mash Profile, and then a message for the profile being sent</p>
<p>You will see a prompt to select the relevant PID that you want to acivate the mash profile for.</p>
<p>If there’s a profile already active, you can override it!</p>
<p>These images are from StrangeBrew QT, but they are similar/the same for StrangeBrew Java.
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/elsinore_on.png" alt="Elsinore on" />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/SB_Mash.png" alt="Elsinore Support" />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/to_elsinore.png" alt="Elsinore Sent" /></p>
<h3 id="hold-on-you-said-i-could-do-it-from-the-web-interface">Hold on, you said I could do it from the Web Interface…</h3>
<p>Yup, I did, here’s how you do it.</p>
<ol>
<li>Make sure the UI is unlocked.<br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/locked_screen.png" alt="Elsinore Locked" /><br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/edit_nomash.png" alt="Elsinore Unlocked" /></li>
<li>Click the “Add” button for the PID you want to add a mash step to.<br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/add_new_mash_step.png" alt="Add Step" /><br />
The Boxes have text in them to tell you what’s expected from each box.<br />
“Temp” is the target temperature for the mash step.<br />
“Unit”, which defaults to your system temperature Unit.<br />
“Method”/”Type” these are used so you know what’s going on (StrangeBrew Java adds them in automatically).<br />
“Duration” is how long to hold the temperature for before moving onto the next mash step.</li>
<li>Then hit the gray/grey “Add” button to add the step, repeat as much as you want, then hit “Cancel” to stop adding mash steps.</li>
<li>You can reorder the mash steps by clicking and dragging the steps to reorder them.<br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/reordering.png" alt="Add Step" /></li>
<li>You can also delete the mash steps by dragging them to the “delete” button (it’ll change when you drag it)<br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/delete_mashstep.png" alt="Add Step" /></li>
<li>When you’re done adding mash steps and you’re happy, you’ll need to activate “Auto” mode for the PID with the mash profile, this is a safety feature. No I will not change it.</li>
<li>When the PID is in Auto mode, press “Activate” on the mash profile table to activate it.</li>
<li>You can lock the UI when you’re done editing, the mash profile will stay visible.<br />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_edit/edit_nomash.png" alt="Elsinore Unlocked" /></li>
</ol>
<h3 id="its-sent-what-next">It’s Sent! What next?</h3>
<p>In the Web interface, the relevant PID will show a table of the mash steps, by default none are activated.</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/mashstep_activate.png" alt="Mashstep View" /></p>
<p>So you’ll need to click the “Activate” button when you’re setup to go. Then press “Auto” on the PID to activate the element.</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/mashstep_enabled.png" alt="Mashstep Active" /></p>
<p>When the PID temperature is within the target range, +/-2F by default, the timer will start</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/timersmash.png" alt="Mashstep Timer" /></p>
Required Hardware2014-08-14T00:00:00+00:00http://dougedey.github.io/2014/08/14/Components<h3 id="the-list">The list!</h3>
<p>To begin with, I must state: Be careful when doing anything, you’re going to be turning electrcity into heat, there will invariably be some bare wires around whilst you’re doing things, these may kill you.</p>
<p>You want to have a GFCI circuit for anything that’s going to be around water, either with a GFCI breaker on your Fuse Panel, or a GFCI cable for the mains current.</p>
<h3 id="the-list-really">The List! (Really)</h3>
<p>You can break down the system into various components, the controller itself, the temperature probes, the volume sensors, the heating elements, etc…</p>
<h2 id="the-controller">The Controller</h2>
<p>You’ll need a <a href="http://www.raspberrypi.org/">Raspberry Pi</a> or a <a href="http://beagleboard.org/black">BeagleBone Black</a> these are both Linux based (by default) systems that have GPIO Output.</p>
<p>You’ll need to install an Operating System, I personally use Ubuntu, and the guides have been written with Ubuntu in mind. But anything with a One Wire module will work (see the next section).</p>
<h2 id="one-wire">One Wire</h2>
<p>One wire is a system that allows multiple devices to use a single pin, and they’re 64 bit addressed so you don’t need to put them in any physical order.</p>
<p>For this you need:</p>
<ul>
<li>A 4k7 Ohm resistor</li>
<li>DS18B20 (or any compatible temperature sensor)</li>
<li>Some wires</li>
<li>XLR jacks and sockets (optional, but it makes it easier to move around and change)</li>
</ul>
<p>(I’ll add more information in the future, but Adafruit have a great <a href="https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/overview">guide</a> for getting started.</p>
<p>Make sure you get waterproof temperature sensors to go in the kettle, you can use the Electric Breweries guides for this, just replace the PID temperature probes with the One Wire ones.</p>
<h2 id="the-kettleselements">The Kettles/Elements</h2>
<p><a href="http://theelectricbrewery.com/">The Electric Brewery</a> has incredibly indepth guides for all this stuff, I recommend you use their guides (and their kits if you want to make things easier). But don’t get the PIDs. Elsinore replaces all the PIDs for you</p>
<h2 id="volume-sensing">Volume sensing</h2>
<p>More detail is in the <a href="http://dougedey.github.io/2014/12/20/Volume_Setup/">Volume Setup Documentation</a> but to summarise:</p>
<ul>
<li>A (DS2450)[http://pcsensor.com/index.php?_a=product&product_id=43] analog input device</li>
<li>An (MPX5010DP)[https://widgeneering.com/mpx5010dp_freescale_pressure_sensor_with_carrier.html], one per vessel you want to measure</li>
<li>A small aquarium pump (for air)</li>
<li>Some Ts, aquarium hose, air flow valves</li>
</ul>
<h2 id="ph-sensor">pH Sensor</h2>
<p>Only one (pH sensor)[http://dougedey.github.io/2014/12/21/pH_Sensors/] is currently supported by Elsinore, the DFRobots SEN0161</p>
<ul>
<li>A (DS2450)[http://pcsensor.com/index.php?_a=product&product_id=43] analog input device</li>
<li>A (SEN0161)[http://dfrobot.com/wiki/index.php/PH_meter%28SKU:_SEN0161%29]</li>
</ul>
<h2 id="special-instructions-for-elsinore">Special instructions for Elsinore</h2>
<p>You don’t need LEDs (though they’re a good idea on the hot side so you know when the elements are live).
You should have physical overrides, such as a switch on the GPIO side of the SSRs, just a switch to open the circuit so they turn off.</p>
StrangeBrew Elsinore2014-05-14T00:00:00+00:00http://dougedey.github.io/2014/05/14/New-Elsinore_Setup
<h1 id="strangebrew-elsinore-server">Strangebrew Elsinore Server</h1>
<p>Java Server for Strangebrew Elsinore</p>
<p>The purpose of this project is to create a Java application that can run on small systems such as the RaspberryPi and the Beaglebone series</p>
<p>Since these systems run on Linux, that is a requirement to using this.</p>
<p>The system is based off the Dallas One Wire protocol for the temperature probes (expanding to analogue inputs too), and Straightforward GPIO outputs for SSR control</p>
<h1 id="setup-instructions">Setup Instructions</h1>
<p><a href="extras/BeagleboneBlackSetup.md">Beaglebone Black</a></p>
<p><a href="extras/RaspberryPiSetup.md">RaspberryPi</a></p>
<p>The above instructions will tell you how to setup your systems for Elsinore</p>
<h1 id="startup-instructions">Startup Instructions</h1>
<p>Clone this repository:</p>
<p><code>git clone https://github.com/DougEdey/SB_Elsinore_Server</code></p>
<p>Move to the checked out Directory:</p>
<p><code>cd SB_Elsinore_Server</code></p>
<p>Run:</p>
<p><code>./launch.sh</code></p>
<p>Wait, what happened to the old instructions? Well I found that people weren’t following them well. So I rewrote the UI, you can now setup everything (almost) from the UI.</p>
<p>If you have a DS2450 (or don’t want to use Analogue inputs for reading the volume, BBB is 1.7V so not very good for reading the analogue inputs. You will see a request for OWFS, please use OWFS if you can, it’s better in general.</p>
<pre><code>./launch.sh
Starting Elsinore as elsinore
[sudo] password for elsinore:
May 17, 2014 8:29:23 PM com.sb.elsinore.LaunchControl main
INFO: Running Brewery Controller.
CFG IS NULL
DOC IS NULL
Detected a non temp probe.20-00000008dc9e
Do you want to switch to OWFS? [y/N]
y
Creating the OWFS configuration.
What is the OWFS server host? (Defaults to localhost)
What is the OWFS server port? (Defaults to 4304)
</code></pre>
<p>Then you can use the web UI.</p>
<h1 id="web-ui">Web UI</h1>
<p>The standard view you’ll see at the start is an un-named display, such as:</p>
<p><img src="http://i.imgur.com/61lm1VI.png" alt="Initial Setup View" /></p>
<p>The probe “names” are their addresses, double clicking them allows you to set them up</p>
<ul>
<li>You can set just the name (which will leave it as a temperature probe)</li>
<li>A GPIO pin (which will set it up as a PID controller)</li>
<li>And if you use a GPIO Pin you can set an Aux pin at the same time, allowing you to use an auxilliary ouput.</li>
</ul>
<p><img src="http://i.imgur.com/FSAxuYB.png" alt="Setup Probe" /></p>
<h1 id="volume-reading">Volume Reading</h1>
<p>Volume reading can be done using any analogue input, I personally used the same hardware as <a href="https://www.oscsys.com/projects/brewtroller/system-design/volume-measurement">Brewtroller</a> connected to a one wire DS2450, this allows it to connect to the one wire bus.</p>
<p><a href="http://dougedey.github.io/2014/12/20/Volume_Setup">More indepth documentation</a></p>
<h1 id="raspberrypi-or-beagleboard">RaspberryPi or Beagleboard?</h1>
<p>The BeagleBoard Black does have a big advantage over the RPi, it has onboard analogue inputs, but these are 1.8V.</p>
<p>The RaspberryPi works fine with the existing software, the only thing you need to do differently is naming the GPIO Pinouts.</p>
<h1 id="one-wire--owfs">One Wire & OWFS</h1>
<p>One Wire is fantastic (in my opinion) each sensor or device has a full 64 bit address, and you don’t have to worry about the order and you can chain them!</p>
<p>One Wire devices can be chained, with only one Pullup resistor before the first connection to a device. I currently have 4 Temperature probes on my circuit, and a ADC, connected using XLR jacks.</p>
<p><a href="http://owfs.org/">OWFS</a> is a much better One Wire Implementation, it is highly recommended to install it, and it is REQUIRED if you use One Wire based Analog inputs (like the DS2450</p>
<p>Install it using your standard package manager, then you need to set a mountpoint up (I use /mnt/1wire) and set</p>
<p><code>server: w1</code> in the OWFS configuration File (/etc/owfs.conf by default), you can chose the ports as you want for OWFSHTTP and OWServer, the configuration tool will setup OWFS if it can.</p>
<p>To manually setup OWFS, use the option -owfs when starting up Elsinore</p>
<h1 id="cutoff-temperature">Cutoff Temperature</h1>
<p>After the <a href="http://imgur.com/a/pwQVE">incident</a> I decided to add a cutoff temperature, in my case I have a temperature probe on my SSRs, and when they go over a certain temperature I want to kill the server so it doesn’t get badly damaged</p>
<p>This is to come in the updated Web UI setup.</p>
<h1 id="system-temperature">System Temperature</h1>
<p>System can be enabled during setup by entering “system” (no quotes) at the prompt.</p>
<p>Also, to enable the System Temperature reading, please add</p>
<p><code><system /></code></p>
<p>In the <code><general></code> section of the configuration file.</p>
<h1 id="timers">Timers</h1>
<p>Use the web UI, click on “Add Timer” to create a timer.</p>
<h1 id="pump-control">Pump Control</h1>
<p>To add a pump, use the “Add Pump” button on the Web Interface</p>
<h1 id="config-file">Config File</h1>
<p>This is now automatically controlled, you shouldn’t need to do anything to it, except for backing it up.</p>
<h1 id="control-interface">Control Interface</h1>
<p>Visit
```</p>
<ip of="" your="" system="">:8080/controller
```
to access the webUI, which works on mobiles too:
![Browser Layout](http://i.imgur.com/j59BcFZ.png)
[Album of the UI Progress](http://imgur.com/a/jEIbc)
This is an example of the PID control interface, temperature probes are displayed on the right hand side as LCD displays. On the Raspberry Pi you'll also get the system temperature (this isn't enabled on Beagleboard yet)
There is also a Android Application which is not currently in development, search my repositories to check this, but it's not deprecated yet, I haven't changed the JSON output from the system so it should continue to work.
Thanks For reading this, if you have any queries please contact me or file a bug.
</ip>
Mash Profiles2014-04-05T00:00:00+00:00http://dougedey.github.io/2014/04/05/Elsinore-Mash-Profiles<p>So I have spent a week getting <strong>Mash Profiles</strong> working in <a href="http://dougedey.github.io/SB_Elsinore_Server/">StrangeBrew Elsinore</a>, it’s at a point now where I feel comfortable allowing other people to <strong>TEST</strong> this functionality (I don’t use it in my setup personally)</p>
<h1 id="this-is-a-test-feature">This is a TEST Feature</h1>
<p>If you see an issue, please raise a bug with as much information as possible. One line “This doesn’t work” won’t help me to fix it. Check the logs, this feature has lots of WARNING output (rather than info) until it’s been tested well enough to be part of the main branch.</p>
<h3 id="what-is-a-mash-profile">What is a Mash Profile?</h3>
<p>I know I’m probably not using the right phrase, but I figured it was catchy enough to refer to, and it gets the intent of the feature across.</p>
<p>A Mash Profile is a series of Mash Steps, many Mash Steps equal one Mash Profile.</p>
<p>In Elsinore, you can have a mash profile for each PID you have setup.</p>
<h3 id="ok-what-does-a-mash-profile-allow-me-to-do">OK, what does a Mash Profile allow me to do?</h3>
<p>The profile allows you to setup mash steps in advance, with target start temperatures, duration, and names, Elsinore then has a background thread for each Mash Profile that has been setup.</p>
<p>What Elsinore does is:</p>
<ol>
<li>Checks to see if there’s an active mash step, if there’s not it doesn’t do anything, simple.A</li>
<li>Sets the target PID Temperature to that of the mash profile</li>
<li>Checks to see if the current temperature on the profiles PID to see if it’s in range of the target profile (currently this is hard set to +/-2F, but this is next on my list to make flexible)</li>
<li>If it’s within the target range, it will then activate the mash step and set the start time, whilst at the same time setting the target end time</li>
<li>If the end time has been hit, or surpassed, the actual end time is recorded (up to 10s difference)</li>
<li>If there’s another mash step, this becomes the active step</li>
<li>Goto (1)</li>
</ol>
<h3 id="sweet-its-like-a-set-and-forget-thing">Sweet, it’s like a set and forget thing!</h3>
<p><strong>No</strong>, seriously it’s not, you need to monitor everything closesly, as I said at the beginning, I don’t use this feature (at the moment) so it’s difficult for me to detect any issues.</p>
<p>Also, whilst Elsinore does set the Target Temperature, it does NOT activate the element by itself. If a PID is already on manual, it will not move it to Auto, or Off. I don’t want to active an element when someone hasn’t put their water in, or something isn’t right!</p>
<h3 id="ok-i-get-it-i-think-i-want-to-use-this">OK, I get it, I think I want to use this.</h3>
<p>Cool, I like you already. But this isn’t something you can do with Elsinore by itself.</p>
<p>You’ll need to use <a href="http://dougedey.github.io/StrangeBrewQT/">StrangeBrewQT</a> to use this feature.</p>
<p>When you get StrangeBrewQT, you can build it from source (install QTCreator and hit build, it should work on all platforms), using the <em>elsinore_mash</em> branch. There’s a post <strong>TO_COME</strong> with links to binary drops for Mac/Windows/Linux as standalone archives. Sorry, I don’t have an automated build system for all of this yet.</p>
<p>Well, I lie a bit, you can get the Ubuntu release from <a href="https://github.com/DougEdey/StrangeBrewQT/tree/master/drops">this directory</a></p>
<p>When you have your recipe and mash profile setup in StrangeBrewQT, under the tools item there’s a “Send Mash” option under “Tools”, this will attempt to send the mash profile to the Elsinore Server you have setup under Preferences->Brewer.</p>
<p>You’ll get relevant messages for any issues that StrangeBrew finds when trying to update the mash Profile, and then a message for the profile being sent</p>
<p>You will see a prompt to select the relevant PID that you want to acivate the mash profile for.</p>
<p>If there’s a profile already active, you can override it!</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/elsinore_on.png" alt="Elsinore on" />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/SB_Mash.png" alt="Elsinore Support" />
<img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/to_elsinore.png" alt="Elsinore Sent" /></p>
<h3 id="its-sent-what-next">It’s Sent! What next?</h3>
<p>In the Web interface, the relevant PID will show a table of the mash steps, by default none are activated.</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/mashstep_activate.png" alt="Mashstep View" /></p>
<p>So you’ll need to click the “Activate” button when you’re setup to go. Then press “Auto” on the PID to activate the element.</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/mashstep_enabled.png" alt="Mashstep Active" /></p>
<p>When the PID temperature is within the target range, +/-2F by default, the timer will start</p>
<p><img src="https://raw.githubusercontent.com/DougEdey/dougedey.github.io/master/assets/images/mash_profiles/timersmash.png" alt="Mashstep Timer" /></p>
Raspberry Pi Basic Setup for StrangeBrew Elsinore2014-03-22T00:00:00+00:00http://dougedey.github.io/2014/03/22/Raspberry-Pi-Basic-Setup<p>This is very kindly provided by <a href="http://www.homebrewtalk.com/f170/raspberry-pi-strangebrew-elsinore-basic-setup-463590/">HBT User Cank</a></p>
<h3 id="setup-the-operating-system">Setup the Operating System</h3>
<p><a href="http://www.raspberrypi.org/downloads">Download and install latest NOOBS</a></p>
<p>Install Raspbian Operating system and set it up based on your location.</p>
<h3 id="setup-the-hardware">Setup the Hardware</h3>
<p><a href="https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/">Set up your DS18 probes</a></p>
<p>Then run this code in the LXTerminal to automatically load the One-Wire modules on start up</p>
<p>Open /etc/modules to edit</p>
<pre><code>sudo nano /etc/modules
</code></pre>
<p>Add these lines to the bottom of the file /etc/modules</p>
<pre><code>w1-gpio
w1-therm
</code></pre>
<p>If you’re on a newer kernel you may need to edit your /boot/config.txt</p>
<pre><code>sudo nano /boot/config.txt
</code></pre>
<p>Add this line</p>
<pre><code>dtoverlay=w1-gpio,gpiopin=4
</code></pre>
<p>Then reboot</p>
<pre><code>sudo reboot
</code></pre>
<h3 id="download-elsinore">Download Elsinore</h3>
<p>Download the SB_Elsinore_Server from git</p>
<pre><code>git clone https://github.com/DougEdey/SB_Elsinore_Server.git ~/BrewServer
</code></pre>
<p>Switch directories</p>
<pre><code>cd ~/BrewServer
</code></pre>
<p>Run Elsinore</p>
<pre><code>sudo java -jar Elsinore.jar
</code></pre>
<h3 id="choosing-the-gpio-pins">Choosing the GPIO Pins</h3>
<p>See this <a href="http://www.homebrewtalk.com/f170/raspberry-pi-strangebrew-elsinore-basic-setup-463590/index3.html#post5986888">post</a> to make sure you use the correct GPIO pins for output and you don’t choose one that is in the default HIGH state when the Pi boots up!!!</p>
<p><strong>It is highly recommended you setup a KILL SWITCH that will terminate the negative and/or the positive to the SSRs. This is a safety feature and allows you to kill the SSRs without going through the UI</strong></p>
<h3 id="first-time-setup">First time setup</h3>
<p>It will run some lines of code then show a list of your sensors and ask you to:</p>
<pre><code>Select the input, enter "r" to refresh, or use "pump &ltname&gt &ltgpio&gt" to add a pump
Type "volume" to start volume calibration
Type "timer &ltname&gt" to add a timer
</code></pre>
<p><img src="http://cdn.homebrewtalk.com/attachments/f170/183770d1394036656-raspberry-pi-strangebrew-elsinore-basic-setup-elsinoresetup1.jpg" alt="Initial Setup" /></p>
<h3 id="some-errors">Some errors</h3>
<p>If you see</p>
<pre><code>"java.net.ConnectException: Connection refused"
</code></pre>
<p>This means Elsinore is looking for OWFS (the full stacktrace will have OWFS in it) and OWFS isn’t enabled on your system. There was a bug that caused this after restarting Elsinore. This has been <a href="https://github.com/DougEdey/SB_Elsinore_Server/commit/443ad3b69d6100db73b2afe9af37d749e3b4a860">fixed</a>.</p>
<p>If you get an error at this point saying it can’t see your sensor check out this <a href="http://www.homebrewtalk.com/f170/raspberry-pi-strangebrew-elsinore-basic-setup-463590/#post5969791">post</a>.</p>
<p>It might ask you about switching to OWFS. Say No.</p>
<h3 id="setting-up-the-system">Setting up the System</h3>
<p>At this point enter the number of the sensor you want to set up and hit enter. (I only had one so I entered “1” and hit enter.
It will ask you to name it. (I named mine “HLT”)
Then it ask you what GPIO output the SSR is hooked up to so it knows which pin to turn on and off based on the Temperature reading or your sensor.
I used “GPIO27” which is pin 13
If you just want a temperature reading, say for mash tun or cooled wort, leave it blank and hit enter.
I then typed</p>
<pre><code>timer Mash
timer Boil
pump Pump1 GPIO22
quit
</code></pre>
<p><img src="http://cdn.homebrewtalk.com/attachments/f170/183771d1394036656-raspberry-pi-strangebrew-elsinore-basic-setup-elsinoresetup2.jpg" alt="Setup an output" /></p>
<p>It will tell you:</p>
<pre><code>Updating config file, please check it in elsinore.cfg.new
Config file updated. Please copy it from rpibrew.cfg.new to rpibrew.cfg to use the data
You may need to do this as root
Saving HLT with probe 28-00000XXXXXX
Creating element of general
Creating on configDoc base
</code></pre>
<h3 id="copying-the-config-file">Copying the config file</h3>
<p>If it didn’t create this last file, type this:</p>
<pre><code>cp elsinore.cfg.new elsinore.cfg
</code></pre>
<h3 id="running-and-using-elsinore">Running and using Elsinore</h3>
<p>Then run:</p>
<pre><code>sudo java -jar Elsinore.jar
</code></pre>
<p>and in a web browser go to the Raspberry Pi IP address</p>
<pre><code>192.168.1.XX:8080/controller
</code></pre>
<p>You should see:
<img src="http://cdn.homebrewtalk.com/attachments/f170/183772d1394036656-raspberry-pi-strangebrew-elsinore-basic-setup-elsinore3.jpg" alt="Web Interface" /></p>
<h3 id="stopping-elsinore">Stopping elsinore</h3>
<p>Stops the application</p>
<pre><code>Ctrl-C
</code></pre>
<p>The last photo is of a breadboard that I have leds hooked to my gpio output pins for the pump(green led) and the HLT ssr(white led) when I turn the pump on the green light comes on, when I send a command for the HLT it turns the white led on based on duty cycle.
Pretty sweet!!!</p>
<p><img src="http://cdn.homebrewtalk.com/attachments/f170/183773d1394036656-raspberry-pi-strangebrew-elsinore-basic-setup-img_4392-1-.jpg" alt="Breadboard" /></p>
BeagleBone Black Setup2014-03-22T00:00:00+00:00http://dougedey.github.io/2014/03/22/BeagleBoneBlack-Setup<p>The <a href="http://beagleboard.org/Products/BeagleBone+Black">Beaglebone Black</a> is similar to the Raspberry Pi, but with more GPIO and onboard Analogue in (that has a max of 1.8V)</p>
<h1 id="warning">WARNING</h1>
<p><strong>It is highly recommended you setup a KILL SWITCH that will terminate the negative and/or the positive to the SSRs. This is a safety feature and allows you to kill the SSRs without going through the UI</strong></p>
<p>Do not use a kernel above 3.8 at the moment, you may need to install the 3.8 kernel on a newer image: <code>sudo apt-get install linux-image-3.8.13-bone67</code></p>
<h3 id="launching">Launching</h3>
<p>You <em>must</em> set the “Gpio_definitions” property on launch</p>
<p><code>java -Dgpio_definitions=extras/beaglebone.json -jar Elsinore.jar</code></p>
<p>Otherwise the system will error</p>
<h3 id="gpio-naming">GPIO Naming</h3>
<p>The Pinout number is different between RaspberryPi and Beaglebone.</p>
<p>For Beagleboard Black Pinout: http://elinux.org/BeagleBone#P9_and_P8_-_Each_2x23_pins</p>
<p>BeagleboardBlack has multiple banks, for example GPIO2_2, this translates to physical pin 66, banks are separated by 32 outputs per bank.</p>
<h3 id="overlays">Overlays</h3>
<p>For beagleboard to get OneWire support, and GPIO control, you need to install a Device Tree Overlay file. I have added these under the support directory.</p>
<p>The dts file will show you the pin, but it’s <code>P8.11</code></p>
<p>To compile the overlay:</p>
<p><code>sudo dtc -O dtb -o /lib/firmware/w1-00A0.dtbo -b 0 -@ w1.dts</code></p>
<p>Or copy the w1-00A0.dtbo in the support directory to /lib/firmware (as root), the above command copies the file for you.</p>
<p>Login as root (such as “sudo su”) and run</p>
<p><code>echo w1 > /sys/devices/bone_capemgr.8/slots</code></p>
<p>Note: bone_capemgr.8 may be bone.capemgr.9 depending on your setup</p>
<p>I have also provided a sample jGPIO created overlay for GPIO0_7 as a pinout (jgpio-00A0.dtbo) which can be used in the same was as above</p>
<p><code>sudo cp extras/jgpio-00A0.dtbo /lib/firmware/</code></p>
<p><code>echo jgpio > /sys/devices/bone_capemgr.8/slots</code></p>
<h4 id="jgpio">jGPIO</h4>
<p><a href="http://dougedey.github.io/jGPIO/">jGPIO</a> is a Java application I made to generate the Device Tree Overlays based on a JSON configuration file. At the time of writing this affects Linux Kernel 3.8 and above. The raspberry Pi doesn’t support Kernel 3.8 yet.</p>
<h3 id="creating-a-custom-overlay">Creating a custom Overlay</h3>
<p>If you want to create a DTC file for custom GPIO pinout, you can read the instructions in the <a href="https://github.com/DougEdey/jGPIO">jGPIO</a> repository</p>
<p>But the synopsis is</p>
<p><code>java -cp Elsinore.jar -Dgpio_definition=extras/beaglebone.json jGPIO.DTOTest <List of GPIO pins></code></p>
<p>For example</p>
<p><code>java -cp Elsinore.jar -Dgpio_definition=extras/beaglebone.json jGPIO.DTOTest GPIO0_7</code></p>
<p>Will recreate the default GPIO0_7 file as jgpio-00A0.dto.</p>
<p><code>java -cp Elsinore.jar -Dgpio_definition=extras/beaglebone.json jGPIO.DTOTest GPIO0_7 GPIO0_8 GPIO1_12</code></p>
<p>Will create a Device Tree Overlay with GPIO0_7, GPIO0_8 and GPIO1_12 for export.</p>
<p>You will then need to compile this as the same as above but for jgpio:</p>
<p><code>sudo dtc -O dtb -o /lib/firmware/jgpio-00A0.dtbo -b 0 -@ jgpio-00A0.dto</code></p>
<p>This places the compiled file in the /lib/firmware directory.</p>
<p>Using <code>extra/bbb_setup.sh</code> will always export the jgpio overlay to the cape manager, if there is a firmware file for it.</p>
<h3 id="analogue-inputs">Analogue inputs</h3>
<p>There is already a precompiled AIN DTO for the Beaglebone Black, BB-ADC, as above:</p>
<p><code>echo BB-ADC > /sys/devices/bone_capemgr.8/slots</code></p>
<p>To Activate them.</p>
StrangeBrew Elsinore2014-03-21T00:00:00+00:00http://dougedey.github.io/2014/03/21/sb-elsinore
<h1 id="strangebrew-elsinore-server">Strangebrew Elsinore Server</h1>
<p>Java Server for Strangebrew Elsinore</p>
<p>The purpose of this project is to create a Java application that can run on small systems such as the RaspberryPi and the Beaglebone series</p>
<p>Since these systems run on Linux, that is a requirement to using this.</p>
<p>The system is based off the Dallas One Wire protocol for the temperature probes (expanding to analogue inputs too), and Straightforward GPIO outputs for SSR control</p>
<h1 id="special-thanks">Special Thanks</h1>
<p>There’s a few people, without whom this project wouldn’t have gotten this far.<br />
<a href="https://www.linkedin.com/in/barrybeadman">Barry Beadman</a> who came up with the original concept and helped me with the electronic parts of Elsinore at the beginning<br />
<a href="https://www.linkedin.com/profile/view?id=8804165&authType=NAME_SEARCH&authToken=rF5W&locale=en_US&srchid=599347131409619316778&srchindex=1&srchtotal=14&trk=vsrp_people_res_name&trkInfo=VSRPsearchId%3A599347131409619316778%2CVSRPtargetId%3A8804165%2CVSRPcmpt%3Aprimary">Drew Avis</a> Who allowed me to take over StrangeBrew Java.<br />
<a href="http://www.homebrewtalk.com/members/jangevaa">Jangeeva</a> who provided a lot of debugging help with various issues.<br />
<a href="http://www.homebrewtalk.com/f170/new-strangebrew-elsinore-thread-475456">HomeBrewTalk Forums</a> for ongoing support over the time of the project.</p>
<h1 id="setup-instructions">Setup Instructions</h1>
<p><a href="extras/BeagleboneBlackSetup.md">Beaglebone Black</a></p>
<p><a href="extras/RaspberryPiSetup.md">RaspberryPi</a></p>
<h1 id="startup-instructions">Startup Instructions</h1>
<p>Clone this repository:</p>
<p><code>git clone https://github.com/DougEdey/SB_Elsinore_Server</code></p>
<p>Move to the checked out Directory:</p>
<p><code>cd SB_Elsinore_Server</code></p>
<p>Run:</p>
<p><code>java -jar Elsinore.jar [options ]</code></p>
<p>To startup the setup procedure, I am aware that it needs to be improved, if you have any suggestions, please raise a bug
Use -help to show the full list of options.</p>
<p>Then check the config file if you want to, then you can copy the new one to the default name</p>
<p><code>cp rpibrew.cfg.new rpibrew.cfg</code></p>
<p>And rerun Elsinore to get started</p>
<p><code>java -jar Elsinore.jar [options]</code></p>
<h1 id="raspberrypi-or-beagleboard">RaspberryPi or Beagleboard?</h1>
<p>The BeagleBoard Black does have a big advantage over the RPi, it has onboard analogue inputs, but these are 1.8V.</p>
<p>The RaspberryPi works fine with the existing software, the only thing you need to do differently is naming the GPIO Pinouts.</p>
<h1 id="pump-control">Pump Control</h1>
<p>Elsinore now supports pumps, you’ll need to add a new section called “pumps” and each pump must be on it’s own line in the form
<code>name=gpio</code></p>
<p>The buttons will be RED when on, and GRAY when off.</p>
<h1 id="one-wire--owfs">One Wire & OWFS</h1>
<p>One Wire is fantastic (in my opinion) each sensor or device has a full 64 bit address, and you don’t have to worry about the order and you can chain them!</p>
<p>One Wire devices can be chained, with only one Pullup resistor before the first connection to a device. I currently have 4 Temperature probes on my circuit, and a ADC, connected using XLR jacks.</p>
<p><a href="http://owfs.org/">OWFS</a> is a much better One Wire Implementation, it is highly recommended to install it, and it is REQUIRED if you use One Wire based Analog inputs (like the DS2450</p>
<p>Install it using your standard package manager, then you need to set a mountpoint up (I use /mnt/1wire) and set</p>
<p><code>server: w1</code> in the OWFS configuration File (/etc/owfs.conf by default), you can chose the ports as you want for OWFSHTTP and OWServer, the configuration tool will setup OWFS if it can.</p>
<p>To manually setup OWFS, use the option -owfs when starting up Elsinore</p>
<h1 id="cutoff-temperature">Cutoff Temperature</h1>
<p>After the <a href="http://imgur.com/a/pwQVE">incident</a> I decided to add a cutoff temperature, in my case I have a temperature probe on my SSRs, and when they go over a certain temperature I want to kill the server so it doesn’t get badly damaged</p>
<p>Adding
<code>cutoff = <string></code>
To any of the devices, will kill Elsinore when the temperature for that device goes above it.</p>
<p>The String is in the form: <code><number><scale></code></p>
<p>So in the config file below, I can use 85C as a cutoff temperature and it’ll turn off when it goes above 85C</p>
<h1 id="system-temperature">System Temperature</h1>
<p>System can be enabled during setup by entering “system” (no quotes) at the prompt.</p>
<p>Also, to enable the System Temperature reading, please add</p>
<p><code><system /></code></p>
<p>In the <code><general></code> section of the configuration file.</p>
<h1 id="timers">Timers</h1>
<p>During setup you can add custom timers, just use:</p>
<p><code>
timer <name>
</code></p>
<p>At the command prompt, if you don’t enter a name it will prompt you for one.</p>
<h1 id="config-file">Config File</h1>
<p>This config file will automatically be parsed and converted to an XML file</p>
<p>```
[general]
scale = F
#cosm = COSM API KEY
#cosm_feed = YOUR COSM FEED</p>
<p>[kettle]
set_point = 168.0
duty_cycle = 100.0
cycle_time = 2.0
k_param = 41.0
i_param = 169.0
d_param = 4.0
probe = 28-0000032c449f
gpio = GPIO2_1</p>
<p>[mlt]
set_point = 0.0
duty_cycle = 0.0
cycle_time = 2.0
k_param = 44.0
i_param = 165.0
d_param = 4.0
probe = 28-0000032c506e
gpio =</p>
<p>[pumps]
pump_a = GPIO0_8
pump_foo = GPIO0_9
```</p>
<p>This is a sample Setup file, you can see I have two devices setup here, the MLT is a “read only” probe that doesn’t have a GPIO associated. Whereas the Kettle is setup with default PID values, and has a GPIO pinout of GPIO2_1.</p>
<p>The scale can be changed between C or F to use Celsius or Fahrenheit on the system.</p>
<h1 id="control-interface">Control Interface</h1>
<p>Visit
```</p>
<ip of="" your="" system="">:8080/controller
```
to access the webUI, which works on mobiles too:
![Browser Layout](http://i.imgur.com/j59BcFZ.png)
[Album of the UI Progress](http://imgur.com/a/jEIbc)
This is an example of the PID control interface, temperature probes are displayed on the right hand side as LCD displays. On the Raspberry Pi you'll also get the system temperature (this isn't enabled on Beagleboard yet)
There is also a Android Application which is not currently in development, search my repositories to check this, but it's not deprecated yet, I haven't changed the JSON output from the system so it should continue to work.
Thanks For reading this, if you have any queries please contact me or file a bug.
</ip>