Brand new BrewPi Spark2 install - Cannot receive LCD text from Python script - Script not running! - BrewPi requires pyserial 3.0, you have version 2.6 installed

Installed as following:

sudo apt-get install git

git clone https://github.com/BrewPi/brewpi-tools.git ~/brewpi-tools

cd ~/brewpi-tools

sudo ./install.sh

I didn’t keep the formal log of the first attempt at install however it all went well with one exception, it wanted a username pi which I’ve long since removed for security reasons … I added this user anyway.

The web interface worked, however the messages were:

Cannot receive LCD text from Python script
Script not running!

Rebooted, no change

Reinstalled just in case the missing user pi was a critical factor, this time as root

su

git clone https://github.com/BrewPi/brewpi-tools.git ~/brewpi-tools

cd ~/brewpi-tools

./install.sh

installation log attached, no errors noticed. Same result.

Cannot receive LCD text from Python script
Script not running!

Rebooted no change

su

python brewpi.py --status
No BrewPi scripts running

cat /home/brewpi/settings/defaults.cfg
scriptPath = /home/brewpi/
wwwPath = /var/www/
port = auto
altport = None
boardType = leonardo
beerName = My First BrewPi Run
interval = 120.0
dataLogging = active

cat /home/brewpi/settings/config.cfg
wwwPath = /var/www/html

thought it strange defaults.cfg listed leonardo and config.cfg had no over-riding rule for the photon

ls -al /dev/ttyA*
crw-rw---- 1 root dialout 166, 0 Jun 5 09:28 /dev/ttyACM0

photon is definitely attached

looking around the utils folder…

./updateFirmware.py
Stopping any running instances of BrewPi to check/update controller…
Checking current firmware version…
Jun 05 2016 10:17:28 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.3
[1] 0.4.2
[2] 0.4.1
[3] 0.4.0
[4] 0.2.11
[5] Cancel firmware update
Enter the number [0-5] of the version you want to program [default = 0 (0.4.3)]:
Type yes to reprogram or just press enter to keep your current firmware:
yes
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.3/brewpi-photon-0.4.3.bin
Photon system firmware is up to date.
Latest firmware downloaded to:
Updating firmware…
**** Photon Program script started ****
Settings will be restored if possible
Devices will be restored if possible
Checking old version before programming.
Jun 05 2016 10:18:11 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-Jun-05-2016-10-18-15.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.3
Will automatically reboot newly detected photons into DFU mode
Using local files instead of downloading a release.
dfu-util not found, downloading dfu-util…
downloading http://dfu-util.sourceforge.net/releases/dfu-util-0.7-binaries/linux-armel/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
Now writing BrewPi firmware /home/brewpi/utils/downloads/0.4.3/brewpi-photon-0.4.3.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/03016Ka,01016Kg,01064Kg,07128Kg"
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 = 0x080a0000, size = 86820

File downloaded successfully
Programming done
Updating firmware over DFU finished
Waiting for device to reset.
Jun 05 2016 10:18: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
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.3
Migrating these settings: [[“tempFormat”, “C”], [“fridgeSet”, null], [“beerSet”, null], [“mode”, “t”], [“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”, 10.0], [“cooler_ti”, 1800], [“cooler_td”, 200], [“cooler_infilt”, 1], [“cooler_dfilt”, 4], [“beer2fridge_kp”, 2.0], [“beer2fridge_ti”, 7200], [“beer2fridge_td”, 1200], [“beer2fridge_infilt”, 1], [“beer2fridge_dfilt”, 4], [“beer2fridge_pidMax”, 10.0], [“minCoolTime”, 120], [“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 = null
INFO MESSAGE 12: Received new setting: beerSet = null
INFO MESSAGE 12: Received new setting: mode = t
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 = 10.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 = 1
INFO MESSAGE 12: Received new setting: cooler_dfilt = 4
INFO MESSAGE 12: Received new setting: beer2fridge_kp = 2.0
INFO MESSAGE 12: Received new setting: beer2fridge_ti = 7200
INFO MESSAGE 12: Received new setting: beer2fridge_td = 1200
INFO MESSAGE 12: Received new setting: beer2fridge_infilt = 1
INFO MESSAGE 12: Received new setting: beer2fridge_dfilt = 4
INFO MESSAGE 12: Received new setting: beer2fridge_pidMax = 10.0
INFO MESSAGE 12: Received new setting: minCoolTime = 120
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
No devices to restore!
**** Program script done! ****
BrewPi script will restart automatically.

that appeared to run beautifully

it downloaded:
/home/brewpi/utils/downloads/0.4.3/brewpi-photon-0.4.3.bin
/home/brewpi/utils/downloads/dfu-util

So there appears to be no hardware problems

./installDependencies.sh
***** 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.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
***** Installing/updating required python packages via pip… *****
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: psutil in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: simplejson in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: configobj in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: gitpython in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from configobj)
Cleaning up…
***** Done processing BrewPi dependencies *****

This appeared all good

./fixPermissions.sh
***** Fixing file permissions for /var/www *****
***** Fixing file permissions for /home/brewpi *****
***** Installing/updating required python packages via pip… *****
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: psutil in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: simplejson in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: configobj in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: gitpython in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from configobj)
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
Restarting cron (via systemctl): cron.service.
***** Fixing file permissions for /var/www *****
***** Fixing file permissions for /home/brewpi *****

everything appeared ok

./runAfterUpdate.sh
Cleaning up BrewPi script directory…
Deleted 2 old .pyc files
Deleted 3 empty directories

everything appeared ok

as user brewpi (whom I assume runs the brewpi script)

sudo -u brewpi python /home/brewpi/brewpi.py
BrewPi requires ConfigObj to run, please install it with 'sudo apt-get install python-configobj

sudo apt-get install python-configobj

this wasn’t installed, it is now

sudo -u brewpi python /home/brewpi/brewpi.py
BrewPi requires pyserial 3.0, you have version 2.6 installed.
Please upgrade pyserial via pip, by running:
sudo pip install pyserial --upgrade
If you do not have pip installed, install it with:
sudo apt-get install build-essential python-dev python-pip

sudo pip install pyserial --upgrade
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Cleaning up…

this appeared to change nothing

sudo apt-get install build-essential python-dev python-pip

build-essential is already the newest version.
python-dev is already the newest version.
python-pip is already the newest version.

this appeared to change nothing

So I appear to have python3-serial installed, which lists as version 2.6 go figure. Is this the real problem?

Over it for now.

TIA

grep main /etc/apt/sources.list

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

cat /etc/issue.net
Raspbian GNU/Linux 8

uname -r
4.4.11-v7+

defaults.cfg.txt (309 Bytes)

config.cfg.txt (24 Bytes)

install.log.txt (4.0 KB)

I guess I’ll try reinstalling Python?

what does python --version return?
And what about pip freeze?

python --version
Python 2.7.9

pip freeze
CDDB==1.4
GitPython==2.0.5
Pillow==2.6.1
RPi.GPIO==0.6.2
RTIMULib==7.2.1
SQLAlchemy==0.9.8
argparse==1.2.1
async==0.6.1
chardet==2.3.0
colorama==0.3.2
configobj==5.0.6
dnspython==1.12.0
feedparser==5.1.3
gitdb==0.6.4
gpiozero==1.2.0
html5lib==0.999
iotop==0.6
lxml==3.4.0
mcpi==0.1.1
meld==3.12.1
mutagen==1.25.1
ndg-httpsclient==0.3.2
numpy==1.8.2
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
psutil==4.2.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pycrypto==2.6.1
pygame==1.9.2a0
pygobject==3.14.0
pyinotify==0.9.4
pyrit==0.4.0
pyserial==3.1
python-apt==0.9.3.12
python-musicbrainz2==0.7.4
pyxdg==0.25
quodlibet==3.2.2
requests==2.4.3
scapy==2.2.0
sense-hat==2.1.0
simplejson==3.8.2
six==1.10.0
smmap==0.9.0
spidev==3.0
uTidylib==0.2
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2

Here’s the mouse paste of what I tried today. Some of it was quite mis-informed but, now I know.

sudo aptitude

removing:

libpython2.7-dev
libpython-dev

libpython2.7

pulls a heap of shit out including

samba
eog
gdb
gvfs-backends
vim-gtk

removing:

idle-python2.7
idle

removing:

libpython2.7-minimal

tries to remove a lot of stuff including

debian-goodies
gconf2
gksu
gimp
python-minimal
python-openssl
python-serial …
python-simplejson
python2.7
raspberrypi-ui-mods
sense-hat
supercollider

will free 493 MB of disk space

errors removing, probably caused by apt-listchanges

trying again, completes without error

subset of the packages I now have to do without:

sudo aptitude purge ~c
The following packages will be REMOVED:
apt-listchanges{p} dctrl-tools{p} debian-goodies{p} debsecan{p} eog{p} exfalso{p} gconf2{p} gdb{p} gimp{p} gimp-data{p} gksu{p}
gnome-menus{p} gtk-recordmydesktop{p} idle{p} jackd2{p} libaio1{p} libamd2.3.1{p} libao-common{p} libao4{p} libasn1-8-heimdal{p}
libbabl-0.1-0{p} libboost-atomic1.55.0{p} libboost-filesystem1.55.0{p} libboost-program-options1.55.0{p} libboost-regex1.55.0{p}
libboost-thread1.55.0{p} libcairo-script-interpreter2{p} libcamd2.3.1{p} libccolamd2.8.0{p} libcdio-cdda1{p} libcdio-paranoia1{p}
libcholmod2.1.2{p} libcwiid1{p} libdiscid0{p} libgcj-common{p} libgcj15{p} libgegl-0.2-0{p} libgimp2.0{p} libgksu2-0{p}
libgnome-keyring0{p} libgnome-menu-3-0{p} libgoa-1.0-0b{p} libgpod4{p} libhcrypto4-heimdal{p} libhdb9-heimdal{p}
libheimbase1-heimdal{p} libhx509-5-heimdal{p} libkeybinder-3.0-0{p} libkrb5-26-heimdal{p} libldb1{p} libntdb1{p} libopenraw1{p}
libpeas-1.0-0{p} libqscintilla2-11{p} libroken18-heimdal{p} librtimulib7{p} libscsynth1{p} libsmbclient{p} libsox2{p} libtevent0{p}
libtidy-0.99-0{p} libtiffxx5{p} libumfpack5.6.2{p} libv8-3.14.5{p} libwebpdemux1{p} libwebpmux1{p} libwind0-heimdal{p} libwmf0.2-7{p}
lsb-release{p} lxsession{p} meld{p} minecraft-pi{p} omxplayer{p} pimixer{p} pishutdown{p} python{p} python-gobject-2{p} python-ldb{p}
python-support{p} python-talloc{p} python2.7{p} python2.7-minimal{p} qjackctl{p} quodlibet{p} raspberrypi-ui-mods{p} samba{p}
samba-libs{p} sense-hat{p} sonic-pi{p} vim-gui-common{p}

(cancelled)

python3-serial 2.6-1.1 is installed

aptitude hold libpython2.7 (doesn’t work)

python --version
bash: /usr/bin/python: No such file or directory

pip freeze
bash: /usr/bin/pip: No such file or directory

so that’s sub optimal

Google time, it turns out Debian’s default python version is v2.7… ummm crap.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 0
update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in auto mode

sudo update-alternatives --list python
/usr/bin/python3

sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 0
update-alternatives: using /usr/bin/pip3 to provide /usr/bin/pip (pip) in auto mode

python --version
Python 3.4.2

pip freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

perhaps using alternatives is what I should have done in the first place…

trying to reinstall all the python2.7 stuff

sudo apt-get install apt-listchanges debian-goodies debsecan eog exfalso gconf2 gimp gdb gksu gnome-menus gtk-recordmydesktop idle python-support quodlibet raspberrypi-ui-mods sense-hat samba-libs eog vim-gtk

python-support causing configure to fail

this resulted in a very broken system as apt-get and aptitude post-install scripts rely on python2.7 duh.


insert swearing

I would have thought if Debian’s install scripts relied on python2.7 that the likes of apt-get and aptitude would have depended on python2.7…

manually downloading and installing python2.7 debs


insert more swearing

Done. just to be sure

sudo apt-get install --reinstall python2.7

sudo aptitude reinstall python3-pip

well that was quite the excursion, back to my original package list now using a list of packages installed previously.

updating the alternatives

sudo update-alternatives --remove-all python
sudo update-alternatives --config python
update-alternatives: error: no alternatives for python

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 3
update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in auto mode

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2

sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3

sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status

  • 0 /usr/bin/python3 3 auto mode
    1 /usr/bin/python2.7 2 manual mode
    2 /usr/bin/python3 3 manual mode
    Press enter to keep the current choice[*], or type selection number: 0

sudo update-alternatives --config pip
update-alternatives: error: no alternatives for pip

python --version
Python 3.4.2

sudo apt-get install python-pip python3-pip

aptitude seems to be comprehensively killed by my default of python3

sudo update-alternatives --config python
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in manual mode

package install succeeds now

sudo update-alternatives --config pip
update-alternatives: error: no alternatives for pip

pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)

pip3 --version
pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)

pip freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

pip3 freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

python3-serial is installed but python-serial is not …

installing python-serial (2.6-1.1)

python3

update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in manual mode

pip freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6 <-----------------------
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

pip3 freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6 <-----------------------
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

python2.7

update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in manual mode

pip freeze
CDDB==1.4
GitPython==2.0.5
SQLAlchemy==0.9.8
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
configobj==5.0.6
dnspython==1.12.0
feedparser==5.1.3
gitdb==0.6.4
html5lib==0.999
iotop==0.6
lxml==3.4.0
meld==3.12.1
mutagen==1.25.1
ndg-httpsclient==0.3.2
numpy==1.8.2
psutil==4.2.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pycrypto==2.6.1
pygobject==3.14.0
pyinotify==0.9.4
pyrit==0.4.0
pyserial==3.1 <---------------------------- 3.1!!!
python-apt==0.9.3.12
python-musicbrainz2==0.7.4
pyxdg==0.25
quodlibet==3.2.2
requests==2.4.3
scapy==2.2.0
simplejson==3.8.2
six==1.10.0
smmap==0.9.0
uTidylib==0.2
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2

pip3 freeze
RPi.GPIO==0.6.2
chardet==2.3.0
colorama==0.3.2
gpiozero==1.2.0
html5lib==0.999
numpy==1.8.2
pgzero==1.1
picamera==1.10
pifacecommon==4.2.1
pifacedigitalio==3.1.0
pigpio==1.30
pygame==1.9.2a0
pygobject==3.14.0
pyserial==2.6 <-----------------------
python-apt==0.9.3.12
python-debian==0.1.27
requests==2.4.3
six==1.8.0
spidev==3.0
urllib3==1.9.1
wheel==0.24.0

ok now I’m really confused

starting from the top again with the install

su
mv ~/
git clone https://github.com/BrewPi/brewpi-tools.git ~/brewpi-tools
cd ~/brewpi-tools
./install.sh

The following extra packages will be installed:
libpython-dev libpython2.7-dev python2.7-dev

***** Installing/updating required python packages via pip… *****

Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: psutil in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: simplejson in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: configobj in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: gitpython in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from configobj)
Cleaning up…

To view your BrewPi web interface, enter http://172.16.0.200 into your web browser

so if I had have checked my old install log I would have instantly known that brewpi wanted python 2.7 duh

either way there is still no change in the web interface

Cannot receive LCD text from Python script
Script not running!

su brewpi ; cd

python brewpi.py --status
BrewPi requires ConfigObj to run, please install it with 'sudo apt-get install python-configobj

sudo apt-get install python-configobj …(5.0.6-1) …

python brewpi.py --status
BrewPi requires pyserial 3.0, you have version 2.6 installed.
Please upgrade pyserial via pip, by running:

sudo pip install pyserial --upgrade
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Cleaning up…

pip freeze

pyserial==3.1

sudo update-alternatives --config python
update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in manual mode

python brewpi.py --status
File “brewpi.py”, line 250
os.chmod(dataPath, 0775) # give group all permissions
^
SyntaxError: invalid token

so yeah, duh, doesn’t like python3

ok let’s try removing all python3 hey?

everything with python3 in the package name and all dependencies got the nukes including:

eog
libreoffice-something

python brewpi.py --status
bash: /usr/bin/python: No such file or directory

sudo update-alternatives --config python
update-alternatives: warning: alternative /usr/bin/python3 (part of link group python) doesn’t exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/python is dangling; it will be updated with best choice
There is only one alternative in link group python (providing /usr/bin/python): /usr/bin/python3
Nothing to configure.

sudo apt-get install --reinstall python2.7

didn’t fix the alternatives for me …

sudo update-alternatives --config python
update-alternatives: warning: alternative /usr/bin/python3 (part of link group python) doesn’t exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/python is dangling; it will be updated with best choice
There is only one alternative in link group python (providing /usr/bin/python): /usr/bin/python3
Nothing to configure.

fixing the alternatives manually…

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2

python --version
Python 2.7.9

pip freeze
CDDB==1.4
GitPython==2.0.5
SQLAlchemy==0.9.8
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
configobj==5.0.6
dnspython==1.12.0
feedparser==5.1.3
gitdb==0.6.4
html5lib==0.999
iotop==0.6
lxml==3.4.0
meld==3.12.1
mutagen==1.25.1
ndg-httpsclient==0.3.2
numpy==1.8.2
psutil==4.2.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pycrypto==2.6.1
pygobject==3.14.0
pyinotify==0.9.4
pyrit==0.4.0
pyserial==3.1
python-apt==0.9.3.12
python-musicbrainz2==0.7.4
pyxdg==0.25
quodlibet==3.2.2
requests==2.4.3
scapy==2.2.0
simplejson==3.8.2
six==1.10.0
smmap==0.9.0
uTidylib==0.2
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2

python brewpi.py --status
BrewPi requires pyserial 3.0, you have version 2.6 installed.
Please upgrade pyserial via pip, by running:
sudo pip install pyserial --upgrade

sudo pip install pyserial --upgrade
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Cleaning up…

python-dev is already the newest version.
python-pip is already the newest version.

ok that’s getting annoying.

looking for an OLDER version of python serial… at http://snapshot.debian.org/binary/python-serial/

sudo dpkg -i python-serial_3.0-1_all.deb
(Reading database … 157210 files and directories currently installed.)
Preparing to unpack python-serial_3.0-1_all.deb …
Unpacking python-serial (3.0-1) over (2.6-1.1) …
Setting up python-serial (3.0-1) …

pip freeze
CDDB==1.4
GitPython==2.0.5
SQLAlchemy==0.9.8
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
configobj==5.0.6
dnspython==1.12.0
feedparser==5.1.3
gitdb==0.6.4
html5lib==0.999
iotop==0.6
lxml==3.4.0
meld==3.12.1
mutagen==1.25.1
ndg-httpsclient==0.3.2
numpy==1.8.2
psutil==4.2.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pycrypto==2.6.1
pygobject==3.14.0
pyinotify==0.9.4
pyrit==0.4.0
pyserial==3.1 no change here yet …

python brewpi.py --status

BrewPi requires simplejson to run, please install it with 'sudo apt-get install python-simplejson

A new error message! exciting!!!

sudo apt-get install python-simplejson
Setting up python-simplejson (3.6.5-1) …

python brewpi.py --status
BrewPi requires psutil to run, please install it via pip: 'sudo pip install psutil --upgrade

progress?

sudo pip install psutil --upgrade
Requirement already up-to-date: psutil in /usr/local/lib/python2.7/dist-packages
Cleaning up…

pip freeze

psutil==4.2.0

but if i look in aptitude, it isn’t installed

sudo apt-get install python-psutil
Setting up python-psutil (2.1.1-1) …

python brewpi.py --status
[{‘cfg’: ConfigObj({‘scriptPath’: ‘/home/brewpi/’, ‘wwwPath’: ‘/var/www/html’, ‘port’: ‘auto’, ‘altport’: ‘None’, ‘boardType’: ‘leonardo’, ‘beerName’: ‘My First BrewPi Run’, ‘interval’: ‘120.0’, ‘dataLogging’: ‘active’}),
‘pid’: 4077,
‘port’: ‘auto’,
‘sock’: {‘sock’: 0, ‘host’: ‘localhost’, ‘type’: ‘f’, ‘port’: None, ‘file’: ‘/home/brewpi/BEERSOCKET’}}]

is that good?

ls -al /home/brewpi/BEERSOCKET
srwxrwxrwx 1 brewpi brewpi 0 Jun 11 12:07 /home/brewpi/BEERSOCKET

python brewpi.py --quit
Jun 11 2016 12:11:13 Asking all BrewPi Processes to quit on their socket
Quit message sent to BrewPi instance with pid 4077!

that seems promising!!

python brewpi.py --quit
Jun 11 2016 12:11:35 Asking all BrewPi Processes to quit on their socket

python brewpi.py
Jun 11 2016 12:11:51 Opening serial port
Jun 11 2016 12:11:51 Notification: Script started for beer 'My First BrewPi Run’
Jun 11 2016 12:12:01 Checking software version on controller…
Jun 11 2016 12:12:01 Found BrewPi v0.4.3 build 0.4.3-0-g4d00879, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Jun 11 2016 12:12:02 {“BeerTemp”:null,“BeerSet”:null,“BeerAnn”:null,“FridgeTemp”:null,“FridgeSet”:null,“FridgeAnn”:null,“RoomTemp”:null,“State”:0}
Jun 11 2016 12:12:02 {“BeerTemp”:null,“BeerSet”:null,“BeerAnn”:null,“FridgeTemp”:null,“FridgeSet”:null,“FridgeAnn”:null,“RoomTemp”:null,“State”:0}

and yet the web interface still says the script isn’t running??

Cannot receive LCD text from Python script
Script not running!

sudo /etc/init.d/apache2 restart
Restarting apache2 (via systemctl): apache2.service.

Still no dice. for the love of beer …

Over it for now

I reinstalled debian again and this time it worked flawlessly. Go figure