Quantcast

BruControl: Brewery control & automation software

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

sedgington

Supporting Member
HBT Supporter
Joined
Apr 25, 2017
Messages
38
Reaction score
11
I was able to name a script HLT PID and then create a PID element named HLT PID.......since variables cannot have two words as names, I'm guessing there is something else named HLT PID somewhere
So Right you are! I was testing another script on a different workspace that had the same device name. I never thought to go through each workspace to look for it. It would be niceif there were a summary list of all the elements alphabetically somewhere--kind of like the variables list but for all the workspaces. Also a list of all the interfaces and ports that correspond to those device names would be helpful when going to add more devices--so that you don't inadvertantly add two that you don't want to to the same port.

Thanks so much for taking the time to look at this. One's mind kind of numbs during the creating devices process--I'm not sure what the solution is. Writing them down or creating an excel spreadsheet is probably the logical one, but at a certain point you just want to run the script!
Cheers!
 

helibrewer

Supporting Member
HBT Supporter
Joined
Nov 11, 2011
Messages
4,156
Reaction score
483
Location
Wilmington
So Right you are! I was testing another script on a different workspace that had the same device name. I never thought to go through each workspace to look for it. It would be niceif there were a summary list of all the elements alphabetically somewhere--kind of like the variables list but for all the workspaces. Also a list of all the interfaces and ports that correspond to those device names would be helpful when going to add more devices--so that you don't inadvertantly add two that you don't want to to the same port.

Thanks so much for taking the time to look at this. One's mind kind of numbs during the creating devices process--I'm not sure what the solution is. Writing them down or creating an excel spreadsheet is probably the logical one, but at a certain point you just want to run the script!
Cheers!
True. I've done a pretty good job of documenting every aspect of the hardware but now need to clean-up the software side. I've just been using the Interface Wiring Map and noting connections to all ports with the unique element name. I'm thinking of doing a spreadsheet though so I can also document any/all scripts associated with elements....the other option is to add sheets to my draw.io file and flow chart all the scripts along with a "purpose" and "description"....kind of like my old analyst days so anyone could grab my documentation and build my system as well as understand what all the logic flow is and why it's there.

Your brewing processes are the business rules and then the scripts implement/support those rules so actually documenting your brewing processes is beneficial too. It is kind of like walking into a brand new brewery and having to write all the SOP's from scratch.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
Some interesting facts about the new property set script: fileindex
These comments are not requests or "bugs", just observations.

1:
You can change the sound of an Alarm while is is active. That means that you could have one alarm Sound like a Buzzer, followed by a different sound for an active alarm. I am thinking I might have different introduction sounds for different "types" of Alarms. Maybe one Introduction for an Alarm where we must do something and a different one for something that I might want to know about but don't have anything to do.

2:
You have 3 choices for the fileindex.

If you exceed 3, the fileindex is set to 3.

"Alarm 1" fileindex = 4 is the equivalent of "Alarm 1" fileindex = 3

It does not throw an error.

3: You can also "read" the value of the fileindex

new value xyz
xyz = "Alarm 1" fileindex


Returns the fileindex value.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
So Right you are! I was testing another script on a different workspace that had the same device name. I never thought to go through each workspace to look for it. It would be niceif there were a summary list of all the elements alphabetically somewhere--kind of like the variables list but for all the workspaces. Also a list of all the interfaces and ports that correspond to those device names would be helpful when going to add more devices--so that you don't inadvertantly add two that you don't want to to the same port.

Thanks so much for taking the time to look at this. One's mind kind of numbs during the creating devices process--I'm not sure what the solution is. Writing them down or creating an excel spreadsheet is probably the logical one, but at a certain point you just want to run the script!
Cheers!
If I remember correctly, you can also have an issue if you set the value of a Global String to an existing element name (or other thing like a script name).

Since the displayname property has been added to Elements, you could start using CamelText for elements (and other names) that would prevent this.

For Example: any Alarm name could start with "alm" and a temp probe could be "tmp" or even the type "rtd". "almMashEnd" "tmpBoilKettle" "rtdBoilKettle"
It would be much harder to duplicate names using this type of nomenclature.

You could set the displayname to anything you like.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
So Right you are! I was testing another script on a different workspace that had the same device name. I never thought to go through each workspace to look for it. It would be niceif there were a summary list of all the elements alphabetically somewhere--kind of like the variables list but for all the workspaces. Also a list of all the interfaces and ports that correspond to those device names would be helpful when going to add more devices--so that you don't inadvertantly add two that you don't want to to the same port.

Thanks so much for taking the time to look at this. One's mind kind of numbs during the creating devices process--I'm not sure what the solution is. Writing them down or creating an excel spreadsheet is probably the logical one, but at a certain point you just want to run the script!
Cheers!
look at post #4,896
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,142
Reaction score
160
Location
Cincinnati
I was looking at controller logs after I witnessed every device disconnect from BC (wired and wireless), and happened to look at the licensing log. I noticed that when the licensing updates every 12 hours, all my devices disconnect from BC. Can anyone else confirm they see the same thing? Is this intended operation?
 
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
Oh hell no, that should not be happening and is not intended. I looked back through my logs and did not see any correlation between license synchs and controller logs.

Can you send us (or post here) these logs?
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,142
Reaction score
160
Location
Cincinnati
Oh hell no, that should not be happening and is not intended. I looked back through my logs and did not see any correlation between license synchs and controller logs.

Can you send us (or post here) these logs?
Just emailed them over to you.

Edit: Might help to know that I'm running BC 1.1.0.9
 
Last edited:

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
Below is how I got this to work. The InputPortID wants the actual PortID of the RTD element not the "name"

Code:
new string "RTDID"
"RTDID" = "NAME OF RTD" ID
"PIDELEMENT" InputPortID = "RTDID"
Substituting the actual name of your RTD device you want to use for "NAME OF RTD" and the actual name of your PID device for "PIDELEMENT" in the code above.
Observations:
Playing with both ID and InputPortID:

Every Element has an ID. This is a Hexadecimal Number and is surely unique and assigned internally when an Element is created. It is also likely the "under the hood" how the program "works" with the Element.

Generally, the ID is not important and is a "read only" property and cannot be changed.

The single case where it becomes important is for a Temperature Type Element associated as a Input Device with a PID, Hysteresis, or Deadband Element.

While you may select an Input on the PID, Hysteresis, or Deadband Element on the Property Page of the Element by name of a Temperature Element
Device Input.png

you must use the ID to set it in a script.

First you need to read the ID of the desired Temperature Element

In this example I am using my "Mash Return °F" 10kNTC Probe.

new string "Temp_ID"
"Temp_ID" = "Mash Return °F" ID
print "Temp_ID"

This returns a hexadecimal number as a string: 09431096-0ca3-450e-aafe-970139b9cd9d
device input 2.png



You can now assign this to the InputPortID of a PID, Hysteresis, or Deadband Element.

With a big BUT: You must assign the hexadecimal number via a variable or string Global Element.

You cannot assign the hexadecimal directly:

"Radiator PID" InputPortID = "09431096-0ca3-450e-aafe-970139b9cd9d"
or
"Radiator PID" InputPortID = 09431096-0ca3-450e-aafe-970139b9cd9d

result in a ERROR: Unknown Type.

You must use a string variable or a string Global element to the the set the InputPortID.
1.
new string "Temp_ID"
"Temp_ID" = "Mash Return °F" ID
"Radiator PID" InputPortID "Temp_ID"

or (this is really not a good option as you must already know the hexadecimal ID of "Mash Return °F" probe)
2.
new string "Temp_ID"
"Temp_ID" = " "09431096-0ca3-450e-aafe-970139b9cd9d"
"Radiator PID" InputPortID "Temp_ID"

or create a string Global Element named gblTempID
3.
"gblTempID" value = "Mash Return °F" ID
"Radiator PID" InputPortID = "gblTempID" value

I like to use Global Elements for variables and rarely declare a variable. I do this because they are persistent(do not die when the script or program is shut), usable across scripts, and do not have to be declared. They may also be used again and again for different values (all of the same type).

All three work.

One other thing of note:
If you try to assign an InputPortID to other than a PID, Hysteresis, or Deadband Element, it will throw an Error.
[ERROR: No property found with name 'InputPortID']
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
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
}
I ran into an issue trying to get this to run. I copied the text and changed the

$BCPath = $BCPath + "\BruControl\default.brucfg" to

$BCPath = $BCPath + "\BruControl\Production.brucfg"

otherwise a direct copy:

ps1.png



Is there a way to get the Workspace information as well? I am hoping to create a Google Sheet of all my Elements and which workspace they are on. Also be nice to have a comma between fields. I have never used Powershell. I looked in the Production.brucfg and could not find a tag for the workspace element. Any help would be appreciated.
 

helibrewer

Supporting Member
HBT Supporter
Joined
Nov 11, 2011
Messages
4,156
Reaction score
483
Location
Wilmington
I ran into an issue trying to get this to run. I copied the text and changed the

$BCPath = $BCPath + "\BruControl\default.brucfg" to

$BCPath = $BCPath + "\BruControl\Production.brucfg"

otherwise a direct copy:

View attachment 693059


Is there a way to get the Workspace information as well? I am hoping to create a Google Sheet of all my Elements and which workspace they are on. Also be nice to have a comma between fields. I have never used Powershell. I looked in the Production.brucfg and could not find a tag for the workspace element. Any help would be appreciated.
The name of the workspace is contained in the "<name>" tag after "</Elements>"

EDIT: So
$Data = $CFGFile.Configuration.Workspaces.Workspace.Elements.Element
Does not go to the Name tag
Configuration.Workspaces.Workspace.Name
 
Last edited:
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
..
new string "Temp_ID"
"Temp_ID" = "Mash Return °F" ID
print "Temp_ID"
Please note that syntax matters even even when don’t get an error. Also be careful when posting scripts for others to follow. Variable names should not be quoted. You put text in quotes, but not variable names. The interpreter ignores them but this practice will lead to trouble at some point. FYI.
 

sedgington

Supporting Member
HBT Supporter
Joined
Apr 25, 2017
Messages
38
Reaction score
11
The name of the workspace is contained in the "<name>" tag after "</Elements>"

EDIT: So
$Data = $CFGFile.Configuration.Workspaces.Workspace.Elements.Element
Does not go to the Name tag
Configuration.Workspaces.Workspace.Name
This is great!Just what I was looking for. I know nothing about Windows Powershell except that I need it load node red on my Brucontrol machine running windows 10. However with the simple change of the " -" in your script, it now loads a .csv readable file:
Code:
$ElementData = $Element.Name + "," + $Element.ID + "," + $Element.Type
Now that I know that Brucontrol keeps all the data in xml I just need to walk through it to see if I can extract the workspace name with the Element information. It wasn't clear to me how you would do this in Windows Powershell from your example above. (Probably simpler for me to figure it out in node red since I've already got somewhat of a grasp on how to go about it.) But thanks so much!
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
Please note that syntax matters even even when don’t get an error. Also be careful when posting scripts for others to follow. Variable names should not be quoted. You put text in quotes, but not variable names. The interpreter ignores them but this practice will lead to trouble at some point. FYI.
What about when you have variables with spaces? i.e.

As a habit, I have always quoted variables. Some I have would not work if not quoted. Are you saying that spaces are not allowed in declaring variables? Should I redo my scripts and variable names if they include spaces?


new string "My New String"
"My New String" = "test"
print "My New String"
Change to:
new string My_New_String
My_New_String = "test"
print My_New_String
 

helibrewer

Supporting Member
HBT Supporter
Joined
Nov 11, 2011
Messages
4,156
Reaction score
483
Location
Wilmington
I have found something in my Hysteresis element that does not seem correct. I have it functioning in the "heating" mode, so a -3 degrees is my ON offset.
I am using a 1-wire sensor for the input, this sensor has a calibration of 1.5 degrees linear offset.
What I am finding is that the hysteresis element is responding to the "initial" value of the 1-wire instead of the "Result" or displayed value. Is this by design? I did not see anything in the manual to indicate that it was.
 
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
Calibrations do not work with 1-wire. The reason is how the raw values are handed to/from from the interface. I need to look into this and see if we can resolve it - I think we can. It's discussed elsewhere in this thread. Sorry about that!
 

Piggles22

Supporting Member
HBT Supporter
Joined
Jun 21, 2020
Messages
38
Reaction score
4
Location
Bothell, WA
PID Tuning: Below is a graph of my PID output simply trying to maintain a constant temperature at my MT recirc line. I'm using the default suggested settings (Kp = 30 / Ki =1 / Kd = 5). Just wondering if this is a normal output or if the curve can be smoothed out for tighter control. I get about a 1 to 1-1/2 degree temperature swing with these settings. I'm running a half barrel (15 gallon) system using a HERMS coil in the HLT and sensing the temperature at the HERMS outlet/Mash Tun inlet. The time span for the graph is 5 mins.

1596930818810.png
 
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
Ok. Without the results, it’s hard to make tuning suggestions. The data is going to be there since it is stored, so if you create a graph now, you will get it, but it will have the time after it up until now included so the graph resolution won’t be great.

I can imagine it was over swinging due to periods of being fully on then fully off.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
Minor issue:
Alarm Elements:
I am not sure of others
The DisplayName is interfering with action if you also have an Alarm Element and try to add the same exact DisplayName to a different Alarm as the name of the other Alarm Element.

If I have one Alarm with the name "Sanitize" and I have a different alarm and try to use the DisplayName "Sanitize", it throws this error:

07:25:55.370 [ERROR: Object reference not set to an instance of an object.]

I was combining Alarms so not a huge issue as I am deleting the Alarm with the name "Sanitize"
 
Last edited:

sedgington

Supporting Member
HBT Supporter
Joined
Apr 25, 2017
Messages
38
Reaction score
11
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 doing this!

Inspired by your great work I tried to do the same thing in node red. With some scripting help from the node-red community I was able to come up with the attached flow that brings that data plus the "workspace" that each element is in into a csv file. It is set up to watch the directory where default.brucfg lives and overwrite an output csv file everytime it detects a change. Of course, for testing you should copy the default.brucfg file into a different directory (perhaps with a different name) and run it by hitting the inject node. Since the default.brucfg file is in xml you may or may not need to include that extension in defining that file name--depending on how your system is set up.
Hope this is helpful to others navigating the naming conventions and locations of Brucontrol.
 

Attachments

OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
Minor issue:
Alarm Elements:
I am not sure of others
The DisplayName is interfering with action if you also have an Alarm Element and try to add the same exact DisplayName to a different Alarm as the name of the other Alarm Element.

If I have one Alarm with the name "Sanitize" and I have a different alarm and try to use the DisplayName "Sanitize", it throws this error:

07:25:55.370 [ERROR: Object reference not set to an instance of an object.]

I was combining Alarms so not a huge issue as I am deleting the Alarm with the name "Sanitize"
I'm not sure what you are saying, sorry. You can assign the same text to multiple elements' DisplayName properties. This works as expected:

Code:
"Alarm 1" DisplayName = "Whasup"
"Alarm 2" DisplayName = "Whasup"
stop "Script"
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,142
Reaction score
160
Location
Cincinnati
I think he is saying that he tried assigning a name to the DisplayName that was already in use by an Element Name, and it threw an error, which I suspect would be normal behavior.
 

oakbarn

Well-Known Member
Lifetime Supporter
Joined
Jun 23, 2011
Messages
1,340
Reaction score
143
Location
Argyle
Oh... gotcha. My bad.

I tested and you are correct @oakbarn. This is indeed a bug IMO. You should be able to set the DisplayName to whatever you like, even if it overlaps other elements. We'll address it.
Don't know if you consider this a bug or feature:
Both a Global and Variable have the same issue:

Existing Digital Out Element named Yellow Pump

If you try to set the value of a Global String Element to the same as an existing Element Name.
"Global 1" value = "Yellow Pump"

I just tested a variable and it is also true for a string variable being assigned to the same as an existing Element Name.
new string Test_String
Test_String = "Yellow Pump"


Both throws this error:

[ERROR: Object reference not set to an instance of an object.]
 

Paulaner

Well-Known Member
Joined
Jan 3, 2016
Messages
198
Reaction score
146
Location
Cottage Grove, Wi
This is kinda neat. Forces inputs to be inputs and outputs to be outputs, and upside down MEGA design essentially prevents any shields, but the price is good. I ordered one to mess with it:

Any words on this? I never thought about adding another mega to my brewery, but for this price why not. I could add all of my cold side onto this, and then free up more analog inputs and spots on my relay boards for more data points and other stuff for the hot side process.
 

aeviaanah

Well-Known Member
Joined
Jul 1, 2012
Messages
1,479
Reaction score
152
You don't connect with termite to install the firmware. You just install it from the tool. Does it install correctly? If not, you have a problem with the computer/USB/drivers. When you open Device Manager, do you see the MEGA there?

View attachment 691710
When in device manager, I see "USB serial device (COM 4)". Should I be seeing "Arduino Mega 2560" listed in device manager? I doubt this is my issue because I have no issues with a serial connection, only ethernet.

Jeez.... sorry man. We just haven't found the source of the problem yet. It sounds like it is not the ethernet shield or MEGA if you are having the same problem. I would suggest a new cable (either CAT is ok, thought I doubt it is the cable unless it is crazy long), or potentially an ethernet switch. The cable can be checked by plugging in a known good device, like a laptop, to see that it is working. Also, what kind of router is it? Do you have the ethernet ports on it set to auto speed and duplex? If you are forcing a speed or mode, it is possible this could cause an issue.
The router is ATT supplied model BGW210-700. I have tried a new ethernet cable, didnt help. The ethernet ports are set to auto speed
1.png



Possibly try another router (I know that is not convenient, but perhaps you have an old one laying about). Does your router report (based on the shield's MAC address that you selected above) any reports or logs? If it is a modern kind, it should report status of plugged-in devices.
I do not have an old router laying around. Ive had the same issue at my house with a separate router although both are ATT and all settings are default from factory. The table below shows I do in fact have connection to Port 3.
2.png


When you enter the setup... does it take the settings ok? When you then enter it in debug mode (send '%1&14;' via termite), what does it report back? If you are using DHCP, is it reporting an IP address, or no?
It appears to take the settings ok. I dont get much in regards to reporting back. I am setup static IP.
3.png


It is also possible the hiccup is on the computer side... perhaps a firewall issue or blocking? You can try using a TCP software like Packetsender to send test packets (send TCP packets with just a semicolon to the IP address of the interface, using port 5000, and you should get a semicolon back.)
Cant seem to get a semicolon back. I get a could not connect error. You may notice an IP change from 192.168.1.86 to 192.168.1.15. My thoughts were that perhaps a range of IP addresses were reserved for DHCP. Could something be wrong with the IP I am choosing? I have disabled all windows firewall.

4.png



If you like, I can send you a "test" firmware that will eliminate BruControl altogether and will allow the shield to pull test data from google - this would show if the communications pipeline (hardware) is working OK, including the router, cable, etc.

Worse comes to it... we can maybe jump on a zoom call or skype to try to debug it further.
Let me know if you think the test firmware is the best course of action based on the information ive sent in this post.



Do you have a short cable? The 100' might be an issue (though I doubt it).
I have a short cable now installed, no help.

I just ran a test on a MEGA with a W5100, and it worked OK. I ONLY have the interface connected to the computer via USB cable (no external power) and the Ethernet cable plugged in... no I/O or anything else. On my shield, the red POWER LED is on, the LINK LED is flashing, and 100M and FULLD LED's are on. The RX LED flashes with network traffic. The TX LED flashes during the Packet Sender test below.
I have the interface connected to the computer via USB with no external power and the Ethernet cable plugged in, all IO disconnected. My shield is also red POWER LED, the LINK LED is flashing, 100M and FULLD LEDS are on and the RX flashes. Perhaps my issue is with Bru Control?
5.png


Sent the debug code '%1&14;' and got the IP address:

View attachment 692433
See above screen shot of Termite.

Alternatively, you could use the Fing app (assuming the router is also a WiFi access point) to find the IP address, and it will list something like wiznet19C820.localdomain.
I can ping it:
View attachment 692434

I can arp it and get the MAC address (note I made this one up - creative, huh?)
View attachment 692435
I used the ping app from my phone and could not find anything that mentions wiznet. When I ping I get 100% loss and request timed out. I get no ARP entries found as a response

Then sent a semicolon to that IP address via Packet Sender, and got a '#;' back (sorry, I said semicolon only above).
View attachment 692432

BTW, be careful about changing IP and MAC combinations. Once you set these in the interface network setup, don't change them. It will require you to re-boot your computer in order for the network tables to get corrected (even if you delete the entry in the ARP table, it seems sometimes).
I have tried restarting the computer, that did not help. Perhaps the Zoom meeting may help?
 
Joined
Aug 20, 2010
Messages
855
Reaction score
92
Location
Clearwater, FL
OK, ESP32 firmware 45N is now included in the package on the website. What we saw in testing is that default values (-0.001 SG and -1 temp) are being sent by the interface on startup AND after sometimes after an interface disconnect. The FW will now send non-values instead, which will not be graphed. Not sure this is the right long term solution, but it's worth evaluating. Anyone fermenting with Tilt willing to update their FW... please let me know how this works for you.
I upgraded firmware (still on BC 1.1.4 as it is production) and it worked fine, still obviously jumpy from the tilt moving during my very active rum fermentations, and then I realized about 10 minutes later that my TiltPi that is nearby and plugged into the same power strip 'just happened' to stop logging the Tilt at the same time, and stopped responding to html and even ssh...... no way the two are related, I know, but no problems in months and now it locks up... and of course, I am remote... I need a switched PDU for this stuff, a BC connected switched PDU would be sweet...

I suggest that the ESP32 interface reads the Tilt Beacon as often as TiltPi(every second or so) and does an average of the valid values every 30 seconds. Firmware upgrade done at 6PM, BC PC rebooted at 7:45 in this graph

1597364900835.png
 

RiverCityBrewer

Well-Known Member
Joined
Dec 20, 2009
Messages
1,142
Reaction score
160
Location
Cincinnati
I upgraded firmware (still on BC 1.1.4 as it is production) and it worked fine, still obviously jumpy from the tilt moving during my very active rum fermentations, and then I realized about 10 minutes later that my TiltPi that is nearby and plugged into the same power strip 'just happened' to stop logging the Tilt at the same time, and stopped responding to html and even ssh...... no way the two are related, I know, but no problems in months and now it locks up... and of course, I am remote... I need a switched PDU for this stuff, a BC connected switched PDU would be sweet...

I suggest that the ESP32 interface reads the Tilt Beacon as often as TiltPi(every second or so) and does an average of the valid values every 30 seconds. Firmware upgrade done at 6PM, BC PC rebooted at 7:45 in this graph
I don't know about the latest model, but the two tilts that I have broadcast their readings every second, but only update the readings they are broadcasting every 10 seconds or so. The ESP32 only has one 2.4ghz radio, so it can either be connected to BLE or connected to WiFi. The way I've observed it working, trying to read BLE every second would leave little to no time for WiFi connectivity. I do like the idea of a hardware dampened reading, but trying to read the BLE beacon faster than every 10 seconds seems moot.
 
Joined
Aug 20, 2010
Messages
855
Reaction score
92
Location
Clearwater, FL
OK, that makes sense... I think I have rediscovered that fact about a half-dozen times int he last couple years... yeah, I knew they used the same radio, so maybe treat the 10 second tilt readings in the ESP32 like analog inputs with a weight... It would be nice to work this into the actual tilt, but that is a whole different animal...
 
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
@clearwaterbrewer... let it run for a while, then report back. I only see one spike there but it also aligns with an orange spike. It will bounce "default" values, which occurred following an initial development of the element... and often happened following a BT/Wi-Fi overlap which causes Wi-Fi resets... not actual spikey reads. I also suggest you set the Tilt Element's refresh multiple to 10x (10 seconds).
 
OP
BrunDog
Joined
Dec 19, 2014
Messages
5,132
Reaction score
1,419
Location
West Palm Beach
@
It appears to take the settings ok. I dont get much in regards to reporting back. I am setup static IP. Everything after that means nothing.
View attachment 693765
Ok, this has me concerned... See the 'IP:0.0.0.0' lines? This is telling you that the adapter is reporting no IP address.

I recommend you try DHCP. After you save the settings, make sure you reset the MEGA.
 
Joined
Aug 20, 2010
Messages
855
Reaction score
92
Location
Clearwater, FL
@clearwaterbrewer... let it run for a while, then report back. I only see one spike there but it also aligns with an orange spike. It will bounce "default" values, which occurred following an initial development of the element... and often happened following a BT/Wi-Fi overlap which causes Wi-Fi resets... not actual spikey reads. I also suggest you set the Tilt Element's refresh multiple to 10x (10 seconds).
funny you say that... this morning I saw that about a half hour after I went to bed, everything related to the ESP disconnected... (This ESP has RTDs and handles the Tilt.)
1597403375322.png


I have previously had this happen when I power cycled all the network gear and it took a power cycle to bring a few ESP32s back up, but this time the other problem ESP's were fine, and I did not do anything to the network. On the interesting side, the TiltPi came up by itself soon after... the ESP32 and TiltPi are about 3 feet apart, and both read the tilts, so separating them more is a bit difficult.... I will research some and see if I can get more specifics if it happens again...

Edit - SSH-ing into the Pi that runs TiltPi, it looks like it was power cycled, I think my employee must have noticed the TiltPi not working and power cycled... with somewhat expected results, taht is, I have noticed the ESP32 takes a much longer power cycle (AC) or it doesn't come back up correctly... DC power cycle can be quick, but there must be enough juice in the power adapter for 30 seconds or so to interfere with a good reboot... I am reluctant to run a LiPo battery backup on it as it is located in the ceiling...
 
Last edited:
Top