Firmware 0.4.4 has been released (You MUST update!)

I changed to ‘Beer constant’ and now the heating did start. I will do some testing after this beer is done.

Stefan

Have you checked this setting? The Dead time when switching between actuators? I seem to remember that the default setting is 1800 which will set a minimum wait between cooling and heating to 30 minutes.

Thanks, I am trying that

Stefan

tried running the updater everything seems to go great but when I ran the updater again my photon still got v0.4.3
maybe has something to do with th blank screen I got since yesterday. The script won’t run also.
I want to try and reprogram the photon but can’t seem to find the hex file (http://dl.brewpi.com/brewpi-avr/stable) link from the install instructions is not working. What can I try? got the spark last week.

----Update
i did a clean install and seems like the touch screen works like it should;.in test mode i can manually controll the 4 outputs. screen is still white though. And when running updater: Current firmware version on controller: 0.4.3
and won’t upgrade to 0.4.4

You should update by running our update script. It fetches the latest version from GitHub.
sudo python ~/brewpi-tools/updater.py

Those files on dl.brewpi.com are very old. The latest releases are on github:
https://github.com/BrewPi/firmware/releases

If your display is blank, but you do hear 2 beeps at startup, there is something wrong with your display and I should ship you a replacement. PM me your address if that is the case. The displays can be a bit unreliable and I am switching to a new supplier in the next re-iteration of the hardware.

Update appeared to complete without error, however the Script Running button seems to refresh every so often as Script not Running, then back to Script Running.
Data is logging and graph is showing data however.

stderr.txt shows no errors:

Jan 13 2017 12:10:19 Opening serial port
Jan 13 2017 12:10:19 Notification: Script started for beer '2017InstallTestData’
Jan 13 2017 12:10:29 Checking software version on controller…
Jan 13 2017 12:10:29 Found BrewPi v0.4.4 build 0.4.4-0-g6d17ff1, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

I have the Tilt Hydrometer customizations configured.

in stdout.txt, I see one error message:

ERROR: TiltHydrometer (Black): Unable to initialise Gravity Calibration data (tiltHydrometer/GRAVITY.black) - list index out of range

That GRAVITY.black file has one calibration point from 1.011 -> 1.000 (“tare” with water)

#Gravity Calibration file for Tilt Hydrometer
#To be active, the file should be named GRAVITY.<colour> in the tiltHydrometer/ folder
#and have at least one calibration value inside.
#So to calibrate a black tilt hydrometer, the file would be called GRAVITY.black
#The following example two calibration points are used. 
#0.997 read from the tilt hydrometer will be calibrated to the actual value of 0.999
#1.056 read from the tilt hydrometer will be calibrated to the actual value of 1.060
#Other calibration points will be calculated.

#Original SG Value, Calibrated Value
#0.997, 0.999
#1.056, 1.060
1.011, 1.000

@SBowler, the author of the Tilt modifications can probably confirm, but to me your GRAVITY file looks wrong. If I am not mistaken, GRAVITY needs two entries, the TEMPERATURE file only needs one.

For the second calibration point, mix some sugar or DME in water and confirm with a glass hydrometer. I would calibrate somewhere in the 1.050 - 1.060 range.

Stefan

@NottingHill @sbowler

Hi Stefan, That makes some sense intuitively, however, seems contrary to the file’s comment “and have at least one calibration value inside”, and the idea that even the brewometer smartphone app allows a single “tare” with water as a baseline adjustment. Was hoping/expecting this implementation to follow suit. If it doesn’t then a bug in the gravity file comments for sure.

I took your advise and add a second calibration point (arbitrary for now) and STILL got the same error. Updated GRAVITY.black file:

#Original SG Value, Calibrated Value
#0.997, 0.999
#1.056, 1.060
1.011, 1.000
1.056, 1.060 

so that doesn’t seem to be the cause.

@sbowler @NottingHill
Even simply with the sample file copied as GRAVITY.black, I get the same error…
cp ~brewpi/tiltHydrometer/GRAVITY.colour ~brewpi/tiltHydrometer/GRAVITY.black

something buggy in the code???
do I have a line termination issue perhaps? (currently just linux-style LF)

See the reply from @Richard_Crump in the Integration thread, the chnages do not like the blank line.

Stefan

For the web interface reporting script not running intermittently, in your apache.conf file, set KeepAliveTimeout to 99 instead of 5.

Thanks @Elco @nottinghill, @sbowler for your help. wonderful products, super-helpful community.

Appears the pi and scripts updated okay, but it fails to update the FW on the spark…gets to this point and exits when coming out of DFU mode. Suggestions? Snippet from update script follows:

Requesting old settings from Photon…
Saved old settings to file settings-Jan-15-2017-23-51-22.json

Found a Photon and running as root/sudo, using DFU mode to flash firmware.

Trying to automatically reboot into DFU mode and update your firmware.

If the Photon does not reboot into DFU mode automatically, please put it in DFU mode manually.
Running command: sudo /usr/bin/python /home/brewpi/utils/flashDfu.py --autodfu --noreset --file=/home/brewpi/utils/downloads/0.4.4 --system1=/home/brewpi/utils/downloads/0.4.4/system-part1-0.5.3-photon.bin --system2=/home/brewpi/utils/downloads/0.4.4/system-part2-0.5.3-photon.bin
Will automatically reboot newly detected photons into DFU mode
Using local files instead of downloading a release.

Path is a directory. Searching for files in path.

booooo
Using dfu-util binary at /home/brewpi/utils/downloads/dfu-util
Detecting DFU devices
Found 1 devices: [‘0a5c:21e8’]
Could not identify device as Photon or Spark Core. Exiting

Updating firmware over DFU finished

Waiting for device to reset.
Jan 15 2017 23:51:34 Opening serial port
Checking new version: Found BrewPi v0.4.3 build 0.4.3-0-g4d00879, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Having some issues with the update of my firmware as well. Get to a similar point as spenceme, however I get a different issue. It will simply loop with this error - Syntax error: word unexpected (expecting “)”), so I ctrl-c to stop it. The BrewPi has a solid white screen, and is blinking yellow. If I unplug and replug (reboot), everything comes back up no issues, but firmware upgrade is not working.

Here’s what I’m getting. Any ideas?

Updating firmware…

**** Photon Program script started ****
Settings will be restored if possible
Devices will be restored if possible
Checking old version before programming.
Jan 15 2017 19:40:28 Opening serial port
Checking current version: Found BrewPi v0.4.3 build 0.4.3-0-g4d00879, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Requesting old settings from Photon…
Saved old settings to file settings-Jan-15-2017-19-40-32.json

Found a Photon and running as root/sudo, using DFU mode to flash firmware.

Trying to automatically reboot into DFU mode and update your firmware.

If the Photon does not reboot into DFU mode automatically, please put it in DFU mode manually.
Running command: sudo /usr/bin/python /home/brewpi/utils/flashDfu.py --autodfu --noreset --file=/home/brewpi/utils/downloads/0.4.4 --system1=/home/brewpi/utils/downloads/0.4.4/system-part1-0.5.3-photon.bin --system2=/home/brewpi/utils/downloads/0.4.4/system-part2-0.5.3-photon.bin
Will automatically reboot newly detected photons into DFU mode
Using local files instead of downloading a release.

Path is a directory. Searching for files in path.

booooo
Using dfu-util binary at /home/brewpi/utils/downloads/dfu-util
Detecting DFU devices
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

Did not find any DFU devices.
Is your Photon or Spark Core running in DFU mode (blinking yellow)?
Waiting until a DFU device is connected…
Found new serial port connected: (’/dev/ttyACM0’, ‘Particle Photon’)
Putting Photon in DFU mode
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

^CTraceback (most recent call last):
File “/home/jeremy/brewpi-tools/updater.py”, line 430, in
Traceback (most recent call last):
File “/home/brewpi/utils/updateFirmware.py”, line 266, in
p.wait()
File “/usr/lib/python2.7/subprocess.py”, line 1376, in wait
result = updateFromGitHub(userInput=userInput, beta=beta, useDfu=useDfu)
File “/home/brewpi/utils/updateFirmware.py”, line 237, in updateFromGitHub
{‘settings’: restoreSettings, ‘devices’: restoreDevices})
File “/home/brewpi/utils/…/programController.py”, line 163, in programController
return programmer.program(hexFile, system1File, system2File, useDfu, restoreWhat)
File “/home/brewpi/utils/…/programController.py”, line 240, in program
process.wait()
File “/usr/lib/python2.7/subprocess.py”, line 1376, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File “/usr/lib/python2.7/subprocess.py”, line 476, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File “/usr/lib/python2.7/subprocess.py”, line 476, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
Traceback (most recent call last):
File “/home/brewpi/utils/flashDfu.py”, line 334, in
time.sleep(1)
KeyboardInterrupt

I think this is a problem with a local dfu install.
Please try uninstalling dfu-util and let the updater download it:
sudo apt-get remove dfu-util

Fixed here. I think it was again due to an incompletely inserted USB cable. :frowning: Thanks again

Thanks for the advice Elco! Unfortunately I didn’t have luck there. After running the remove dfu-util command I got this:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘dfu-util’ is not installed, so not removed
The following packages were automatically installed and are no longer required:
dkms libllvm3.6 libntdb1 linux-headers-4.2.0-27
linux-headers-4.2.0-27-generic linux-image-4.2.0-27-generic
linux-image-extra-4.2.0-27-generic python-ntdb
Use ‘apt-get autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

I tried running the updater.py again, but got the same syntax error as before. It is about here I wish I were stronger with being able to troubleshoot this myself. Thanks for any support!

If the updater does not work, can you try these alternative approaches:

cd /home/brewpi/utils

First try:

sudo python updateFirmware.py --dfu

If that does not work:

sudo python flashDfu.py --autodfu

I am having no luck, keep running into the same message. When I ran the updateFirmware.py --dfu I get the following:

Stopping any running instances of BrewPi to check/update controller…

Checking current firmware version…
Jan 18 2017 08:29:33 Opening serial port
Found BrewPi v0.4.3 build 0.4.3-0-g4d00879, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Current firmware version on controller: 0.4.3

Checking GitHub for available release…

Available releases:

[0] 0.4.4
[1] 0.4.3
[2] 0.4.2
[3] 0.4.1
[4] 0.4.0
[5] 0.2.11
[6] Cancel firmware update
Enter the number [0-6] of the version you want to program [default = 0 (0.4.4)]: 0
Would you like me to try to restore you settings after programming? [Y/n]:
Y
Would you like me to try to restore your configured devices after programming? [Y/n]:
Y
Downloading firmware…
downloading https://github.com/BrewPi/firmware/releases/download/0.4.4/brewpi-photon-0.4.4.bin
Updated system firmware for the photon found in release 0.4.4
downloading https://github.com/BrewPi/firmware/releases/download/0.4.4/system-part1-0.5.3-photon.bin
downloading https://github.com/BrewPi/firmware/releases/download/0.4.4/system-part2-0.5.3-photon.bin
Downloaded new system firmware to:

/home/brewpi/utils/downloads/0.4.4/system-part1-0.5.3-photon.bin
and

/home/brewpi/utils/downloads/0.4.4/system-part2-0.5.3-photon.bin

Latest firmware downloaded to:
/home/brewpi/utils/downloads/0.4.4/brewpi-photon-0.4.4.bin

Updating firmware…

**** Photon Program script started ****
Settings will be restored if possible
Devices will be restored if possible
Checking old version before programming.
Jan 18 2017 08:30:07 Opening serial port
Checking current version: Found BrewPi v0.4.3 build 0.4.3-0-g4d00879, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Requesting old settings from Photon…
Saved old settings to file settings-Jan-18-2017-08-30-10.json

Found a Photon and running as root/sudo, using DFU mode to flash firmware.

Trying to automatically reboot into DFU mode and update your firmware.

If the Photon does not reboot into DFU mode automatically, please put it in DFU mode manually.
Running command: sudo /usr/bin/python /home/brewpi/utils/flashDfu.py --autodfu --noreset --file=/home/brewpi/utils/downloads/0.4.4 --system1=/home/brewpi/utils/downloads/0.4.4/system-part1-0.5.3-photon.bin --system2=/home/brewpi/utils/downloads/0.4.4/system-part2-0.5.3-photon.bin
Will automatically reboot newly detected photons into DFU mode
Using local files instead of downloading a release.

Path is a directory. Searching for files in path.

booooo
Using dfu-util binary at /home/brewpi/utils/downloads/dfu-util
Detecting DFU devices
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

Did not find any DFU devices.
Is your Photon or Spark Core running in DFU mode (blinking yellow)?
Waiting until a DFU device is connected…
Found new serial port connected: (’/dev/ttyACM0’, ‘Particle Photon’)
Putting Photon in DFU mode
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)


I kill it here as it repeats. When I run the flashDFU.py I get:

Will automatically reboot newly detected photons into DFU mode
Using dfu-util binary at downloads/dfu-util
Detecting DFU devices
downloads/dfu-util: 1: downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

Did not find any DFU devices.
Is your Photon or Spark Core running in DFU mode (blinking yellow)?
Waiting until a DFU device is connected…
Found new serial port connected: (’/dev/ttyACM0’, ‘Particle Photon’)
Putting Photon in DFU mode
downloads/dfu-util: 1: downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

downloads/dfu-util: 1: downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

downloads/dfu-util: 1: downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

I kill it here again as it repeats. The device itself does go into a mode with a white screen, and the led is flashing yellow if that helps?