Photon update (0.2.11), Script update (0.3.7) and Shop closes August 5-22

I did run it with sudo, below is the full output of the command. The script is able to connect to GitHub when updating the local /home/brewpi and /var/www branches, and when checking my local firmware version against the latest release, so it’s not clear why it fails on downloading firmware from GH:

pi@RaspberryBrewPi1 ~/brewpi-tools $ sudo python updater.py
######################################################
####                                              ####
####        Welcome to the BrewPi Updater!        ####
####                                              ####
######################################################

Checking whether the update script is up to date
/home/pi/brewpi-tools is up-to-date.



*** Updating BrewPi script repository ***

Stopping running instances of BrewPi
Quit message sent to BrewPi instance with pid 5224!
You are on branch master
The latest commit in /home/brewpi  is 4c7dfa342d8403eb2b485e9970e2cdec9e53c9e4 on Wed, 05 Aug 2015 14:15:44
The latest commit on origin/master is 4c7dfa342d8403eb2b485e9970e2cdec9e53c9e4 on Wed, 05 Aug 2015 14:15:44
Your local version of /home/brewpi is up to date!


*** Updating BrewPi web interface repository ***
You are on branch master
The latest commit in /var/www      is d44c03e786d0bde0dc43f86a8bd655659f3f3d2b on Wed, 11 Mar 2015 14:59:39
The latest commit on origin/master is d44c03e786d0bde0dc43f86a8bd655659f3f3d2b on Wed, 11 Mar 2015 14:59:39
Your local version of /var/www is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n]:y
 Stopping any running instances of BrewPi to check/update controller...

Checking current firmware version...
Aug 23 2015 08:30:44   Opening serial port
 Current firmware version on controller: 0.2.10

Checking GitHub for latest release...
 Latest version on GitHub: 0.2.11

Version on GitHub is newer than your current version, downloading new version...
 Downloading latest firmware...
 Downloading firmware failed

*** Done updating BrewPi! ***

I have the Brewpi Photon working and logging temps using the SSR expansion board, next Ia m going to hook up my SSR’s and then my fermentation chamber. One question I have is if the Touchscreen is supposed to control anything? So far I touch it and it doesn’t do anything. Are there any controls that I can change with the touchscreen? Thanks for any help.

@DanCook

I think I had the same issue, line 115 of /home/brewpi/utils/updateFirmware.py reads elif family == “Spark”:

but believe it should read elif family == “Particle”:

I changed mine local and it fixed the issue.

Let me know how you get on.

Even if I am running a Spark Core and not a Particle board?

Yep, i updated my core before upgrading the core to a Photon, I think Elco has changed the github fork for the new name for Spark.

If it doesn’t fix the issue then you could always copy down the original again. I have just tried setting mine back and get the same error. one I change Spark to Particle is works.

Rich

I updated my Spark Core to 0.2.11, and the update completed. On the first reboot after flashing the firmware I got the stuck on the stylus calibration screen, but on subsequent reboots I get the 4 flashes and then the standard BrewPi UI.

I had to query and re-install my devices and default settings, no big deal. But here’s the troubling thing: I no longer have cooling activity. When the freezer should kick on at the beginning of a cooling cycle it does nothing and I don’t hear the SSR click. But I do get the expected result for heating cycles! I recreated the device settings as they previously were (based on screenshots from a known working environment) so I am pretty sure they are correct.

My updater,py output is at bottom, and above that is what I see upon rebooting the Pi/BrewPi. Notice it says “running on a Particle Core” (which is not true)

Aug 24 2015 16:43:34 Opening serial port
Aug 24 2015 16:43:34 Notification: Script started for beer 'None'
Aug 24 2015 16:43:44 Checking software version on controller... 
Aug 24 2015 16:43:45 Found BrewPi v0.2.11 build 0.2.11-0-ga28c22d, running on a Particle Core with a V1 shield on port /dev/ttyACM0

pi@RaspberryBrewPi1 ~/brewpi-tools $ sudo python updater.py
######################################################
####                                              ####
####        Welcome to the BrewPi Updater!        ####
####                                              ####
######################################################

Checking whether the update script is up to date
/home/pi/brewpi-tools is up-to-date.



*** Updating BrewPi script repository ***

Stopping running instances of BrewPi
Quit message sent to BrewPi instance with pid 2507!
You are on branch master
The latest commit in /home/brewpi  is 4c7dfa342d8403eb2b485e9970e2cdec9e53c9e4 on Wed, 05 Aug 2015 14:15:44
The latest commit on origin/master is 4c7dfa342d8403eb2b485e9970e2cdec9e53c9e4 on Wed, 05 Aug 2015 14:15:44
Your local version of /home/brewpi is up to date!


*** Updating BrewPi web interface repository ***
You are on branch master
The latest commit in /var/www      is d44c03e786d0bde0dc43f86a8bd655659f3f3d2b on Wed, 11 Mar 2015 14:59:39
The latest commit on origin/master is d44c03e786d0bde0dc43f86a8bd655659f3f3d2b on Wed, 11 Mar 2015 14:59:39
Your local version of /var/www is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n]:y
 Stopping any running instances of BrewPi to check/update controller...

Checking current firmware version...
Aug 24 2015 16:10:53   Opening serial port
 Current firmware version on controller: 0.2.10

Checking GitHub for latest release...
 Latest version on GitHub: 0.2.11

Version on GitHub is newer than your current version, downloading new version...
 Downloading latest firmware...
downloading https://github.com/BrewPi/firmware/releases/download/0.2.11/brewpi-0.2.11-core.bin
 Latest firmware downloaded to /home/brewpi/utils/downloads/0.2.11/brewpi-0.2.11-core.bin
 ****    Spark Core Program script started    ****
 Settings will be restored if possible
 Devices will be restored if possible
Aug 24 2015 16:10:56   Opening serial port
 Checking old version before programming.
 Checking current version: Found BrewPi v0.2.10 build 0.2.10-0-g2312560, running on a Particle Core with a V1 shield on port /dev/ttyACM0

 Requesting old settings from Spark Core...
 Saved old settings to file settings-Aug-24-2015-16-10-59.json
 Waiting for the binary file to be sent ... (press 'a' to abort)

 sent packet nr 0
 sent packet nr 1
 sent packet nr 2
 sent packet nr 3
 sent packet nr 4
 sent packet nr 5
 sent packet nr 6
 sent packet nr 7
 sent packet nr 8
 sent packet nr 9
 sent packet nr 10
 sent packet nr 11
 sent packet nr 12
 sent packet nr 13
 sent packet nr 14
 sent packet nr 15
 sent packet nr 16
 sent packet nr 17
 sent packet nr 18
 sent packet nr 19
 sent packet nr 20
 sent packet nr 21
 sent packet nr 22
 sent packet nr 23
 sent packet nr 24
 sent packet nr 25
 sent packet nr 26
 sent packet nr 27
 sent packet nr 28
 sent packet nr 29
 sent packet nr 30
 sent packet nr 31
 sent packet nr 32
 sent packet nr 33
 sent packet nr 34
 sent packet nr 35
 sent packet nr 36
 sent packet nr 37
 sent packet nr 38
 sent packet nr 39
 sent packet nr 40
 sent packet nr 41
 sent packet nr 42
 sent packet nr 43
 sent packet nr 44
 sent packet nr 45
 sent packet nr 46
 sent packet nr 47
 sent packet nr 48
 sent packet nr 49
 sent packet nr 50
 sent packet nr 51
 sent packet nr 52
 sent packet nr 53
 sent packet nr 54
 sent packet nr 55
 sent packet nr 56
 sent packet nr 57
 sent packet nr 58
 sent packet nr 59
 sent packet nr 60
 sent packet nr 61
 sent packet nr 62
 sent packet nr 63
 sent packet nr 64
 sent packet nr 65
 sent packet nr 66
 sent packet nr 67
 sent packet nr 68
 sent packet nr 69
 sent packet nr 70
 sent packet nr 71
 sent packet nr 72
 sent packet nr 73
 sent packet nr 74
 sent packet nr 75
 sent packet nr 76
 sent packet nr 77
 sent packet nr 78
 sent packet nr 79
 sent packet nr 80
 sent packet nr 81
 sent packet nr 82
 sent packet nr 83
 sent packet nr 84
 sent packet nr 85
 sent packet nr 86
 sent packet nr 87
 sent packet nr 88
 sent packet nr 89
 sent packet nr 90
 sent packet nr 91
 sent packet nr 92
 sent packet nr 93
 sent packet nr 94
 sent packet nr 95
 sent packet nr 96
 sent packet nr 97
 sent packet nr 98
 sent packet nr 99
 sent packet nr 100
 sent packet nr 101
 sent packet nr 102
 sent packet nr 103
 sent packet nr 104
 sent packet nr 105
 sent packet nr 106
 sent packet nr 0
 File flashed successfully
 Waiting for device to reset.
Aug 24 2015 16:11:06   Opening serial port
 Warning: Cannot receive version number from controller. Your controller is either not programmed yet or running a very old version of BrewPi. It will be reset to defaults.
 Resetting EEPROM to default settings
 INFO MESSAGE 15: EEPROM initialized
 Now checking which settings and devices can be restored...
 Warning: Cannot receive version number from controller after programming.
Something must have gone wrong. Restoring settings/devices settings failed.

BrewPi script will restart automatically.
Firmware update done

*** Done updating BrewPi! ***

@rbpalmer Thank you so much for this tip! I was having the same problem as @DanCook and am also using a Spark Core, not Particle board, but making this change to the line you called out worked. I thought I was going crazy when it kept failing no matter what I did!

I suspect that applying the change recommended by @rbpalmer and then flashing my firmware to 0.2.11 has mangled the internal software / firmware logic governing Digital Output #3. That output, and its downstream SSR, used to turn my freezer on/off but this control path stopped working immediately upon flashing my firmware. By simply moving the green SSR terminal from Output #3 over to Output #1, then doing the relevant remapping in Device Configuration, the BrewPi can control the freezer once again.

Further data: I put the BrewPi Spark into Test mode and applied a volt meter on the 3 digital outputs. Output #3 is no longer sending 3V of DC control current when it is in ON mode, but the 2 other outputs continue to work as expected. This tells me the problem is not due to a physical defect in the control signal cables or their terminations, nor a fried SSR; the problem lies within the BrewPi Spark itself.

Is there a method for moving backward in a firmware versions? Or, assuming I need to have 3 working digital outputs at a later point, will I need to put the Core into DFU mode and flash that way?

Can you try running flashDfu to revert 0.2.11?
Run it with: python flashDfy.py --testmode to automatically apply test mode after updating.

The output voltage on the green terminals should be ~4.5V on USB, ~4.8V on 12V, not 3V.
Maybe your board is not getting enough power?
Or something is drawing too much power, try measuring the outputs with everything disconnected.

I was reading my analog multimeter wrong (didn’t have my glasses on). I am getting a tad over 4V at the digital output terminals #1 and #2 when I unplug the connectors. But I still don’t get any voltage on output #3.

I assume that in order to run flashDfu I need to put the Spark into DFU mode, and that the full text of the command is :

sudo python /home/brewpi/utils/flashDfu.py --testmode

Can you confirm?

I went through the DFU update process, the output is shown below and I have working heating / cooling functions. Unfortunately I still have no voltage on output #3 and no SSR activity either. When I am in Test mode and I toggle all 3 outputs to ON, I can ‘peek under the hood’ and see what appear to be red LED bulbs on the Spark board for the two working outputs but no such glow corresponding to the faulty output. Then again I’m not sure if a red glow was visible on output #3 when it was previously working.

pi@RaspberryBrewPi1 ~ $ sudo python /home/brewpi/utils/flashDfu.py --testmode
Will set device to test mode after flashing
Detecting DFU devices
Found 1 devices:  ['1d50:607f']
Device identified as Spark Core
Downloading latest firmware...
Latest stable version on GitHub: 0.2.11
downloading https://github.com/BrewPi/firmware/releases/download/0.2.11/brewpi-0.2.11-core.bin
Firmware downloaded to /home/brewpi/utils/downloads/0.2.11/brewpi-0.2.11-core.bin
Now writing BrewPi firmware /home/brewpi/utils/downloads/0.2.11/brewpi-0.2.11-core.bin
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU capable USB device... ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/20*001Ka,108*001Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08005000, size = 108140
..........................................................................................................
File downloaded successfully
Transitioning to dfuMANIFEST state
Error during download get_status
Programming done, now resetting EEPROM to defaults
Opening serial port
Aug 31 2015 09:23:51   Opening serial port
 Success! Found BrewPi v0.2.11 build 0.2.11-0-ga28c22d, running on a Particle Core with a V1 shield on port /dev/ttyACM1

 Resetting EEPROM to default settings
 INFO MESSAGE 15: EEPROM initialized
 INFO MESSAGE 12: Received new setting: mode = t
pi@RaspberryBrewPi1 ~ $

My suggestion was only to get the software to install, It would not have broken or changed any settings all ready installed. @DanCook

I have confirmed the issue. This is a software problem in the firmware.

I have not figured it out yet. I can step debug and I see the digitalWrite happening on the correct pin (a0/10), but it does not change value when I check it with a multimeter.

Step debugging shows a digitalWrite to pin 10:

Which is the correct pin nr according to the Spark Core pin layout:

All other pins work when toggling the inversion in device manager. It also works fine on the Photon. The hardware abstraction layer in the Particle framework should make both device behave the same. @mdma, do you have a clue what is going on?

Could it be related to that pin being the wake up pin? Did something change in the default configuration of the pin?

Awesome! This means I am not crazy and / or stoopid. Thankfully I have 2 working outputs so I can wait out a fix.

My suspicions were correct: reverting this commit by Satish fixes the issue:

So the latest version of the spark firmware configures the pin as input to wake from sleep (I think), which is why it is not working as output.

I’ll leave it to @mdma to comment on how best to resolve this.

1 Like

@Elco i haven’t updated my brewpi core since I first set it up in ~April, should I run the update script? I haven’t been around here for a while and haven’t been keeping up with the chit chat, so just wanted to make sure I don’t mess anything up! Cheers

0.4.5 was recently released for the core and photon which addresses the A0 wakeup issue.

What do I do to update to 0.4.5? Sorry I’m not terribly tech inclined!

I should also ask if this is something I need to do? Does it effect basic functioning of the brewpi for fermentation purposes (just a fridge and a heater)?

Actually, what I just noticed is that I am still on 0.2.8 on my core. @Elco should I run updater?

The next releases will be compiled with with framework version 0.4.5 and will include the changes.

Yes I think you should run the updater.

Elco,
Any updates coming soon?

2 Likes