Glad itâs working well for you. My changes are really s scratch on the surface of all the BrewPi work that Elcoâs done. Itâs an awesome bit of kit.
@prmurphy63026 - Itâs still not possible to control the fermentation temp using the Tiltâs thermometer as input.
@Raptor - Iâve got a change coming that will automatically restart the Tilt connection without needing to restart the script. I hit a hurdle when I went to test and found that my BrewPi SD card had corrupted itself over Christmas. Almost there now though.
Thanks @sbowler - I donât actually restart the script as such - I changed your code to move the exception block to catch the issue earlier and thus stopping the whole lot crashing. I also restart the scanning if it is not running from both the brewpi and your tilt class.
Simon,
I have had a corrupted SD card a couple of times too. Here is what I have done and things have been pretty stable.
Added a surge protector/UPS. Just a cheap one as the RPi does not use much juice but hopefully enough to carry it through the occasional power interruptions that we have, now and then.
Avoid restarting RPi by disconnectiong power and reconnectiong. Whenever possible I use Putty and then do sudo shutdown (with or without -r). I read in some other fori (fora? forums?) that RPis do not like the disconnect of power without shutdown. Obviously it works mostly, but I am concerned about the few times that it does mess up your card
Did you verify that brewpi was working before adopting the changes for this modification? I canât explain why you are getting the error message indicating that your not on legacy. I think you need to make sure brewpi is working first then try the modification. If it still throws the error with no modification then Iâd ask Elko for help.
I am having the same problem as nanotap. Everything was working fine up until I copied over the scripts from the https://github.com/supercow/brewpi-brewometer repository. I have a feeling that it is the scripts downloaded from there that breaks it.
Reinstalling Brewpi and then reselecting the legacy branch starts everything working again. Checking the brewpi.py file from Supercowâs git repository shows:
logMessage("Checking software version on controller⌠")
hwVersion = brewpiVersion.getVersionFromSerial(ser)
if hwVersion is None:
logMessage("Warning: Cannot receive version number from controller. " +
"Your controller is either not programmed or running a very old version of BrewPi. " +
âPlease upload a new version of BrewPi to your controller.â)
# script will continue so you can at least program the controller
lcdText = [âCould not receiveâ, âversion from controllerâ, âPlease (re)programâ, âyour controllerâ]
else:
logMessage(âFound " + hwVersion.toExtendedString() +
" on port " + ser.name + â\nâ)
if LooseVersion( hwVersion.toString() ) < LooseVersion(compatibleHwVersion):
logMessage(âWarning: minimum BrewPi version compatible with this script is " +
compatibleHwVersion +
â but version number received is " + hwVersion.toString())
if int(hwVersion.log) != int(expandLogMessage.getVersion()):
logMessage(âWarning: version number of local copy of logMessages.h " +
âdoes not match log version number received from controller.â +
âcontroller version = " + str(hwVersion.log) +
â, local copy version = " + str(expandLogMessage.getVersion()))
if hwVersion.family == âArduinoâ:
exit(â\n ERROR: the newest version of BrewPi is not compatible with Arduino. \nâ +
âYou can use our legacy branch with your Arduino, in which we only include the backwards compatible changes. \nâ +
âTo change to the legacy branch, run: sudo ~/brewpi-tools/updater.py --ask , and choose the legacy branch.â)
So it seems that the version of the script in the repository is what is causing the problem.
@jerryp, @Ron_K. I can confirm that my version of the scripts from âsupercowâ is working, after I comment out the following in brewpi.py:
if hwVersion.family == âArduinoâ: exit("\n ERROR: the newest version of BrewPi is not compatible with Arduino. \n" + âYou can use our legacy branch with your Arduino, in which we only include the backwards compatible changes. \nâ |+ âTo change to the legacy branch, run: sudo ~/brewpi-tools/updater.py --ask , and choose the legacy branch.â)
I did a new fresh install of Brewpi, install the legacy version, test it and up and running as before.
I copied then all the files from âsupercowâ and run Elcos âfixpermissionâ script to make sure everything is right. I do still have some logentry says Iâ, not running the right version, but it works.
Tested then the Breometer with water to calibrate it, so some sugerwater (SG 1.048) and calibrate, and let it go for a week.
Now I have my brew batch #002-2017 in fermenter, and the Brewometer work as a charm. (see pic)
The only issue is what someone else says, the refresh of page are slower than without brewometer integration, even if I set the logentry to be every 5 min.
So, if someone can clear this out why the âArduinoâ check fails on a Arduino (Genuino board in Norway), Iâll be glad:)
That is great to know @nanotapp. I will give that a go once my current brew finishes. I have the Tilt Hydrometer logging to Google Docs, so at least that is working. Do not want to risk messing anything up during this runâŚ
Yeah⌠figured everything out eventually. Iâm on the legacy branch so ended up using a fork of your code. Iâve also got two brewpi arduinos running off a single Pi. The fork I used needed a couple of modifications to show F over C and I also had to put the brewometer calibration files in a sibling directory to my two chamber directories. Finally, I cleared out the data directories so the graphs would reset properly. I donât think any of this is down to your code and I want to thank you for leading this integration effort⌠I think itâs really quite awesome!
HI Guys! Congrats to all who have contributed to this awesome integration! I currently run a branch of legacy that supports using an ESP-8266 instead of arudino. Here is the repo / info = https://github.com/thorrak/brewpi-esp8266/blob/master/docs/INSTALL.md. From the reading Iâve done in this thread, trying to get the Tilt to work on my install will likely break the ESP-8266 functionality. Does anyone else have the Tilt integration working with the ESP-8266 wireless controllers? Any help / input is greatly appreciated!
Hi @cripplecreek. Why do you think it will break the ESP-8266 functionality? The Tilt integration operates on your Raspberry Pi using bluetooth. What I canât tell from the INSTALL.md instructions on your repo is where the actual Brewpi script is running? Does it still run on the Raspberry Pi, or does it run on the ESP-8266?
If itâs the former, then you can re-integrate the modification into your repo. If itâs the latter, then will likely only get it to work if you can somehow enable a bluetooth connection on the ESP8266, which Iâm not sure is possible. From the brief research I did, the successor to the ESP8266 had Bluetooth and Bluetooth LE, which is what you need to drive the mod.
Thanks @sbowler!
The script is installed onto the Pi. In my case, a 2b with a USB wifi / bluetooth le adapter. The esp8266 acts as an arduino. Do think it would be possible to add the Tilt code into my brewpi.py?
Definitely. Do a compare of the changes in the brewpy.py file. Given youâve got the esp8266 to work, I donât think youâll have too much trouble merging the changes in to your script.
Have you tried to see if your BLE adapter can see your Tilt?
@sbowler You ROCK!!!
Donât know why I had any hesitations in having a go at this. I followed the directions in the readme and had essentially no issues. One word of advise for others wanting to get this integration working by adding @sbowlerâs code into their existing Brewpi setup, choose your editor wisely. My initial attempt was made from my Mac using Coda 2. I got tons of delimiter errors when the script attempted to run. I tried to fix one after another. Ultimately, I re-did the code additions from a PC using Notepad++ and got it going with relative ease. Thanks again!!
Alright, what am I missing?? I reinstalled to get the tilt working and I lost all of my pretty lines. Tilt is paired, temp sensor and heater is set up same as before. Also, do I need to add the tilt somehow to to the device list?
RK9251,
I had the same problem. Turns out that the new code doesnât like to see the old data. You need to start a new brew making sure to name it something that you havenât already brewed. Then everything should start showing up.
Here is a screenshot. I canât find the test script. I am using this install script. I managed to insert your test script and it did not show any connection. Although, I can see that the device is paired from the desktop.