• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BruControl: Brewery control & automation software

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
new value strike
new value grainweight
new value wtg
new value grainloss
new value evaprate
new value batchsize
new value boiltime
new value runoff
new value totalwater
new value remainsparge
new value evap

batchsize = "Batch Size gal" value
evaprate = "Boil Off Rate g/hr" value
grainweight = "Grain Weight lbs" value
wtg = "WTG Ratio qts/lb" value
boiltime = "Boil Time min" value

strike = grainweight * wtg
strike /= 4
strike precision = 2

grainloss = grainweight * .5
grainloss /= 4
grainloss precision = 2

evap = evaprate * boiltime
evap /= 60
evap precision = 2

runoff = batchsize / .96
runoff += evap
runoff precision = 2

totalwater = runoff + grainloss
totalwater precision = 2

remainsparge = totalwater - strike
remainsparge precision = 2
print
sleep 1000
goto "Loop"

Thanks in advance
 
Last edited:
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
new value strike
new value grainweight
new value wtg
new value grainloss
new value evaprate
new value batchsize
new value boiltime
new value runoff
new value totalwater
new value remainsparge
new value evap

batchsize = "Batch Size gal" value
evaprate = "Boil Off Rate g/hr" value
grainweight = "Grain Weight lbs" value
wtg = "WTG Ratio qts/lb" value
boiltime = "Boil Time min" value

strike = grainweight * wtg
strike /= 4
strike precision = 2

grainloss = grainweight * .5
grainloss /= 4
grainloss precision = 2

evap = evaprate * boiltime
evap /= 60
evap precision = 2

runoff = batchsize / .96
runoff += evap
runoff precision = 2

totalwater = runoff + grainloss
totalwater precision = 2

remainsparge = totalwater - strike
remainsparge precision = 2
print
sleep 1000
goto "Loop"

Thanks in advance
Not sure what you are trying to do here. If you are trying to manipulate the recipe inputs for you brew day calculations, there are a couple of issues. First, you don't want to loop. This should be a top section of your script like [setup] that is only run once. Alternatively, I have found that it is best to use the global variable in the brewday script calculations real time in case something changes during the brew and you want to make a change on the fly. I brewed this weekend and my sparge was not close to being done when my boil volume was almost met, so I was able to increase the boil volume by changing a global variable. If this was only used in the setup, the script would never check it again. Let us know if I misinterpreted what you are doing here and provide more details.
 
Not sure what you are trying to do here. If you are trying to manipulate the recipe inputs for you brew day calculations, there are a couple of issues. First, you don't want to loop. This should be a top section of your script like [setup] that is only run once. Alternatively, I have found that it is best to use the global variable in the brewday script calculations real time in case something changes during the brew and you want to make a change on the fly. I brewed this weekend and my sparge was not close to being done when my boil volume was almost met, so I was able to increase the boil volume by changing a global variable. If this was only used in the setup, the script would never check it again. Let us know if I misinterpreted what you are doing here and provide more details.
Thanks for taking a look. This would be set up but also running all day during the brew day for that reason also. I could adjust things on the fly like you mentioned. Most interested in if there is a different or better way to do same thing. Just learning script as this is my first one. My intention is to take recipe inputs and enter on this page, then have the output be in the brewday script like water level. I haven't started hop additons and timers yet, but they will also be here. Again, thanks for taking a look
 
So I think this was a poor coding practice on my part - taking advantage of the compiler that has now gotten more strict. I think all you need to do is declare the variable in the "BC Global Send" node by adding 'var' in front of each variable to be defined. Should be easy to find as the IDE puts a red line under all the syntax errors. Give that a try and let me know if that solves the issue.
View attachment 814810
Well thanks for that--that cleared up throwing an error when it ran.

My problem now is getting it out of node-red and into Brucontrol.

I slimmed down everything to the "Beer Name" for testing and can email you or anyone else the flow as it won't let me attach that kind of file here.

What I can tell you is that at every debug step I get the correct information until the last step.
For example, "Beer Parameters" (the next to the last stesp before I export to Brucontrol gives me the recipe Name:
----------------------
{
"_declaration": {
"_attributes": {
"version": "1.0",
"encoding": "ISO-8859-1"
}
},
"RECIPES": {
"RECIPE": {
"NAME": {
"_text": "Muddy Pig Oatmeal Stout"
},
"VERSION": {
"_text": "1"
},
"TYPE": {
"_text": "Extract"
},
"BREWER": {
"_text": "Brian Smith"
},
"ASST_BREWER": {},
"BATCH_SIZE": {
"_text": "18.9298909"
},
"BOIL_SIZE": {
"_text": "14.8285447"
},
"BOIL_TIME": {
"_text": "45.0000000"
},
"EFFICIENCY": {
"_text": "75.0000000"
},
"HOPS": {
"HOP": [
{
"NAME": {
"_text": "Cluster"
...
________________


But "BC Global Send" gives me:

--------------------
msg.payload : array[1]
array[1]
0: object
Name: "Beer Name"
Value: undefined
----------------------

Since the "Value" is undefined, this makes me think that the msg. payload statement also needs to be updated:
----------------------
msg.remainder = 0
var Name = msg.Name
msg.payload = [

{ "Name": "Beer Name", "Value": Name },

]

return msg;
---------------------------
As the value is clearly stated in the previous debug as: "Muddy Pig Oatmeal Stout"

I'll start researching it, but if you or anyone else sees the error, I would greatly appreciate your insight.

Many thanks in advance.
 
We should take this to PM to keep from cluttering the board, but it looks like you are still in XML format, and ideally you should be converted to JSON for easier data manipulation and transfer to BC. I'll PM you.

Joe
 
If anyone is experimenting with the new SQL database and want an easy way to get a list of element names and their corresponding ID without having to search through the default.brucfg file I have put together a PowerShell script that generates a text file with the Element Name, ID, and Element Type. Example shown below. I am not sure how to attach a file so I have included the PowerShell code below as well. Just need to copy it into Notepad and save it as a .ps1 file and run it in Powershell. It will generate a text file on your desktop called ElementIDs.txt. This should make it easier till the issue that BrunDog mentioned in a previous post is taken care of. If you have any questions or need any help please let me know.

Output
BDO34_HLTELM - f4a39ba6-7f90-4246-9575-184966cb142b - (DeviceElement)
BDO36_BKELM - 1a8c9a2f-6165-4288-b083-45b2700db299 - (DeviceElement)
BK_TARGET_TEMP - 706b0100-fc96-487a-a2b2-881dcd66b1f5 - (GlobalVariableElement)

PowerShell Code
Code:
#Get BruControl Folder Path
$BCPath = [Environment]::GetFolderPath("MyDocuments")
$BCPath = $BCPath + "\BruControl\default.brucfg"
#Text File Path
$OutFilePath = [Environment]::GetFolderPath('DesktopDirectory') + "\ElementIDs.txt"

#Create Text File
New-Item $OutFilePath

#Read BRUCFG file as XML
[xml]$CFGFile = Get-Content $BCPath


$Data = $CFGFile.Configuration.Workspaces.Workspace.Elements.Element

#Read through each Element and log Name and ID to text file
foreach ($Element in $Data)
{
    $ElementData = $Element.Name + " - " + $Element.ID + " - (" + $Element.Type + ")"
    Add-Content -Path $OutFilePath -Value $ElementData
}
Thanks for sharing this handy Element Identifier, I'm not code savy but this was so simple to use. I tried it and now have a summarized Device/Chart/Global Variable Element cheat sheet which I've pinned to my desktop.
 
Last edited:
This is a script to run on a workspace just for adding in recipe prep variables. I know the variables may change but does anyone see problems with this script? I am mainly interested if something needs changed to use in brew day script. The "" are global variables and all others are element inspectors

[Loop]
I use Globals for my variables.
 
Hello everyone, I was wondering if there is any news on an updated version of BC? It’s been almost two years since the last update in June 2021.
Looking forward.
@BrunDog
 
Good one! I will add exponents to the list. This is easy to do. In the meantime, you gotta do it old school. Here is a script example:

Code:
new value base
new value exp
new value result
base = 5
exp = 3
result = base
[exp_loop]
result *=  base
exp -= 1
if exp > 1
goto "exp_loop"
endif
print result
stop "script_name"
Could you add the Tinseth formula to BruControl?
 
I guess I should know this by now, but I am looking for a Brucontrol Control Element called "Prop Valve".. I recently worked on Background Image and moved stuff around; it vanished! I suspect it is sitting underneath some existing Element, who knows.

It should be hooked to my BC port 4 - any idea how to search for an Element? I switched the visibility icon "on" - no luck so far..
 
It is a Pita and most likely under another element. I have had to find one that was "lost" more than once.

You can look into your configuration file with something like Notepad ++ (I would make a copy and look in the copy) but it is still had to find where it is that way as it will only tell you what Workspace it is on and that it exists.

There are 3 likely possibilities in my mind in this order:
1. Moved Under a different Element
2. Moved to a different Workspace
3. Deleted.

It is easy to check if it was deleted. Try to create another Element on Port 4. If the same type of Element is available in the list, it was deleted.

If moved to a different Workspace, it will be on Top. Open all your Workspaces with the ALL SEEING EYE clicked.

If It is hidden behind a different Element: This is the most likely and also the hardest to find.

Create a new temporary Workspace. With the All Seeing Eye clicked, move each Element of the Workspace to the new Workspace. Each element maintains, it spacing and position, but is in reverse stacked order. You may find your missing element. Move it to the new workspace and move only it to a corner. Move all of the Elements on the Temporary Workspace back to the Original Workspace. Finally move the "lost" one back to the Orginal Workspace. It will be in the corner where you moved it and it will be stacked On Top. If you have elements stacked on top one another, you may need to change the Z order if you somehow changed the order when moving.


That is the reason I requested a "path" for backgrounds and wav files as I have many Alarms. Since it only has 3 Choices for each Alarm, I have several Alarms that are stacked, and they are hard to find.
 
Could you add the Tinseth formula to BruControl?
Not sure how or what formula would be added, as this can already be scripted given you have all the proper variable inputs.
1679916309108.png


[CODE]//mg/l AA = (AA rating in decimal x oz of hops x 7490) / gallons of wort //Bigness factor = 1.65 x 0.000125^(wort gravity - 1) //Boil Time Factor = (1- 2.71828^(-0.04 x Hop Time)) / 4.15 //AAU = Bigness Factor x Boil Time Factor //IBU = AAU x mg/l AA new value x new value AA1 new value AA2 new value BF BF precision = 4 new value BFexp BFexp precision = 4 new value BTF1 BTF1 precision = 4 new value BTF1exp new value BTF2 BTF2 precision = 4 new value BTF2exp //calc hop 1 aa mg/l AA1 = "Hop 1 AA" Value / 100 AA1 *= "Hop 1 Weight OZ" Value * 7490 AA1 /= "Boil Vol Gal" Value //calc hop 2 aa mg/l AA2 = "Hop 2 AA" Value / 100 AA2 *= "Hop 2 Weight OZ" Value * 7490 AA2 /= "Boil Vol Gal" Value //calc bigness factor BFexp = "Boil Gravity OG" Value - 1 BF = .000125 ^ BFexp BF *= 1.65 //calc Boil Time Factor for each hop BTF1exp = -0.04 * "Hop 1 Boil Time MIN" Value x = 2.71828 ^ BTF1exp BTF1 = 1 - x BTF1 /= 4.15 BTF2exp = -0.04 * "Hop 2 Boil Time MIN" Value x = 2.71828 ^ BTF2exp BTF2 = 1 - x BTF2 /= 4.15 //calc utilization for each hop BTF1 *= BF BTF2 *= BF //calc hop addition IBU "Hop 1 IBU" value = AA1 * BTF1 "Hop 2 IBU" value = AA2 * BTF2 //calc total IBU "Total IBU" Value = "Hop 1 IBU" Value "Total IBU" Value = "Total IBU" Value + "Hop 2 IBU" Value stop "IBU_SCR" [/CODE]
 
@RiverCityBrewer
Thanks, This really helped.

I was creating something like this but I was having trouble with expontent calculation.

Do you know how to take the your "Hop 1 Boil Time MIN" and convert to a Time?


I have some globals that use a time to compare with my Boil Timer to drop a Hop. I regularly boil for 90 min and sometimes drop hops at 00:01:30:00 (90 min) or 00:01:15:00 (75 min). I have the drop times as global time elements and have started to create global value elements for the minutes.

I need to convert the Hop 1 MIN (a value global ) to Hop 1 Drop (a time global)

If you look at Hop 2 I have 60 min in Hop 2 MIN and Hop 2 Drop is 00:01:30:00. Hop 2 Drop would need to be converted to 00:01:00:00

This is a pix of my Recipe Workspace where I have various times and Volumes and setpoints for a Brew that we are doing.

I am still trying to get my BrewSmith 3 xml file to import as I have a couple of Glitches in my code still, but the Hop Drop time comes over as minutes.
<Time> 60.00000000</Time>
 

Attachments

  • time.png
    time.png
    149.9 KB
My Code for the IBU Calculations . I modified @RiverCityBrewer 's code to match my named globals for up to 8 hop additions

//scrIBU
//Calculate IBU
//03/27/2023:08:25
//© OakBarn Brewery
// Lots of Help with Orginal Code from @RiverCityBrewing
Code:
//mg/l AA = (AA rating in decimal x oz of hops x 7490) / gallons of wort
//Bigness factor = 1.65 x 0.000125^(wort gravity - 1)
//Boil Time Factor = (1- 2.71828^(-0.04 x Hop Time)) / 4.15
//AAU = Bigness Factor x Boil Time Factor
//IBU = AAU x mg/l AA
// Euler's number
new value "Euler's number"
"Euler's number" =  2.7182818284590452353602874713527
new value "e^ X"
new value "A _A_U"
new value BF
BF precision = 4
new value BFexp
BFexp precision = 4
new value BTF1
BTF1 precision = 4
new value BTF1exp
//calc hop 1 aa mg/l
"A _A_U" = "gblV_Hop1_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop1_R1" Value * 7490
"A _A_U" /= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop1_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop1_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop2 aa mg/l
"A _A_U" = "gblV_Hop2_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop2_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop2_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop2_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop3 aa mg/l
"A _A_U" = "gblV_Hop3_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop3_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop3_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop3_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop4 aa mg/l
"A _A_U" = "gblV_Hop4_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop4_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop4_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop4_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop5 aa mg/l
"A _A_U" = "gblV_Hop5_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop5_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop5_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop5_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop6 aa mg/l
"A _A_U" = "gblV_Hop6_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop6_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop6_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop6_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop7 aa mg/l
"A _A_U" = "gblV_Hop7_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop7_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop7_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop8_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc hop2 aa mg/l
"A _A_U" = "gblV_Hop8_Actual_AAU_R1" Value / 100
"A _A_U" *= "gblV_Oz_Calculated_Hop8_R1" Value * 7490
"A _A_U"/= "gblVBrew_Lenght_R1" Value
//calc bigness factor
BFexp = "gblV_BoilGravity_R1" Value - 1
BF = .000125 ^ BFexp
BF *= 1.65
//calc Boil Time Factor for each hop
BTF1exp = -0.04 * "gblV_TimeHop8_Min_R1" Value
"e^ X"  = "Euler's number"  ^ BTF1exp
BTF1 = 1 - "e^ X"
BTF1 /= 4.15
//calc utilization for each hop
BTF1 *= BF
//calc hop addition IBU
"gblV_Hop8_Calc_IBU_R1" value = "A _A_U" * BTF1
//calc total IBU
"gblV_HBU_R1" Value = "gblV_Hop1_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop2_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop3_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop4_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop6_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop7_Calc_IBU_R1" Value
"gblV_HBU_R1"  Value = "gblV_HBU_R1" Value + "gblV_Hop8_Calc_IBU_R1"Value
delete "e^ X"
delete  "A _A_U"
delete BF
delete BFexp
delete  BTF1
delete BTF1exp
stop "scrIBU"
 
OK, this is a little convoluted and I may be taking advantage of a bug/feature in the interpreter, but here is how I got that to work. It looks like you can't put a raw value to a time without it becoming a very large time value, but you can convert the value to a string and push the string directly to the time.
Hop MIN is your Global Value
Hop Time is your Global Time

new string x
new value y
new string z
y precision = 0

if "Hop MIN" Value >= 60
y = "Hop MIN" Value
y -= 60
z = y
x = "01:" + z
"Hop Time" Value = x
else
x = "00:" + "Hop MIN" Value
"Hop Time" value = x
endif
 
I guess I should know this by now, but I am looking for a Brucontrol Control Element called "Prop Valve".. I recently worked on Background Image and moved stuff around; it vanished! I suspect it is sitting underneath some existing Element, who knows.

It should be hooked to my BC port 4 - any idea how to search for an Element? I switched the visibility icon "on" - no luck so far..
You can also go to a backup but you would loose andy changes made to the configuration including your lost element so it would be where it was.

I always make a quick backup before I start some major changes and then make peroidic backups when I am happy with my changes.
 
OK, this is a little convoluted and I may be taking advantage of a bug/feature in the interpreter, but here is how I got that to work. It looks like you can't put a raw value to a time without it becoming a very large time value, but you can convert the value to a string and push the string directly to the time.
Hop MIN is your Global Value
Hop Time is your Global Time

new string x
new value y
new string z
y precision = 0

if "Hop MIN" Value >= 60
y = "Hop MIN" Value
y -= 60
z = y
x = "01:" + z
"Hop Time" Value = x
else
x = "00:" + "Hop MIN" Value
"Hop Time" value = x
endif
Thanks. Worked great. I have most of the hop calculations done. I have been changing the hops due to the fact that when you import the xml, you could have up to 8 hops. Before I had it set for 2 Bitter Hops, 2 Flavor Hops, and 2 Aroma Hops. I now have generic Hops (Hop 1 to Hop 8).

I needed to rework because sometimes I had 3 flavor hops at different drop times. I just need to rework my "alarms " a little. Since I have up to 8 hops, I will need 3 "Alarm" Elements as I change the background and the wav file depending on if a Bitter Hop, a Flavor Hop or an Aroma Hop. I also have a Hop Rocket and need a different "background" and wav file for that. Would be nice (at least for the "Alarms") to have a path for Background 1 and File 1, that way I would only need one alarm element.

I did a lot of testing and the Calculated IBUs work well. They are affected as you would expect. As an Example, a Hop at 0 min has 0 IBUs. I have the recipe AAU and Oz, but also have an Actual AAU on My Hop Page that calculates the OZ needed. Beer Smith 3 does not have an easy method to do that.

I did have to make sure that any AAU is not zero as it caused my Hop OZ to go to infinity.
 
You can also go to a backup but you would loose andy changes made to the configuration including your lost element so it would be where it was.

I always make a quick backup before I start some major changes and then make peroidic backups when I am happy with my changes.
So I have the Element on Port 6, confimed with my wiring map and physcial wiring in my control panel. If only I could make it reappear... I don't want to go back in time and lose recent changes!!
 
Open your default.brucfg file and do a search for the Element name you are looking for. It will tell you the X/Y coordinates of the element on the screen. You can also dig down into that file a little more and it'll tell you what workspace its on. Would be at least a place to start.

**Don't save the file if it prompts when you close it**

1680002840873.png
 
Open your default.brucfg file and do a search for the Element name you are looking for. It will tell you the X/Y coordinates of the element on the screen. You can also dig down into that file a little more and it'll tell you what workspace its on. Would be at least a place to start.

**Don't save the file if it prompts when you close it**

View attachment 816265
OK, I found it;
Name>Prop Valve</Name>
<UserControl>true</UserControl>
<Width>260</Width>
<X>90</X>
<Y>540</Y>

Still no trace of this Element on my actual workspace; could I delete it from the backup config file and then somehow upload to Brucontrol?
 
Were you able to determine which workspace it was on? Also, scroll up and look for BackgroundImageIndex for that Element and make sure its set to 0. Looks like it should be on the left side of your screen about halfway down.
 
I only have one workspace, and I see nothing at the x and Y location - this Element remains invisible.

Meanwhile I attempted to go back in time and use a previous config from the automatically backed up files, and now my workspace is blank…. this is not good!!!
 
07:28:21.278: File created 03-28-2023
07:28:23.430: Device 'Interface 3' @ 192.168.2.35 = Disconnected
07:28:25.160: Device 'Interface 3' @ 192.168.2.35 = Connected
08:25:35.304: Controller unlocked.
08:27:07.483: Controller unlocked.
08:40:40.827: Controller unlocked.
08:41:00.048: Controller unlocked.
08:42:18.702: Controller unlocked.
12:33:21.891: Controller unlocked.
15:44:47.620: Device 'Interface 3' @ 192.168.2.35 = Disconnected
15:46:33.774: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\3.brucfg'...
15:46:33.868: Device 'Interface 3' @ 192.168.2.35 = Connected
15:51:12.582: Device 'Interface 3' @ 192.168.2.35 = Disconnected
15:51:12.644: Controller stopped.
15:53:01.676: Controller started.
15:53:01.691: Controller version 1.1 (build 0.22)
15:53:01.707: Loading global settings file 'C:\Users\Carine Luys\Documents\BruControl\settings.brusettings'...
15:53:02.322: Created default configuration file.
15:53:02.378: Opening database: Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Carine Luys\Documents\BruControl\Data\Data.mdf;Integrated Security=True
15:53:16.857: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoDue.brumc'...
15:53:17.069: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoMEGA.brumc'...
15:53:17.477: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP32.brumc'...
15:53:17.776: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP8266.brumc'...
15:53:18.104: Loading device definition file 'C:\Program Files (x86)\BruControl\FeatherM0.brumc'...
15:53:18.776: Loading device definition file 'C:\Program Files (x86)\BruControl\GrandCentralM4.brumc'...
15:53:19.145: Loading device definition file 'C:\Program Files (x86)\BruControl\M5_Stack.brumc'...
15:55:53.279: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\test3.brucfg'...
15:56:24.264: Controller stopped.
15:56:46.008: Controller started.
15:56:46.071: Controller version 1.1 (build 0.22)
15:56:46.086: Loading global settings file 'C:\Users\Carine Luys\Documents\BruControl\settings.brusettings'...
15:56:46.313: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\test3.brucfg'...
15:56:46.384: Opening database: Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Carine Luys\Documents\BruControl\Data\Data.mdf;Integrated Security=True
15:57:21.189: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoDue.brumc'...
15:57:21.274: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoMEGA.brumc'...
15:57:21.461: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP32.brumc'...
15:57:21.944: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP8266.brumc'...
15:57:22.104: Loading device definition file 'C:\Program Files (x86)\BruControl\FeatherM0.brumc'...
15:57:22.884: Loading device definition file 'C:\Program Files (x86)\BruControl\GrandCentralM4.brumc'...
15:57:23.325: Loading device definition file 'C:\Program Files (x86)\BruControl\M5_Stack.brumc'...
15:58:47.561: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\UniFlex_1V_PropSSR.brucfg'...
15:59:09.908: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\test3.brucfg'...
15:59:18.537: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\3.brucfg'...
16:00:00.583: Controller stopped.
16:00:53.327: Controller started.
16:00:53.343: Controller version 1.1 (build 0.22)
16:00:53.358: Loading global settings file 'C:\Users\Carine Luys\Documents\BruControl\settings.brusettings'...
16:00:53.618: Created default configuration file.
16:00:53.659: Opening database: Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Carine Luys\Documents\BruControl\Data\Data.mdf;Integrated Security=True
16:00:58.527: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoDue.brumc'...
16:00:58.605: Loading device definition file 'C:\Program Files (x86)\BruControl\ArduinoMEGA.brumc'...
16:00:58.637: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP32.brumc'...
16:00:58.668: Loading device definition file 'C:\Program Files (x86)\BruControl\ESP8266.brumc'...
16:00:58.715: Loading device definition file 'C:\Program Files (x86)\BruControl\FeatherM0.brumc'...
16:00:58.746: Loading device definition file 'C:\Program Files (x86)\BruControl\GrandCentralM4.brumc'...
16:00:58.777: Loading device definition file 'C:\Program Files (x86)\BruControl\M5_Stack.brumc'...
16:03:41.243: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\default.brucfg'...
16:03:47.857: Loading configuration file 'C:\Users\Carine Luys\Documents\BruControl\3.brucfg'...
 
At 16:00:53, you can see it created a default config file, and 16:03:41 it loaded that default config, so whatever you did to try and restore the backup file didn't work. Change the file extension of the default.brucfg file to something else, then copy a backup file and name it exactly the same, default.brucfg
 
So thanks to @RiverCityBrewer, I discovered that I had a file extension issue. To sum up, Brucontrol configuration can only use .brucfg files. In order to see the actual file extensions you need to make the following selection in Windows;

1680096293224.png
 
Does the script Clear command just clear the variables within the script where it was executed, or is it universal and clear All variables across scripts?
 
I came across this at automation direct; I wonder if Brucontrol would work with this Arduino compatible CPU? If affirmative, would there be any advantage to using such line of products?

1680545197963.png
 
I came across this at automation direct; I wonder if Brucontrol would work with this Arduino compatible CPU? If affirmative, would there be any advantage to using such line of products?

View attachment 816781
We did some initial development on the firmware for this, but there wasn't a ton of interest so redirected attention elsewhere. The I/O is not too trivial, as they use a bus system, so we need to customize a chunk of the handling for each element type. Not that difficult, just requires time.
 
Back
Top