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.
hi im having issues with a linear offset affecting hysteresis output. this should be visible in the pic, looking for 2 C setpoint temp, but it seems to be controlling it to 0.5C. I have a linear offset of -1.7 on this probe from checking its output against known temp. this combined with the "ON" offset on the hysteresis of 0.2 seem to be moving the setpoint to 0.5 instead of 2. in the manual it says that some calibrations can affect outputs in unexpected ways. i didnt think the calibrations should affect setpoints , is this a system error or am i misunderstanding this?
offset example.png
 
I am having some issues with the W5500 linking up to certain pieces of network gear, such as a new Cisco WS-C2960L-24PS-LL It happens with both the MegaEth Robotdyn and the W5500 add-on board... older WS-C3560-24PS-S and a dumb old-school home router with the dhcp turned off used as a switch will allow them to connect. Researching, I think I am running into this problem on the Wiznet forum. What kind of setup if any does BruControl do to the W5500 with regards to auto-negotiation, speed and duplex? I am guessing this would be buried in the 'BruControl.45E.MEGA.E.hex' file...
 
If you go into the switch and force the ports to be 10Mbs or 100Mbs (still autoneg) does it link up?

I guess you could try forcing 100Mbs Half Duplex with no autoneg on the port and see if it links up. That should force the W5500 to go to 100Mbs/Half Duplex if it is acting correctly. Likewise, you could do the same at 10Mbs/Half Duplex.

Turning autoneg off isn't really a great solution for the long term, though not that having full duplex shouldn't matter much for this application.
 
Last edited:
hi im having issues with a linear offset affecting hysteresis output. this should be visible in the pic, looking for 2 C setpoint temp, but it seems to be controlling it to 0.5C. I have a linear offset of -1.7 on this probe from checking its output against known temp. this combined with the "ON" offset on the hysteresis of 0.2 seem to be moving the setpoint to 0.5 instead of 2. in the manual it says that some calibrations can affect outputs in unexpected ways. i didnt think the calibrations should affect setpoints , is this a system error or am i misunderstanding this?View attachment 661311

Sorry... this isn't well documented... offset and multiplier calibrations for 1-wire do not work. This is because the temperature calculation is made by the sensor. That said... these sensors have a specified accuracy, so there should be no need to calibrate them for temperature.
 
I am having some issues with the W5500 linking up to certain pieces of network gear, such as a new Cisco WS-C2960L-24PS-LL It happens with both the MegaEth Robotdyn and the W5500 add-on board... older WS-C3560-24PS-S and a dumb old-school home router with the dhcp turned off used as a switch will allow them to connect. Researching, I think I am running into this problem on the Wiznet forum. What kind of setup if any does BruControl do to the W5500 with regards to auto-negotiation, speed and duplex? I am guessing this would be buried in the 'BruControl.45E.MEGA.E.hex' file...

I've only heard of incorrect resistors on board: https://forum.arduino.cc/index.php?topic=620979.0

It's set to default auto-negotiation in the firmware.
 
Sorry... this isn't well documented... offset and multiplier calibrations for 1-wire do not work. This is because the temperature calculation is made by the sensor. That said... these sensors have a specified accuracy, so there should be no need to calibrate them for temperature.

ok cheers will try something else. i realise they shouldnt need calibration , this one however is definitely off, will get around to changing it eventually.
 
I've only heard of incorrect resistors on board: https://forum.arduino.cc/index.php?topic=620979.0

It's set to default auto-negotiation in the firmware.

if it was just the W5500 addon board, I would agree with the possibility of substandard hardware, but it also happens on my RobotDyn MegaEth2560. Also, my Official WiznetW5500 is stamped 'made in Korea', and bought from a reputable supplier (newark or digikey). I am guessing that gigabit and other newer switches are more picky on auto-negotiation, someone has to have done real troubleshooting of a problem of a similar nature, using o-scope and digital analyzers and stuff... I need to research a bunch more..

I am going to probe and solder stuff I guess I will do it on one of those wiznet boards, would be neat to have duplex be changeable in the setup where you set DHCP, but even if you addressed that very low priority issue, it is probably only 50/50 chance it will fix it... maybe put it on bottom of the list, lowest priority, as you have fixed a lot of things I have asked for, and I am beyond grateful...

edit - Looking at my board and the wiznet docs, my TXN/TXP (R10 and R11 on W5500 v1.1) resistors are correct, they have a '68X' marking, which is 49.9 ohms, and the 3rd resistor, R12 is marked '01X', which is 10 ohms, and the schematic says '10R', which I assume means 10 ohms
 
Last edited:
To the point of picky autoneg, if the port is forced to be 100Mbs Half Duplex the auto negotiation is generally (at least in my dated experience doing network equipment testing) no longer in the picture. The port will source 100Mbs idle stream rather than the link test pulse packets used for autoneg and the other end (W5500 in this case) will see that incoming idle stream and go to 100Mbs Half Duplex as well.

It's possible that the switch is just changing what it advertises in the autoneg packets, but that would seem like an odd thing to do.
 
Pete, I'm having an issue where if one alarm is active and another is triggered, an email or sound notification will not be sent.

Also, is there a way we can disable sounds on alarms? I think there should be a "mute" option within each alarms settings.
 
The multiple alarm issue is known and I believe it has been stated (somewhere?) that it is being addressed in an upcoming release. If you just need as a notification, use a script to reset it shortly after it triggers.
 
Yes, we’ve fixed the alarm issue. In terms of sound, I never considered a silent alarm. I suppose if you just want the email, it makes sense. We can add a switch for this but in the meantime perhaps you can find an empty wav file on the Internet. It will play but not make any sound.
 
The multiple alarm issue is known and I believe it has been stated (somewhere?) that it is being addressed in an upcoming release. If you just need as a notification, use a script to reset it shortly after it triggers.

Ok will do till the new release

I ran your TILT smoothing script last batch and it went flawless. This batch I’m observing 0 value on both abv and AA. Not sure why..any suggestions?
 
What version added the DisplayName property to Elements? Is is it added? Is it accesible only script or via the element itself? I’m running 1.1.0.4. Thx.
 
Yes, we’ve fixed the alarm issue. In terms of sound, I never considered a silent alarm. I suppose if you just want the email, it makes sense. We can add a switch for this but in the meantime perhaps you can find an empty wav file on the Internet. It will play but not make any sound.

Ya in my setup I won’t always be there waiting to hear the alarm. Might frighten the customers lol
 
What version added the DisplayName property to Elements? Is is it added? Is it accesible only script or via the element itself? I’m running 1.1.0.4. Thx.

It’s not released. Done, but not posted yet. We have the SQL database back end working well. Reduced overhead as far as I can tell. Tryna get a few more items, including Profiles added.
 
I ran your TILT smoothing script last batch and it went flawless. This batch I’m observing 0 value on both abv and AA. Not sure why..any suggestions?

Did it work on the previous batch? What do the script variables say for aa, abv, og, and curravg? If you renamed anything it would need to carry through the whole script. Obviously, if any elements are named the same as the script variables, things will go poorly, though I think it would error out and not run.
 
Last edited:
Did it work on the previous batch? What do the script variables say for aa, abv, og, and curravg? If you renamed anything it would need to carry through the whole script. Obviously, if any elements are named the same as the script variables, things will go poorly, though I think it would error out and not run.
Yes it worked flawlessly. I have confirmed globals are named FV-1 SG AVG, FV-1 ABV and FV-1 AA.. I dont recall changing anything in the script below as it was working.

None of the elements are named the same as the script variables.

Code:
[setup]
new value OG
OG precision = 0
new value CurrSG
CurrSG precision = 0
new value CurrAvg
CurrAvg = 0
new value OGcalc
OGcalc = 0
new value ABV
new value AA
new value SGAVG
SGAVG precision = 4
new value SGRAW
SGRAW precision = 4
new value SGUPD
SGUPD precision = 4
SGAVG = 0
SGRAW = 0
new value Tilt
Tilt = 0
new bool FV1Active
new bool FV2Active
FV1Active = False


[check_active]
if "FV-1 AUTO" state == True
    if FV1Active == False
        //Set AVG to current Tilt value on startup
        "FV-1 SG AVG" Value = "FV-1 BLACK" SG
        FV1Active = True
    endif
    if "FV-1 BLACK" SG > 1.001  //Check if tilt reading is valid
        Tilt = "FV-1 BLACK" SG  //capture raw tilt reading
        SGUPD = "FV-1 SG AVG" Value * .80  //weight current average at 80%
        OG = "FV-1 OG" Value  //grab recipe OG for calcs
        CurrAvg = "FV-1 SG AVG" Value  //grab current average for calcs
        call calculate
        //update calc display
        "FV-1 SG AVG" Value = SGAVG
        "FV-1 AA" Value = AA
        "FV-1 ABV" Value = ABV
    endif
else
    FV1Active = False
endif

sleep 600000
goto check_active

[calculate]
//Update rolling gravity average
SGRAW = Tilt * .20  //new tilt reading weighted at 20%
if SGUPD < .5  //make sure 80% average makes numerical sense
    SGUPD = Tilt
endif
SGAVG = SGUPD + SGRAW  //update average

//Update Attenuation
OGcalc = OG - 1
OGcalc = OGcalc * 1000
CurrSG = CurrAvg - 1
CurrSG = CurrSG * 1000
AA = OGCalc - CurrSG
AA = AA / OGCalc
AA = AA * 100

//Update ABV
ABV = OG - CurrAvg
ABV = ABV * 131.25
return

[end]
stop "FV-1 FERMENTATION CALCS"
 
I don't see anything wrong with the script, and if its updating the average it means its running through without an error on the calcs. Can you check the script variables and see if they are all populated? Can you post a screenshot of the whole script variable section? If aa and abv have a number in them it would be something with the transfer of that data to the global itself.
 
I don't see anything wrong with the script, and if its updating the average it means its running through without an error on the calcs. Can you check the script variables and see if they are all populated? Can you post a screenshot of the whole script variable section? If aa and abv have a number in them it would be something with the transfer of that data to the global itself.

Ah it’s working now. I guess SG average didn’t show a number less than OG so as a result ABV and AA are at 0.
 
Good, I was wondering about that when you said "last batch" and "this batch". Figured it might be that or possibly a precision issue.
 
@BrunDog In terms of script execution and utilized resources, are the wait and looped if statements identical? Or is the wait command interrupt driven.

For example, in the two scenarios below, which is the better in terms of system resources?

/*
[main]
if A > B
do stuff
endif
goto "main"
*/

And

/*
[main]
wait A > B
do stuff
goto "main"
*/
 
IIRC the script relies on internal timers. In terms of which should be less resource intensive, et me check with my partner and get back to you.

That said, the wait statement is kind of fool-proof as you don’t need to sweat execution speed. The if loop should have a delay interjected to mitigate unnecessary execution speed - but I know you know that. The if loop also gives the script a chance to do other things whereas the wait statement basically pauses the script execution.
 
I am having an odd issue. Sometimes (it is intermittent) when I first open BruControl, I have Elements stacked on top and use the Z order and visibility property to hidden for the top Element. I do not hide the underlying Element. Sometimes the Z Order does not seem to work as the underlying element is displayed ON TOP. If I go to the real top Element and open the properties Appearance Dialog, it pops right back on top and seems to work from then one. I guess I could go through my script and hide the underlying Element and it would fix the issue, but adds lines to my script that should be unnecessary.

This is a new problem that has just started happening so it must be related to something I change on a Workspace or in a Script, but I have no idea of what that was.


I am hoping that the Alarm wav file is fixed. It would also be great to have the No Wav File property. Because there is no way to set the wav file in a script, I have created many hidden Alarms that just play the wav file that I desire for an Alarm. I only have one Alarm that is visible when it is active. I make the first Alarm Active then after a short Sleep, I make the visible Alarm Active. It sounds like your fix will break my logic in the Scripts.

I did the one visible Alarm because I had created a lot of Alarms that were stacked. It became a nightmare to find the Alarm in the stack and because it covered other Elements that when I wanted to look at that Element(s) under the Alarm Stack, I had to move all the Alarms them but them back. PITA.

I have 29 separate wav files that I play. 23 have a visible Alarm.

As a side note: Why so many. A lot have to do with Hops. I give a 15 minute warning (sound only) and a one 1 minute warning (sound only) and the a hidden alarm for the Drop along with a visible ALARM. I have many hop alarms depending if there are any conflicts with Timing between a Hop Drop and another Alarm. AS an Example, I have an Alarm to drop the Yeast Nutrient and Whirlfloc at 15 minutes remaining on the Boil Timer.

This could conflict with a 15 min Flavor hop Drop or a End of Boil Aroma 15 Minute warning or a 15 min Flavor hop Drop AND End of Boil Aroma 15 Minute warning. So I need four wav files just for the 15 minutes remaining Alarms.

1: No Conflict: Drop Yeast Nutrient and Whrilfloc NOW.
2. 15 Minute Flavor Hop: Drop Yeast Nutrient and Whrilfloc and Flavor Hop #1 NOW. (Yes I actually have more as it could be Flavor Hop #2)
3. End of Boil Hops: Drop Yeast Nutrient and Whrilfloc NOW. 15 Minutes to Aroma Hop Drop at End of Boil.
4. 15 Minute Flavor Hop and End of Boil Hops: Drop Yeast Nutrient and Whrilfloc and Flavor Hop #1 NOW. 15 Minutes to Aroma Hop Drop at End of Boil.

A great way to fix this for me would be a property for the alarm like wavfile that allowed to change the path with a script:

"MyAlarm1" wavfile = "C:\\BruControl\Media\myownwavfile.wav"

Because BruControl throws an exception if the path is not a wav file, that would either need to be tested by the end user, or the exception allowed and not throw an an exception. I personally can do my own testing to make sure the path is proper as the End User.

That would be so much easier.

That would also be very handy for Background Image 1 with a property like image1 that allowed me to change the path of the background image 1. This would allow unlimited backgrounds.

"Any Element" image1 = "C:\\BruControl\Media\any.jpg"

and the background of a workspace would need a new command:

backimage "my Workspace1" = "C:\\BruControl\Media\any.jpg"

What is the wav file logic in the fix?
This is my current logic:

Alarm1 active = true
//plays the desired wav file
sleep 500
VisibleAlarm visibility = visible
VisibleAlarm active = true
//Since Alarm1 wav file is playing, VisibleAlarm does not sound
wait VisibleAlarm active == false
Alarm1 active = false
VisibleAlarm visibility = hidden

One fix I have thought of is to create an Alarm Workspace that Only has the Alarms on it. I would still have to stack 23 Alarms into a pile and make them visible when Active and then return to my Main brew workspace.

I have used https://www.text2speech.org/ to create unique Alarms.

BTW, an easy fix to the no sound may be that you select Custom wav file but the path is empty or not a .wav file If you do that now, it still plays the default. I also tried to enter a path with a jpg (hand typed in) as the chosen wav file and it throws an exception.
 
Updated the FW to v45F for the ESP8266 and 85 on the site. Don't want you to think we are slow to respond.

Please report results!

I finally got around to updating all my SonOff Duals, and the ones that were using 1-wire were significantly older firmware(v43?) due to the 1-wire port ID beign locked.. I am pleased to say that not only do they work great now, they boot much faster! They are up and going within 10 seconds, whereas before it was closer to 25, which was really a particular pain because I had the sonoff within 6 inches of the 120V coil 3-phase contactor in my steam generator panel, and quite often the EMI from the contactor turning on would send the 1-wire into la-la land until reboot. After upgrading to v45F I lengthened some wires and moved it further away and all is operating great!
upload_2020-1-13_15-54-53.png
 
I am having an odd issue. Sometimes (it is intermittent) when I first open BruControl, I have Elements stacked on top and use the Z order and visibility property to hidden for the top Element. I do not hide the underlying Element. Sometimes the Z Order does not seem to work as the underlying element is displayed ON TOP. If I go to the real top Element and open the properties Appearance Dialog, it pops right back on top and seems to work from then one. I guess I could go through my script and hide the underlying Element and it would fix the issue, but adds lines to my script that should be unnecessary.

This is a new problem that has just started happening so it must be related to something I change on a Workspace or in a Script, but I have no idea of what that was.


I am hoping that the Alarm wav file is fixed. It would also be great to have the No Wav File property. Because there is no way to set the wav file in a script, I have created many hidden Alarms that just play the wav file that I desire for an Alarm. I only have one Alarm that is visible when it is active. I make the first Alarm Active then after a short Sleep, I make the visible Alarm Active. It sounds like your fix will break my logic in the Scripts.

I did the one visible Alarm because I had created a lot of Alarms that were stacked. It became a nightmare to find the Alarm in the stack and because it covered other Elements that when I wanted to look at that Element(s) under the Alarm Stack, I had to move all the Alarms them but them back. PITA.

I have 29 separate wav files that I play. 23 have a visible Alarm.

As a side note: Why so many. A lot have to do with Hops. I give a 15 minute warning (sound only) and a one 1 minute warning (sound only) and the a hidden alarm for the Drop along with a visible ALARM. I have many hop alarms depending if there are any conflicts with Timing between a Hop Drop and another Alarm. AS an Example, I have an Alarm to drop the Yeast Nutrient and Whirlfloc at 15 minutes remaining on the Boil Timer.

This could conflict with a 15 min Flavor hop Drop or a End of Boil Aroma 15 Minute warning or a 15 min Flavor hop Drop AND End of Boil Aroma 15 Minute warning. So I need four wav files just for the 15 minutes remaining Alarms.

1: No Conflict: Drop Yeast Nutrient and Whrilfloc NOW.
2. 15 Minute Flavor Hop: Drop Yeast Nutrient and Whrilfloc and Flavor Hop #1 NOW. (Yes I actually have more as it could be Flavor Hop #2)
3. End of Boil Hops: Drop Yeast Nutrient and Whrilfloc NOW. 15 Minutes to Aroma Hop Drop at End of Boil.
4. 15 Minute Flavor Hop and End of Boil Hops: Drop Yeast Nutrient and Whrilfloc and Flavor Hop #1 NOW. 15 Minutes to Aroma Hop Drop at End of Boil.

A great way to fix this for me would be a property for the alarm like wavfile that allowed to change the path with a script:

"MyAlarm1" wavfile = "C:\\BruControl\Media\myownwavfile.wav"

Because BruControl throws an exception if the path is not a wav file, that would either need to be tested by the end user, or the exception allowed and not throw an an exception. I personally can do my own testing to make sure the path is proper as the End User.

That would be so much easier.

That would also be very handy for Background Image 1 with a property like image1 that allowed me to change the path of the background image 1. This would allow unlimited backgrounds.

"Any Element" image1 = "C:\\BruControl\Media\any.jpg"

and the background of a workspace would need a new command:

backimage "my Workspace1" = "C:\\BruControl\Media\any.jpg"

What is the wav file logic in the fix?
This is my current logic:

Alarm1 active = true
//plays the desired wav file
sleep 500
VisibleAlarm visibility = visible
VisibleAlarm active = true
//Since Alarm1 wav file is playing, VisibleAlarm does not sound
wait VisibleAlarm active == false
Alarm1 active = false
VisibleAlarm visibility = hidden

One fix I have thought of is to create an Alarm Workspace that Only has the Alarms on it. I would still have to stack 23 Alarms into a pile and make them visible when Active and then return to my Main brew workspace.

I have used https://www.text2speech.org/ to create unique Alarms.

BTW, an easy fix to the no sound may be that you select Custom wav file but the path is empty or not a .wav file If you do that now, it still plays the default. I also tried to enter a path with a jpg (hand typed in) as the chosen wav file and it throws an exception.


Or like any sane person you could have one hop alarm. If you don’t know what hop to put in when you hop alarm comes on, you have other issues. [emoji6]
 
Back
Top