BruControl: Brewery control & automation software

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

Help Support Homebrew Talk:

Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL

crane

Well-Known Member
Lifetime Supporter
Joined
Sep 20, 2011
Messages
1,196
Reaction score
439
Location
San Diego
In terms of PC rebooting from updates, do you have Brucontrol setup to automatically start upon booting, and are your fermentation scripts set to auto start? I've also set windows to auto login upon bootup. This should bring everything back into working order after a reboot.
 
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
My overall fermentation script starts, but each fermenter has it's own on/off, and that is not remembered on startup... I do not have is set to auto start yet, that is on my list now, but never was, because, I never had these problem on the old Win7 Laptop that I upgraded from, and upgrading to a full "server" OS That I have to pay an M$oft license for is not going to happen...

edit: with the new SonOff Dual R3, they have 2 high-voltage switches, so I could put a regular light switch near the fermenter that would indicate that fermenter on/off... but that has it's own downsides...
 
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
Upgraded to the 1.1.0.22, and used the opportunity to time the startup, 5 minutes and 54 seconds.... If it were possible to have BC start without the database being fully up, that would be appreciated... missing a few datapoints is much preferred over missing control for 5 minutes...
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
Take a look at your controller log, it should tell you how long each component took to load up, including interfaces. Mine took about 50 seconds when I just updated, and a bulk of that time was getting all my interfaces up. Using an external DB, my load time was listed at about 200ms. My DB was already running, so this isn't surprising, but I am curious about the embedded, because unless you rebooted, it should have been running as well.
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
Feature Request: It would be convenient to have a "Search ALL Scripts" function when searching for references of an element. Currently I open the brucfg file and search as a workaround, its just not as streamlined as I would like.
 
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
6 minutes? What kind of computer, and how many graphical based elements do you have?
It is an HP Elitedesk 800 G1 Mini Tower i7-4770 with 500GB HDD and 32GB and not sure what 'graphical based elements means, but I have bout 40-50 'things' in 6 workspaces...

I did not restart the entire PC, just shutdown BC without disabling, and started the new version of BC the five minute pause is near the bottom, at that point, I have the black BC background up, but that is all:

1623417089430.png
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
It is an HP Elitedesk 800 G1 Mini Tower i7-4770 with 500GB HDD and 32GB
In a minitower I'm guessing (hoping) you are running a 3.5" drive, do you know the RPM? If its the 10k RPM drive they originally came with, you might want to check the SMART diagnostics on the disk for some prefail/fail warnings, as it sounds like something is up here with your I/O processing that's deeper than BC. If its a 7.2k or slower, with a the amount of elements you are running and DB, I don't see a solution you would be happy with other than replacing the drive. If you don't get a clean report from the disk SMART tools, I would clone that thing ASAP.
 
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
It is 3.5 7200, but if SQL is loaded, that is not what is is slowing it down.. 10k (or 15k)would only be for a 300/600/1.2 SAS drive on a server, I have 3 i7-4770 based computers, the two others are handling 8-12 HD surveillance cameras each for home and office with 8TB 7200rpm drives , and they and this PC are speedy other than BC.. I purchased a second license for my home machine to test with, and the brucfg file copied fresh loads fine, but without interfaces, the logging isn't doing anything.

I locked virtual mem to 1024MB since I have 32GB of physical, and rebooted. it booted in under 2 minutes, but all graphing was gone...

I am thinking to try removing and re-installing SQL, but I think I need to make a system restore usb drive and shut it some and install the SSD... which requires a change control window (aka-kitchen-pass) or I get a NUC and build it at home.... that might be easier

Is there a more detailed logging I can enable?

I did this drive scan, and I am using way less than half the drive:
1623422147931.png
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
There are some third party tools that can access the drive info, windows has one built in from the CLI - Try this command:

wmic diskdrive get model,status,errordescription,lasterrorcode

If it says the drive status says OK, then generically I would say the disk is not in danger of failure.

You could also watch Resource Monitor (link at bottom of performance tab in Task manager) while loading up BC and see if you can find the process(s) eating your IO. Look at the disk tab, then look under disk activity, and sort by Total (highest to lowest).

I see sustained Reads of over 200MB/s off a SSD, pointing at my DB, so there is definitely a high IO demand on the SQL side during BC loadup. I watched the active query manager on the DB and now I see why. During loadup, BC requests a row count of every table, which on my system seems to average 250ms per table. I have 209 tables in my DB x 250ms average count query = ~52 seconds, which is basically what my startup time is.
DBQuery.png

@BrunDog - Do you know/can you ask what the purpose of the row count is on loadup?
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
So, in the full SQL install, and maybe even SQL Express, a job could be setup to prune tables once they reach a certain size/age. In the Embedded SQL, I'm not sure any such tool exists. So, depending on if your historical data is useful to you right now, you could simply shutdown BC, rename the existing db file and copy in the blank one from the BC installation directory (it may even do it on its own if it can't find it, but I don't know for sure), and fire up BC again with an empty DB.

Edit: I looked a little deeper and I see some maintenance queries that appear to be running from BC, which is pruning the DB tables at 30 days. I don't see that as a visible option in the settings file, so it is probably hard coded somewhere. @BrunDog this would be a useful variable to be able to control for those wanting more control over the DB.
 
Last edited:
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
There appear to be UART (serial) pads in that last pic.
OK, DUAL R3 is a go!

I soldered the wires, programmed 45O firmware with the CH340, it worked, had to disconnect the 3.3v pin and hook to AC power to get termite to respond and program wifi, and added to my test setup at home I have the 2 relays and LED working.... will test the switches someday, I will be swapping out some of my older ESP8285 based units as soon as I can get 1-wire/counter input located...
GPIO27 relay1
GPIO14 relay2
status_led GPIO13 (active low)
GPIO0 button
GPIO32 switch 1
GPIO33 switch 2

1623435386811.png
 
Last edited:
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
maybe...

I am going to take one to the local dude that does electronics repair and has a SMD workstation with a camera on a 65" monitor to have 10 30awg kynar wires added to a pin header which is hot-glued to the main board. The following will set me up perfectly I *think*:

1-wire and reset
GPIO 5

SPI for RTD:
GPIO 18
GPIO 19
GPIO 23

CS for RTD
GPIO 12
GPIO 15
GPIO 25
GPIO 35

Currently used GPIO:
GPIO27 relay1
GPIO14 relay2
GPIO13 status_led
GPIO0 button
GPIO32 switch 1
GPIO33 switch 2

daughterboard pins shown at this review show what is used, and therefore what should be free:
ESP side L-R:
GND
SW1 GPIO32
SW2 GPIO33
TX1 GPIO 10
RX1 GPIO 9
Relay0 GPIO 27
Relay1 GPIO 14
Wifi?

W25Q32JVSIQ flash chip side
TX2 GPIO 17
RX2 GPIO 16
PUL? is this GPIO13 for the LED?
IO0 GPIO0
NC
RX0 GPIO 3
TX0 GPIO 1
3v3




1623601493547.png
 
Joined
Aug 20, 2010
Messages
987
Reaction score
120
Location
Clearwater, FL
I'm along for the ride... BUT it does seem a pyrrhic path... $200 of labor on a $20 part!
Oh if he wants that, it is not worth it, but he does a lot of cell phone and tv work, and seems very reasonable... I am hoping $20-$40.. we shall see... and if I get 10, it might be cheaper. I also put in a feature request with itead.cc, they met my two of three items of a feature request I put in a year ago by using the ESP32 and smaller with the R3 , just not the i/o accessibility. I wonder what itead would charge for 100 of the R3's with a modified daughterboard to have all unused pins on a header.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,477
Reaction score
183
Location
Argyle
Feature Request: It would be convenient to have a "Search ALL Scripts" function when searching for references of an element. Currently I open the brucfg file and search as a workaround, its just not as streamlined as I would like.
If you copy your scripts to Notepad ++, you can do that but that is a PITA, just as editing the brucfg file. It would also be nice to have a universal replace function that would change ALL Scripts in BruControl.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,477
Reaction score
183
Location
Argyle
What are the consequences of not installing the SQL Local DB in addition to not having the db history? I have a new mini with 32gb of RAM and an SSD that loads BruControl in seconds. I have not installed the SQL Local DB.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,477
Reaction score
183
Location
Argyle
I am trying to get back into Node Red.

A Couple of Questions:

1. What use is Node Red?
2. What data can you get from Node Red?
3. Can you PUT data?

I would like a simple example of data from a single element.
Lets say I have a Global Element named "NodeRedGlobal"
1. Get the value of "NodeRedGlobal"
2. Put a value to "NodeRedGlobal"
3. What else I could do with "NodeRedGlobal"

I am hoping to create an HTML Doc with CSS that I had when I was using the BCS. I had a large Clock and TEMP document for my Mash Timer that I could see across the room that was independent of what was on the BCS screen (which I also wanted up at the same time). I know I can do that with a Workspace, and switch workspaces, but I would prefer to have my Process up at the same time.
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,217
Reaction score
202
Location
Cincinnati
1) Node Red is an IoT programming tool that lets you build communication paths between hardware devices and network connected services.
2) You can get whatever data out of it that you put in. It can read files, sensor data from hardware devices, data from the internet... whatever you can program it to look at, you can pass that data.
3) Currently, the BC API allows you to read and write data to Globals only.

In your example, you could write a value to a Global in BC, then have Node-Red read that value, perform some math on it, then write it back to a Global. Alternatively, you could use it to interface with devices that BC currently cannot, and access data that way.
 
Top