BruControl: Brewery control & automation software

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I think you would have to get @BrunDog to add that to the program. Right now the Input is on the PID Element and that single Probe Provides the Temperature for the Probe.
I figured as much, yeah its probably overkill but could be nice in certain situations. One way to do it that I found was to set up a duty cycle or pwm control on the element then implement the PID algo in script and use that to just constantly adjust output on the element based on w/e reading I want.
 
I figured as much, yeah its probably overkill but could be nice in certain situations. One way to do it that I found was to set up a duty cycle or pwm control on the element then implement the PID algo in script and use that to just constantly adjust output on the element based on w/e reading I want.
I would like to be able to assign any temperature probe regardless of interface to be used as the Input for a PID or Hysteresis Element I could also see where and average might work good. I understand the issue the interface still going on something like fermentation where the Input would need to be on the same interface, but if I am doing a Mash, I would know that it failed, just give me a Warning that it could cause issues if the interface with the Probe was disconnected.
,
 
So after years of fault free automation brewing with BruControl, I have a strange issue crop up in my last brew.
After mashing in and clicking on my proceed button the program threw an error and halted the program. I have not modified the program in over a year, and the line that caused the error was a print command to send to the output log. I deleted the line, restarted the program and the program threw the same error even with the line gone.
Rebooted, restarted everything, same results. I have version 1.1 build 22 software version. Should I reload the program or is there a newer release available that I should use?
Thanks!
 
So after years of fault free automation brewing with BruControl, I have a strange issue crop up in my last brew.
After mashing in and clicking on my proceed button the program threw an error and halted the program. I have not modified the program in over a year, and the line that caused the error was a print command to send to the output log. I deleted the line, restarted the program and the program threw the same error even with the line gone.
Rebooted, restarted everything, same results. I have version 1.1 build 22 software version. Should I reload the program or is there a newer release available that I should use?
Thanks!
what was the error? do you have pictures or copies of the script and output log?
 
Is it only the script that failed or the entire program crashed?


If a script error, what is the error?

FYI: The line number in the error handling can be just close and is not exact
 
Is it only the script that failed or the entire program crashed?


If a script error, what is the error?

FYI: The line number in the error handling can be just close and is not exact
Thanks for the quick reply Oakbarn and poptarts.
Script error was invalid command or some such. I don't have the exact error since the program halted and I was frantically trying to debug and restart the script at the same time. The line of code was a print command to the log which is the same as a previous line in the code and has never failed in the past. I was getting ready to post my brew code and was looking in the manual for fault code descriptions when I saw the existence of the controller log and opened it.

Yes, I have seen script error that was a line off, close but not exact. I did not see any other strangeness in the area it stopped. After restarting everything, the script errored at the same point so I commented out the line and restarted the script. It halted at the same place as if the line of code was still there. Again I removed the line entirely and put a couple of blank spaces just to see that the script still halted with the same error that called out the line that now no longer existed. Weird.
132 [dough_in]
133 BrewStatus = "Dough In Temp Achieved"
134 Comments = "Click PROCEED to start Dough In"
135 call "switch_loop"
136 Print "Start of Dough In"
137 HLT = "HLT Temp" value
138 MTT = "Mash Tun Temp" value
139 Print "HLT Temp is:"
140 Print "HLT"
141 Print "Mash Tun Temp is:"
142 Print "MTT"
143 Print "_______________________"
144 BrewStatus = "Dough In"
145 "Brew Alarm" Active = false
146 "HLT GAS Cntl" Enabled = false
147 "HLT GAS Cntl" background = 1

Don't think the script is an issue, the script errored saying "line 144 Print "____________" was invalid".
Never had this fail, and have been running this version of my main script since Feb of this year. No sub script has been modified either.

I had been doing Remote Desktop sessions from my office computer and iphone to verify I could RD into the brew computer from inside and outside my home network. The only issue I had was that the brew computer did not redirect the sound to the brew computer monitor. I was trying to get that to work just before starting the brew, but ran out of time so I went without sound. Everything was normal until I pushed the button to start the mash steps after mash-in. That is when the program halted and I started troubleshooting.

Here is the controller log. You can see where I was trying to get the computer sound working and testing it by activating the 'brew alarm'. 'Alarm 1' is called when a desired temperature is reached, in this case when the mash-in temp is achieved, and you can see this at 09:48. At 09:49 I unlocked the workspace and started to troubleshoot.

08:54:09.281: Alarm 'Brew Alarm' activated
08:54:10.858: Alarm 'Brew Alarm' deactivated
08:59:02.240: Alarm 'Brew Alarm' activated
08:59:03.685: Alarm 'Brew Alarm' deactivated
09:13:48.545: Alarm 'Brew Alarm' activated
09:13:49.993: Alarm 'Brew Alarm' deactivated
09:48:53.778: Alarm 'Alarm 1' activated
09:49:04.709: Controller unlocked.
09:49:09.629: Alarm 'Alarm 1' deactivated
09:59:43.297: Alarm 'Brew Alarm' activated
10:00:10.795: Controller unlocked.
10:14:09.467: Alarm 'Alarm 1' activated
10:14:25.529: Alarm 'Alarm 1' deactivated
10:15:48.298: Alarm 'Alarm 1' activated
10:16:04.263: Alarm 'Alarm 1' deactivated
10:16:41.186: Device 'BruControl' @ 192.168.1.78 = Disconnected
10:16:41.217: Controller stopped.
10:16:58.552: Controller started.
10:16:58.552: Controller version 1.1 (build 0.22)
10:16:58.552: Loading global settings file 'C:\Users\User\Documents\BruControl\settings.brusettings'...
10:16:58.615: Loading configuration file 'C:\Users\User\Documents\BruControl\default.brucfg'...
10:16:58.740: Opening database: Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Documents\BruControl\Data\Data.mdf;Integrated Security=True
10:17:00.020: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoDue.brumc'...
10:17:00.066: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoMEGA.brumc'...
10:17:00.082: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP32.brumc'...
10:17:00.098: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP8266.brumc'...
10:17:00.113: Loading device definition file 'C:\Program Files (x86)\BruControl\FeatherM0.brumc'...
10:17:00.129: Loading device definition file 'C:\Program Files (x86)\BruControl\GrandCentralM4.brumc'...
10:17:00.144: Loading device definition file 'C:\Program Files (x86)\BruControl\M5_Stack.brumc'...
10:17:00.348: Starting data exchange servce...
10:17:00.363: Device 'BruControl' @ 192.168.1.78 = Connected
10:17:00.519: Failed to start data exchange service, exception: HTTP could not register URL http://+:8000/. Your process does not have access rights to this namespace (see Configuring HTTP and HTTPS - WCF for details).
10:17:42.548: Alarm 'Alarm 1' activated
10:17:58.462: Alarm 'Brew Alarm' activated
10:17:58.462: Alarm 'Alarm 1' deactivated
 
Ok, just starting testing the script again. It stopped at a new place saying [ERROR Line 21: Cannot assign a value to an immediate value]. Without entering a long winded script and log paste, let me say here that I added a fresh copy of my main program to my script list, named it Main 28FEB23 to better see last time it was modified, lowered my global temperature values below ambient (to allow the script to progress) and found everything is working.
Somehow my Main script became unstable? So bizarre.
 
Thanks going out to oakbarn for finding my issue. A line of code got modified and I did not find it for whatever reason. If/when something like this happens again, I now know where to look.
And now, back to brewing.
 
After many, many moons...the long awaited Uniflex is in the brewhouse and the build can begin.

The last few days have been dedicated to installing DIN rail wiring blocks and wire raceways.
image_67233025.JPG
 
Build update: Started extending and terminating the the sensors and valves. I'm adding about 10/11 feet of 22/4 shielded security cable to each sensor and valve. The cable terminations are microphone cable connectors and I'm adding a braided sleeve (blue - valve)(red - sensor). I'll eventually label each as well, but I've got a loooong way to go before I'm anywhere near finishing them.
image_50458625.JPG
image_50770177.JPG

Anyone have suggestions for how I can "bench test" these as I build each?
 
Just apply 24v to the open/close contacts according to your build pinout.
Thanks @RiverCityBrewer that makes sense for the Motorized 2-way valves, but for the pressure sensor (pins: 3(signal), 2(GND), 1(VCC)) I don't imagine this approach would provide any useful output.

Also, I have two proportional valves[not yet wired] (pins: 4(Feedback), 3(Control), 2(GND), 1(VCC)...not sure how to bench test these either.
 
Apologies in advance for a novice question, but I am compiling a table top dry run of devices to Brucontrol using an Arduino Mega with V46A firmware, and I am struggling to connect / get my single Adafruit Max31865 RTD to show any readings? For information I have connected the wiring as follows:
SCLK - Pin 50
SDO - Pin 51
SDI - Pin 52
CS - Pin 15
Thanks.
 
Thanks @RiverCityBrewer that makes sense for the Motorized 2-way valves, but for the pressure sensor (pins: 3(signal), 2(GND), 1(VCC)) I don't imagine this approach would provide any useful output.

Also, I have two proportional valves[not yet wired] (pins: 4(Feedback), 3(Control), 2(GND), 1(VCC)...not sure how to bench test these either.
For the pressure sensor, power it then put your multi-meter positive probe on the signal wire and negative to ground. Be gentle but you should get a voltage change when you touch the sensor membrane. The proportional valve will be more problematic unless you have a variable power supply that you can supply the signal to the valve to make it move. Otherwise you can power it and make sure it turns on and leave it at that until you have the panel ready.
 
For the pressure sensor, power it then put your multi-meter positive probe on the signal wire and negative to ground. Be gentle but you should get a voltage change when you touch the sensor membrane. The proportional valve will be more problematic unless you have a variable power supply that you can supply the signal to the valve to make it move. Otherwise you can power it and make sure it turns on and leave it at that until you have the panel ready.
Awesome, thank you for the advice. I'll report back results here when I complete some tests.
 
All of a sudden, I'm having a really strange issue (that I've now replicated on 3 different ESP32's that have been freshly flashed).

Regardless if I have anything connected to my ESP32 (replicated with nothing connected to my ESP32), whenever I enable a digital output device, I get a bad checksum error and the interface starts disconnecting/reconnecting.

Here's an example of the error. My RTD (SPI) inputs all seem ok. It's just when I enable a digital output (any pin):

1701199545609.png


Any suggestions?
 
Hi All, I should be grateful if you could help me please with guidance on how I can configure my two Fermenters (FV1 & FV2) each with a 12v 3 wire motorised valve activated via an individual 12v relay module so at the same time my single glycol pump (common to both FV’s) can be switched on at the same time a FV calls for cooling?
 
Hi All, I should be grateful if you could help me please with guidance on how I can configure my two Fermenters (FV1 & FV2) each with a 12v 3 wire motorised valve activated via an individual 12v relay module so at the same time my single glycol pump (common to both FV’s) can be switched on at the same time a FV calls for cooling?
Are you using Hysteresis for FV1 and FV2?
There is a Boolean script attribute of value associated with any Hysteresis element.
It is either true or false.
I do not know what this Boolean is representing but possibly if the Element has power or NOT?

If someone knows what the value attribute represents and it is if power is demanded by the element, then a simple if statement could work.

The only thing I could find in the Manual for scripts and is Hysteresis.


Hysteresis
o InputPortID (string)
o Target (number)
o OnOffset (number)
o OnDelay (number)
o Value (true/false)

if the value attribute is the POWER to the Hysteresis Element
then this script would work


You have two Hysteresis elements
FV1
FV2
You have a digital Output named SingleMainGylcol




new bool vBFV1
new bool vBFV2
[LooperFV]
sleep 100
vBFV1 = FV1 value
vBFV2 = FV2 value
if vBFV1 == true
SingleMainGylcol state = true
endif
// Or
if vBFV2 == true
SingleMainGylcol state = true
endif
//both FV1 and FV2 are False, turn off single valve
if vBFV1 == false
if vBFV2 == false
SingleMainGylcol state = false
endif
endif
goto LooperFV

The 3 wire valves may not work for Hysteresis, You would likely want a solenoid valve (16 awg wire to supply it with power)
or a two wire ball valve with auto close (not reverse polarity type)
 
Hi Oakbarn, Thanks for your help, which is much appreciated and I was planning to use Hysteresis elements for FV1 and FV2 and in a dry run scenario this works ok for the vales, but it is the glycol pump that I and struggling with, and thanks for the script and I’ll try this out.
 
Hi Oakbarn, Thanks for your help, which is much appreciated and I was planning to use Hysteresis elements for FV1 and FV2 and in a dry run scenario this works ok for the vales, but it is the glycol pump that I and struggling with, and thanks for the script and I’ll try this out.
As I said, I am not sure what the "value" is tied to, but hopefully, it is the state of the Hysteresis element. There is no state attribute of a Hysteresis element.

Let me know if that works. Unfortunately, I cannot test it here now.

If that does not work, I may have another idea that is clunky, but would likely work.
 
Alright...I've bench tested all of the valves and they're in good shape. Now I have a UniShield noobie question. I want to control these valves with the UniShield. Given that each valve has 3 wires (Open[Green], Close[Red], and PWR[Black]) what does the physical wiring look like? I know that the Unishield has the "Digital Out" capability that acts like a "switch"...but I'm not understanding what the wiring would look like.
Here's an example of the wiring scenario on the VA side of the base board for the UniShield:

1701929564845.png


Feel free to roast me on this, but it's late and I'm just scratching my head looking at it right now.
 
The wires should be
Black to Ground
Red to Close D Pin {Close Voltage)
Green to Open D Pin (Open Voltage)
You should never hook both a P Terminal and a D Terminal at the same time.

xx.png
 
here is a snippet of Script where I control the open and close of valves depending on the state of only On digital; output Element named "my_KD20_Valve_On"

it in a looping script

[Loop]

// HermsWort
if "my_KD20_Value_ON" state == true
"my_KD20_Value_OFF" state = false
else
"my_KD20_Value_OFF" state = true
endif
goto "Loop"
 
Hi, For my Fermenting Control ? Process, is there a way that I can create a single "Switch" via Device Elements that will be placed on the Workspace screen to give me an option to press "Start" / "Stop" which will then activate / control any elements (if disabled or not), as well as starting the corresponding scripts? Thanks.
 
I just upgraded to a professional license and am having trouble getting the data exchange service running. I am logged in as an administrator. When I click reserve URL an approval box appears. After clicking Yes, nothing happens. Is there anything else I can do? The base localhost is up and running on the computer. Any help is appreciated.
 
Hi, For my Fermenting Control ? Process, is there a way that I can create a single "Switch" via Device Elements that will be placed on the Workspace screen to give me an option to press "Start" / "Stop" which will then activate / control any elements (if disabled or not), as well as starting the corresponding scripts? Thanks.
I'm not sure if there is a more elegant way to do it; however, you can write some scripts that run on a loop to achieve what you're asking about I believe. Example:

[ACTIVATELOOP]
wait "Active Switch" State == on
"Device Element" enabled = true
start "Device Element Script"
goto "ACTIVATELOOP"

And in a separate script:
[DEACTIVATELOOP]
wait "Active Switch" State == off
"Device Element" enabled = false
stop "Device Element Script"
goto "DEACTIVATELOOP"
 
No, the release option is unavailable as well.
Solved it from this thread: netsh.exe: Error 87

Because my user name has a space in it, the built-in reservation button did not work. I had to go into the command prompt as an administrator and add double quotes around my user name.

C:\>netsh http add urlacl url=http://+:8000/ user="DOMAIN\my name"
 
Back
Top