pi@raspberrypi:~ $ sudo python brewpi-tools/updater.py ###################################################### #### #### #### Welcome to the BrewPi Updater! #### #### #### ###################################################### Checking whether the update script is up to date remote: Counting objects: 4, done. remote: Total 4 (delta 3), reused 3 (delta 3), pack-reused 1 Unpacking objects: 100% (4/4), done. From https://github.com/BrewPi/brewpi-tools 67aec20..6c69505 master -> origin/master 67aec20..6c69505 develop -> origin/develop /home/pi/brewpi-tools is not up-to-date, updating... Updating 67aec20..6c69505 Fast-forward .gitignore | 1 + updater.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) This script was not up-to-date and has been automatically updated. Please re-run updater.py. pi@raspberrypi:~ $ sudo python brewpi-tools/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 18439! You are on branch master The latest commit in /home/brewpi is 67efcb0e40f0be4b40ad1e7cd207eedcf0dd032c on Wed, 27 Apr 2016 20:25:10 The latest commit on origin/master is 08a8a5a202d06f514d9778b00ccef69d83635741 on Wed, 23 Nov 2016 14:18:04 *** Updates are available! **** Would you like to update /home/brewpi from origin/master [Y/n]: Updating 67efcb0..08a8a5a Fast-forward backgroundserial.py | 13 ++++++++----- brewpi.py | 48 ++++++++++++++++++++++++------------------------ brewpiVersion.py | 4 ++-- programController.py | 12 ++++++------ utils/flashDfu.py | 39 ++++++++++++++++++++++++--------------- utils/testTerminal.py | 2 +- 6 files changed, 65 insertions(+), 53 deletions(-) master updated! *** Updating BrewPi web interface repository *** You are on branch master The latest commit in /var/www/html is 1e0778703edbbd3ef33072ba0b260c491fba90cc on Mon, 11 Jan 2016 14:04:54 The latest commit on origin/master is 1e0778703edbbd3ef33072ba0b260c491fba90cc on Mon, 11 Jan 2016 14:04:54 Your local version of /var/www/html is up to date! One our more repositories were updated, running runAfterUpdate.sh from /home/brewpi/utils... Installing dependencies, updating CRON and fixing file permissions... Cleaning up BrewPi script directory... Deleted 14 old .pyc files ***** Installing/updating required packages... ***** Reading package lists... Done Building dependency tree Reading state information... Done apache2 is already the newest version. build-essential is already the newest version. git-core is already the newest version. libapache2-mod-php5 is already the newest version. php5 is already the newest version. php5-cgi is already the newest version. php5-cli is already the newest version. php5-common is already the newest version. python-dev is already the newest version. python-pip is already the newest version. The following packages were automatically installed and are no longer required: libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal libxfce4ui-1-0 xfce-keyboard-shortcuts Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded. ***** Installing/updating required python packages via pip... ***** Downloading/unpacking pyserial from https://pypi.python.org/packages/c0/a7/25d801d71d2eecbbf0f1142a9d38aa77be71172295259dabb7d91310289c/pyserial-3.2.1-py2.py3-none-any.whl#md5=cb7dbb38abf35498a183a463a040d871 Downloading pyserial-3.2.1-py2.py3-none-any.whl (189kB): 189kB downloaded Downloading/unpacking psutil from https://pypi.python.org/packages/93/7f/347309562d30c688299727e65f4d76ef34180c406dfb6f2c7b6c8d746e13/psutil-5.0.0.zip#md5=362a03686ce36940d22a548ecb47d7e0 Downloading psutil-5.0.0.zip (374kB): 374kB downloaded Running setup.py (path:/tmp/pip-build-Cnh_1e/psutil/setup.py) egg_info for package psutil warning: no previously-included files matching '*' found under directory 'docs/_build' Downloading/unpacking simplejson from https://pypi.python.org/packages/40/ad/52c1f3a562df3b210e8f165e1aa243a178c454ead65476a39fa3ce1847b6/simplejson-3.10.0.tar.gz#md5=426a9631d22851a7a970b1a677368b15 Downloading simplejson-3.10.0.tar.gz (77kB): 77kB downloaded Running setup.py (path:/tmp/pip-build-Cnh_1e/simplejson/setup.py) egg_info for package simplejson Requirement already up-to-date: configobj in /usr/local/lib/python2.7/dist-packages Downloading/unpacking gitpython from https://pypi.python.org/packages/2c/21/1db408fefa1ebe694d69a2bf7bb5b9ab57a3f065154228086a4f64e4c33f/GitPython-2.1.0-py2.py3-none-any.whl#md5=3f9d6898015bb2cac22f4e7c49bfe5ef Downloading GitPython-2.1.0-py2.py3-none-any.whl (441kB): 441kB downloaded Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from configobj) Downloading/unpacking gitdb2>=2.0.0 (from gitpython) Downloading gitdb2-2.0.0-py2.py3-none-any.whl (63kB): 63kB downloaded Downloading/unpacking smmap2>=2.0.0 (from gitdb2>=2.0.0->gitpython) Downloading smmap2-2.0.1-py2.py3-none-any.whl Installing collected packages: pyserial, psutil, simplejson, gitpython, gitdb2, smmap2 Found existing installation: pyserial 3.1 Uninstalling pyserial: Successfully uninstalled pyserial Found existing installation: psutil 4.2.0 Uninstalling psutil: Successfully uninstalled psutil Running setup.py install for psutil building 'psutil._psutil_linux' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=500 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-armv7l-2.7/psutil/_psutil_linux.o arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/psutil/_psutil_linux.o -o build/lib.linux-armv7l-2.7/psutil/_psutil_linux.so building 'psutil._psutil_posix' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-armv7l-2.7/psutil/_psutil_posix.o arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/psutil/_psutil_posix.o -o build/lib.linux-armv7l-2.7/psutil/_psutil_posix.so warning: no previously-included files matching '*' found under directory 'docs/_build' Found existing installation: simplejson 3.8.2 Uninstalling simplejson: Successfully uninstalled simplejson Running setup.py install for simplejson building 'simplejson._speedups' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-armv7l-2.7/simplejson/_speedups.o arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/simplejson/_speedups.o -o build/lib.linux-armv7l-2.7/simplejson/_speedups.so Found existing installation: GitPython 2.0.5 Uninstalling GitPython: Successfully uninstalled GitPython Successfully installed pyserial psutil simplejson gitpython gitdb2 smmap2 Cleaning up... ***** Done processing BrewPi dependencies ***** ***** Updating cron for the brewpi user... ***** no crontab for brewpi Checking entry for brewpi ... Done checking entry brewpi ... Checking entry for wifichecker ... Done checking entry wifichecker ... Restarting cron [ ok ] Restarting cron (via systemctl): cron.service. ***** Fixing file permissions for /var/www ***** ***** Fixing file permissions for /home/brewpi ***** 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]: Stopping any running instances of BrewPi to check/update controller... Checking current firmware version... Nov 25 2016 10:58:35 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... Latest version on GitHub: 0.4.4 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. Nov 25 2016 10:58:43 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-Nov-25-2016-10-58-47.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 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 Found 1 devices: ['2b04:d006'] Device identified as Particle Photon First updating system firmware for the Photon, part 1: /home/brewpi/utils/downloads/0.4.4/system-part1-0.5.3-photon.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 = 0x2b04 product = 0xd006 Opening DFU capable USB device... ID 2b04:d006 Run-time device DFU version 011a Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 011a Device returned transfer size 4096 No valid DFU suffix signature Warning: File has no DFU suffix DfuSe interface name: "Internal Flash " Downloading to address = 0x08020000, size = 250956 .............................................................. File downloaded successfully Continuing updating system firmware for the Photon, part 2: /home/brewpi/utils/downloads/0.4.4/system-part2-0.5.3-photon.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 = 0x2b04 product = 0xd006 Opening DFU capable USB device... ID 2b04:d006 Run-time device DFU version 011a Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuDNLOAD-IDLE, status = 0 aborting previous incomplete transfer Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 011a Device returned transfer size 4096 No valid DFU suffix signature Warning: File has no DFU suffix DfuSe interface name: "Internal Flash " Downloading to address = 0x08060000, size = 189068 ............................................... File downloaded successfully Now writing BrewPi firmware /home/brewpi/utils/downloads/0.4.4/brewpi-photon-0.4.4.bin to Photon 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 = 0x2b04 product = 0xd006 Opening DFU capable USB device... ID 2b04:d006 Run-time device DFU version 011a Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuDNLOAD-IDLE, status = 0 aborting previous incomplete transfer Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 011a Device returned transfer size 4096 No valid DFU suffix signature Warning: File has no DFU suffix DfuSe interface name: "Internal Flash " Downloading to address = 0x080a0000, size = 88164 ...................... File downloaded successfully Programming done Updating firmware over DFU finished Waiting for device to reset. Nov 25 2016 10:59:24 Opening serial port Checking new version: Found BrewPi v0.4.4 build 0.4.4-0-g6d17ff1, running on a Particle Photon with a V2 shield on port /dev/ttyACM0 Resetting EEPROM to default settings INFO MESSAGE 15: EEPROM initialized Now checking which settings and devices can be restored... Trying to restore compatible settings from 0.4.3 to 0.4.4 Migrating these settings: [["tempFormat", "C"], ["fridgeSet", 4.0], ["beerSet", 6.0], ["mode", "b"], ["heater1_kp", 10.0], ["heater1_ti", 600], ["heater1_td", 60], ["heater1_infilt", 1], ["heater1_dfilt", 4], ["heater2_kp", 10.0], ["heater2_ti", 600], ["heater2_td", 60], ["heater2_infilt", 1], ["heater2_dfilt", 4], ["cooler_kp", 3.0], ["cooler_ti", 1800], ["cooler_td", 200], ["cooler_infilt", 0], ["cooler_dfilt", 1], ["beer2fridge_kp", 3.0], ["beer2fridge_ti", 3000], ["beer2fridge_td", 0], ["beer2fridge_infilt", 0], ["beer2fridge_dfilt", 0], ["beer2fridge_pidMax", 10.0], ["minCoolTime", 60], ["minCoolIdleTime", 180], ["heater1PwmPeriod", 4], ["heater2PwmPeriod", 4], ["coolerPwmPeriod", 1200], ["deadTime", 1800]] Omitting these settings: [] INFO MESSAGE 12: Received new setting: tempFormat = C INFO MESSAGE 12: Received new setting: fridgeSet = 4.0 INFO MESSAGE 12: Received new setting: beerSet = 6.0 INFO MESSAGE 12: Received new setting: mode = b INFO MESSAGE 12: Received new setting: heater1_kp = 10.0 INFO MESSAGE 12: Received new setting: heater1_ti = 600 INFO MESSAGE 12: Received new setting: heater1_td = 60 INFO MESSAGE 12: Received new setting: heater1_infilt = 1 INFO MESSAGE 12: Received new setting: heater1_dfilt = 4 INFO MESSAGE 12: Received new setting: heater2_kp = 10.0 INFO MESSAGE 12: Received new setting: heater2_ti = 600 INFO MESSAGE 12: Received new setting: heater2_td = 60 INFO MESSAGE 12: Received new setting: heater2_infilt = 1 INFO MESSAGE 12: Received new setting: heater2_dfilt = 4 INFO MESSAGE 12: Received new setting: cooler_kp = 3.0 INFO MESSAGE 12: Received new setting: cooler_ti = 1800 INFO MESSAGE 12: Received new setting: cooler_td = 200 INFO MESSAGE 12: Received new setting: cooler_infilt = 0 INFO MESSAGE 12: Received new setting: cooler_dfilt = 1 INFO MESSAGE 12: Received new setting: beer2fridge_kp = 3.0 INFO MESSAGE 12: Received new setting: beer2fridge_ti = 3000 INFO MESSAGE 12: Received new setting: beer2fridge_td = 0 INFO MESSAGE 12: Received new setting: beer2fridge_infilt = 0 INFO MESSAGE 12: Received new setting: beer2fridge_dfilt = 0 INFO MESSAGE 12: Received new setting: beer2fridge_pidMax = 10.0 INFO MESSAGE 12: Received new setting: minCoolTime = 60 INFO MESSAGE 12: Received new setting: minCoolIdleTime = 180 INFO MESSAGE 12: Received new setting: heater1PwmPeriod = 4 INFO MESSAGE 12: Received new setting: heater2PwmPeriod = 4 INFO MESSAGE 12: Received new setting: coolerPwmPeriod = 1200 INFO MESSAGE 12: Received new setting: deadTime = 1800 Now trying to restore previously installed devices: [{u'a': u'28A6CC3507000040', u'c': 1, u'b': 0, u'd': 0, u'f': 5, u'i': 0, u'h': 2, u'j': 0.0, u'p': 0, u't': 1}, {u'a': u'2882F735070000DE', u'c': 1, u'b': 0, u'd': 0, u'f': 6, u'i': 1, u'h': 2, u'j': 0.0, u'p': 0, u't': 1}, {u'a': u'28D3275D07000015', u'c': 1, u'b': 1, u'd': 0, u'f': 9, u'i': 2, u'h': 2, u'j': 0.0, u'p': 0, u't': 1}, {u'c': 1, u'b': 0, u'd': 0, u'f': 2, u'i': 5, u'h': 1, u'p': 11, u't': 4, u'x': 0}, {u'c': 1, u'b': 0, u'd': 0, u'f': 3, u'i': 6, u'h': 1, u'p': 10, u't': 4, u'x': 0}] Restoring device: {"a": "28A6CC3507000040", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 0, "t": 1} Photon reports: device updated to: {"i":0,"t":1,"c":1,"b":0,"f":5,"h":2,"d":0,"p":0,"a":"28A6CC3507000040","j": 0.000} Restoring device: {"a": "2882F735070000DE", "c": 1, "b": 0, "d": 0, "f": 6, "i": 1, "h": 2, "j": 0.0, "p": 0, "t": 1} Photon reports: device updated to: {"i":1,"t":1,"c":1,"b":0,"f":6,"h":2,"d":0,"p":0,"a":"2882F735070000DE","j": 0.000} Restoring device: {"a": "28D3275D07000015", "c": 1, "b": 1, "d": 0, "f": 9, "i": 2, "h": 2, "j": 0.0, "p": 0, "t": 1} Photon reports: device updated to: {"i":2,"t":1,"c":1,"b":1,"f":9,"h":2,"d":0,"p":0,"a":"28D3275D07000015","j": 0.000} Restoring device: {"c": 1, "b": 0, "d": 0, "f": 2, "i": 5, "h": 1, "p": 11, "t": 4, "x": 0} Photon reports: device updated to: {"i":5,"t":4,"c":1,"b":0,"f":2,"h":1,"d":0,"p":11,"x":0} Restoring device: {"c": 1, "b": 0, "d": 0, "f": 3, "i": 6, "h": 1, "p": 10, "t": 4, "x": 0} Photon reports: device updated to: {"i":6,"t":4,"c":1,"b":0,"f":3,"h":1,"d":0,"p":10,"x":0} Restoring installed devices done! **** Program script done! **** BrewPi script will restart automatically. *** Done updating BrewPi! *** pi@raspberrypi:~ $