Brewpi Spark Firmware 0.2.6 Released

Hello Everyone!

Brewpi Sparks started shipping last week and we’re pleased to say that v0.2.6 was released and is available in our github repo releases. (This announcement comes a week after the release, better late than never! :-))

This version performs two functions:

  • provides a UI for testing the hardware - you can connect temperature sensors and see the temperature, as well as toggle the 3 actuators.
  • runs the controller in the background

On bootup, you’ll see the device test screen. Plug in sensors and toggle actuators to satisfy yourself that the hardware is working as it should.

To start using brewpi for real, start the script and log on to the web UI. Change the mode to something other than “off” and brewpi will start temperature control. (The UI will not change and will continue to display the device test page.)

If your spark core was bought separately from your brewpi spark shield, then you’ll need to download this release and upgrade the firmware to your device. You’ll only need to do this once for this release - subsequent releases will be upgradable from the Brewpi Web UI.

To flash the brewpi.bin file, the outline process is:

  1. install dfu-util, and on Windows, Zadig and the appropriate drivers.
  2. put the Spark Core in DFU mode to accept a firmware upgrade
  3. run

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D brewpi.bin

Once done, your device should reset, beep twice, and show the device test screen after a few seconds.

Any chance of an idiots guide to updating the brewpi sparks to firmware 0.2.6 as I have just received mine in the post and would like to get it up and running on the fridge. The above doesn’t seem to make sense on how to update the brewpi supplied sparks.

Hi @Huckwell! Right now there is no need to update - 0.2.6 is the latest release.

The URL shown when the device starts will have instructions on how to upgrade your device as soon as the next release is available. cc @elco.

Hi @mdma, thanks for the info on first-time flashing a spark core. I’ve got a spark (though not yet a BrewPi) and I’ve been fiddling with integrating it into my setup.

I successfully flashed the 0.2.6 brewpi.bin file to my spark, but as of now the brewpi script is unable to retrieve version information from it. Firstly, should I even expect that to work with just the bare spark core, without having a BrewPi shield in the mix?

I tried reflashing the 0.2.6 firmware via the web interface, but this was unsuccessful. I’m not totally sure if the upgrades from the web should be working, already, either. Log output below.

Thanks!

Mar 09 2015 13:06:01 Notification: Script started for beer 'My First BrewPi Run’
Mar 09 2015 13:13:50 Warning: Cannot receive version number from Arduino. Your Arduino is either not programmed or running a very old version of BrewPi. Please upload a new version of BrewPi to your Arduino.
Mar 09 2015 13:13:50 Bound to TCP socket on port 6332
**** Spark Core Program script started ****

Settings will not be restored

Devices will not be restored

Checking old version before programming.

Warning: Cannot receive version number from %(a)s. Your Spark Core is either not programmed yet or running a very old version of BrewPi. Spark Core will be reset to defaults.

After quite awhile:

N:{“v”:“0.2.6”,“n”:“0”,“s”:3,“y”:0,“b”:“x”,“l”:“1”}

After another long while:

Problem flashing file: 78

Mar 09 2015 17:29:47 New program uploaded to Arduino, script will restart
Mar 09 2015 17:29:52 Notification: Script started for beer ‘My First BrewPi Run’

strange. flashing the binary via dfu should work, and afaik, without a shield. although you won’t be able to monitor any temperatures without the shield since the OneWire protocol implementation relies on having the onewire busmaster chip present.

Flashing via the web UI should be supported as soon as all the outstanding PRs are merged. cc @Elco

Yeah, I was thinking the sensors wouldn’t work without the shield, good to know. I’ll keep watching the updates in github and fiddle around with flashing it some more.

Thanks, again.

I have just pushed a few things:

  • 0.2.7. This is a pre-release firmware that still shows the Hardware test UI on the screen, but when it is put into fridge constant/beer constant/beer profile mode via the web UI (and devices are configured) it should be able to control a fridge. Please see: https://github.com/BrewPi/firmware/releases
  • To the brewpi script, I pushed changes to develop to make Serial non blocking, to fix issues with ps-util and to be compatible with the Spark Core. Please see pull requests #47 and #49
  • For the web interface, I merged Matthews work to support Spark Core firmware updates via the Web UI.

If you are feeling adventurous, you could try updating to all these pre-release versions.
The easiest way to do this, is to run updater.py from brewpi-tools. When asked to pick a branch, choose develop for both script and www.

Don’t let updater.py update your controller. When that’s done, the script probably complains about psutil being old and tells you how to fix it. When you have done that, and the script has really started and is communicating with the controller, refresh the page and you can upload brewpi.bin 0.2.7 to your Spark Core via Maintenance panel -> Reprogram Spark Core

I pushed some bug fixes on 10-3. If you tried and failed before, try again.

Do we need to do this to get our brewpi working after its out of the box. I wish you had some short videos on how to make these upgrades. Its a bit over whelming for first time user such as myself. Im sure its not to hard. But the terminology throws me of sometimes.

1 Like

Started playing around with my new Spark and BrewPi. I’ve updated the BrewPi using the dev branch and followed the log for updating psutil. Refreshed the log and got an OSError finding the serial port.

OSError: [Errno 2] No such file or director: '/dev/ttyACM1’
No such luck with ttyACM0 either.

I updated everything again to make sure no files were missing. BUT I did not try restarting the PI… which worked. :grin: Success.

Omega I’m completely new with this all too and if I had thought to restart the Pi earlier it wouldn’t have taken me long to do it all. The Automated Installer for BrewPi is a real time/headache saver.

Jesse I have mine up and running. I got all that. Im just a little confused about clone this, update that(via web UI) and where Im supposed to put it. Or maybe Im just over thinking it.

I will merge develop into the master branch when I get back home. You can then run the updater to get it. I set it up for mdma to merge, but he was sick today.

1 Like

Okay, two new master releases merged!

To update:
Update python packages for pyserial and psutil:

sudo apt-get install build-essential python-dev python-pip
sudo pip install pyserial --upgrade
sudo pip install psutil --upgrade

Run the update script:

python ~/brewpi-tools/updater.py

You can choose the master branch again.

At the end of the script update do you say yes or no to the hex update

Say no, we have not updated that for the Spark Core yet

Got it all working, Thanks. I will say this, it was a little tricky getting it to read my sensors and getting them to show on the graph. But i will leave that for another post.

Is there a way in the web GUI to query the Spark Core for its current firmware version #? I just got my RPi and Core yesterday and had assumed it was running 0.2.6 but if I try to re-install that same version here is the message I see in the log:

Mar 19 2015 19:26:16 Found BrewPi v0.2.7 build 0, running on a Spark Core with a Rev-C shield on port /dev/ttyACM0

If it’s true that I have 0.2.7, then if I apply 0.2.6 will I get a true roll-back?

If you flash 0.2.6 it will have 0.2.6. The firmware is completely overwritten.
But why would you want to flash 0.2.6? It had a bug that made serial communication unreliable, which was fixed in 0.2.7.

It’s my understanding that 0.2.7 is pre-release / alpha, not to be trusted with controlling a fermentation. Is that no longer true?

Also, can it be assumed that running “sudo ~/brewpi-tools/updater.py” will update the Core’s firmware with the latest stable release (assuming I say Yes instead of No when it gets to this reprogramming step)?

No, I still have to look into that.

0.2.6 was only intended to be the hardware test UI, also not to be used for fermentation.

I think it would be okay to use 0.2.7 for fermentation, it just has not been tested much, therefore the warning. It is more stable than 0.2.6.

I just got my BrewPi this week (it arrived super fast, thanks!) and I’ve got 0.2.7 running on my installed spark core. Everything seems to be working great except the hardware test screen. No matter where I touch the screen, it registers as a touch of the lower right hand relay on/off button. That button state changes no matter where I touch the screen, and I confirmed that the associated relay output is being toggled, as well.

I haven’t yet tried with 0.2.6, but I could give that a shot. Are there any other useful debugging steps that I could take?