Brewometer integration

Yup! thank you that worked for the calibration. Now just to fix the scale on logging and displaying

Is the gravity scale not adjusting as you zoom? If so, I think thatā€™s a bug. Iā€™ve seen it on my phone but it works fine on my laptop.

I did a little more file moving around to make sure that all the files were where they needed to be so now it looks like this. The red line at the way at the bottom is the gravity reading. No data is shown on the right side next to ā€œRed Tilt SGā€ and turning it on and off do not get rid of the red line in the chart.

Hi @zakit24 ,

Iā€™m not sure the modification files have been applied properly above. It looks like the js/beer-graph.js isnā€™t updated with the modifications, which is why youā€™re seeing all the extra colours.

Thatā€™s what I thought too, but i specifically went in a copied the brew-chart.js file over and then went in nano to make sure it was the Tilt version and it is.

Maybe try a Ctrl-F5 refresh in the browser? This will force a refresh of the browser cache in case that is the problem.

sigh :frowning: canā€™t believe that was the issue. I was doing that earlier in my trouble shooting, but didnā€™t for a while so sadly I now donā€™t know at which step it was actually working. Sometimes you just need to do the good old refresh. THANK YOU!

1 Like

Hi all, long time lurker, first time Tiltā€™er. Thanks to @sbowler and @jlvnyc (on github) for all of this. A truly welcome service to the community all this is, so thank you. :slight_smile:

That being said, Iā€™m having a little trouble with the temperature settings and maybe someone could point me in the right direction. Iā€™m running legacy brewpi (latest available from github), with the https://github.com/jlvnyc/brewpi-brewometer installed, which appears to work fine on the legacy (Arduino Rev C and RPi3) branch, but Iā€™m having trouble with the temperature readout onto the brewpi graph. It seems to be stuck on 19.44 deg F when the OneWire temperature probe is reading 67.0 deg F in the same solution, even though FahrenheitTemperatures: True is set. Iā€™ve tried various values in the TEMPERATURE.orange configuration ini, but honestly, Iā€™m not sure what to put in there because it appears not to change the output. Did I miss something when I was setting it up? Thanks!

Hi @neoresin. When you set the FahrenheitTemperatures: True, did you restart the script? This setting is only read when the Brewpi.py script is starting.

Hi @sbowler! (Thanks for all the contributions youā€™ve given! And thanks for replying!) I did indeed restart the script, found that it was still showing the deg C temperature, stopped the test brew I had going, stopped the script, then proceeded to remove everything within /var/www/html/data/ except the profiles directory (not sure if that residual values might have been leftover somehow as a baseline for future brews), restarted the script, then started a new brew, but that all didnā€™t work. I havenā€™t located where the values for temperature for the Tilt might be stored - maybe you or someone could provide some insight into that? Or Iā€™ll go poking around in the codeā€¦ Havenā€™t had to go that far yet though. Anyway, thanks for being available to chat about it.

Hi @neoresin,

Can you confirm the path of the settings.ini file where you changed the setting?

Hi again @sbowler , it would be in the /home/brewpi/brewometer/ directory. Iā€™m also on the #brewpi IRC as Megaman if you want to chat there.

Howdy - I believe Iā€™ve figured out whatā€™s going on.

The fork youā€™re working on was taken before settings.ini was added. So to make the script read in Farenheit, you need to change some code.

Go to the brewpy.py file and find the line (line 427):

brewometer = Brewometer.BrewometerManager(False, 300, 10000)

change it to:

brewometer = Brewometer.BrewometerManager(True, 300, 10000)

That should fix your problem.

@sbowler - well caught! Unfortunately, if I enable that, then stop then start the script, it causes the lines to disappear from the graph and the legend. :frowning: If I set it to False again on line 427, the lines reappear. I assume thatā€™s set that way for a reason, and itā€™s got repercussions down the line. Not sure where this goes from here.

Iā€™m still new to python, but stderr.txt seems to have this occuring:
Unhandled exception in thread started by <bound method BrewometerManager.scan of <Brewometer.BrewometerManager instance at 0x74cdacb0>>
Traceback (most recent call last):
File ā€œ/home/brewpi/Brewometer.pyā€, line 324, in scan
self.storeValue(name, temperature, gravity)
File ā€œ/home/brewpi/Brewometer.pyā€, line 280, in storeValue
brewometer.setValues(temperature, gravity)
File ā€œ/home/brewpi/Brewometer.pyā€, line 147, in setValues
self.values.append(BrewometerValue(calibratedTemperature, calibratedGravity))
File ā€œ/home/brewpi/Brewometer.pyā€, line 112, in init
self.temperature = round(temperature, 2)
TypeError: a float is required

Hi @andylytical can you give a quick walkthrough of replacing the old dygraphs with the new? Is it a fairly straightforward process?

I did not replace the dygraphs version in the brewpi, only used the latest in the backup area. Youā€™re idea sounds reasonable though. I suggest if you try it out, post your results in a new thread (not really tilt related and this thread is already very long).
Cheers!

Hi @neoresin,

I posted an update to the beer-graph.js file which fixes some/most/all of the slowdowns. It doesnā€™t update the version of dygraphs, but the slowdowns were because of the way the script processes the data before display.

Hmm. The stack trace is a bit more puzzlingā€¦

Can you try changing line 267 from:
return (int(temperatureF) - 32) * 5.0 / 9
to
return (float(temperatureF) - 32) * 5.0 / 9.0

and see if that makes a difference?

Thank you everyone for all your hard work here. I just received my Tilt hydrometer and have been able to connect everything and get logging. I wonder if anyone has been able to utilize the Tiltā€™s temperature reading instead of the one-wire temp probe to monitor beer temperature?

Also, is it even conceivably possible to use the Tiltā€™s SG readings to trigger temperature changes? I would love to be able to create a profile that would automatically adjust temperature at a specified SG number.

Hi @Hemmieweizen, Itā€™s possible to use the Tilt for logging temperature, but not for BrewPi temperature control purposes. The Spark/Arduino is responsible for taking the temperature readings and then controlling the fridge temperatures. At the moment, the Tilt integration is between Tilt and the Raspberry Pi (not involving the Spark/Arduino controller), so itā€™s just for logging purposes. Iā€™d also say that the OneWire temperature probes are a lot more accurate/sensitive than the Tilt.

Itā€™s conceivably possible to use the Tiltā€™s SG readings to trigger a temperature control change. I havenā€™t implemented this yet as was waiting for @Elcoā€™s framework update.